1Contributing a module {#contributions} 2===================== 3 4Here are the rules of contribution: 5- Your new module must have an example that builds against your UPM library. 6- Each commit must have a sign-off line by everyone who authored or reviewed 7 them. 8- Commits must be named `<file/module>: Some decent description`. 9- You must license your module under a FOSS license. The recommended license 10 is MIT but any permissive license is fine. Please consider that people using 11 UPM may want to write proprietary programs with your sensors so we like to 12 avoid GPL. If your license is not MIT please include a LICENSE file in 13 src/mymodule/. 14- The top of each source file must contain a comment block containing the 15 license information. 16- Please test your module builds before contributing and make sure it works on 17 the latest version of libmraa. If you tested on a specific board/platform 18 please tell us what this was in your PR. 19- Try not to break master. In any commit. 20- Attempt to have some decent API documentation as described in the the @ref 21 documentation [guide](documentation.md). 22 23Including the MIT license 24========================= 25Choosing the [MIT license](http://opensource.org/licenses/MIT) is preferred for 26the UPM repository. Below is the comment block needed at the top each source 27file: 28 29 /* 30 * The MIT License (MIT) 31 * 32 * Author: <your full name> 33 * Copyright (c) <year> <copyright holder> 34 * 35 * Author: <contributing author full name - if applicable> 36 * Copyright (c) <year> <copyright holder> 37 * 38 * Permission is hereby granted, free of charge, to any person obtaining a copy of 39 * this software and associated documentation files (the "Software"), to deal in 40 * the Software without restriction, including without limitation the rights to 41 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 42 * the Software, and to permit persons to whom the Software is furnished to do so, 43 * subject to the following conditions: 44 * 45 * The above copyright notice and this permission notice shall be included in all 46 * copies or substantial portions of the Software. 47 * 48 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 49 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 50 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 51 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 52 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 53 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 54 */ 55 56 57Code signing 58============ 59 60The sign-off is a simple line at the end of the explanation for the 61patch, which certifies that you wrote it or otherwise have the right to pass it 62on as an open-source patch. The rules are pretty simple: if you can certify 63the below: 64 65 Developer's Certificate of Origin 1.1 66 67 By making a contribution to this project, I certify that: 68 69 (a) The contribution was created in whole or in part by me and I 70 have the right to submit it under the open source license 71 indicated in the file; or 72 73 (b) The contribution is based upon previous work that, to the best 74 of my knowledge, is covered under an appropriate open source 75 license and I have the right under that license to submit that 76 work with modifications, whether created in whole or in part 77 by me, under the same open source license (unless I am 78 permitted to submit under a different license), as indicated 79 in the file; or 80 81 (c) The contribution was provided directly to me by some other 82 person who certified (a), (b) or (c) and I have not modified 83 it. 84 85 (d) I understand and agree that this project and the contribution 86 are public and that a record of the contribution (including all 87 personal information I submit with it, including my sign-off) is 88 maintained indefinitely and may be redistributed consistent with 89 this project or the open source license(s) involved. 90 91then you just add a line to each of your commits with `--signoff` saying 92 93 Signed-off-by: Random J Developer <random@developer.example.org> 94 95using your real name (sorry, no pseudonyms or anonymous contributions.) 96Unsigned commits will not be accepted. 97