|
| 1 | +How to contribute to nix-mx |
| 2 | +=========================== |
| 3 | + |
| 4 | +This document gives some information about how to contribute to the nix-mx project. |
| 5 | + |
| 6 | + |
| 7 | +Contributing |
| 8 | +------------ |
| 9 | + |
| 10 | +If you want to contribute to the project please first create a fork of the repository on GitHub. |
| 11 | +When you are done with implementing a new feature or with fixing a bug, please send |
| 12 | +us a pull request. |
| 13 | + |
| 14 | +If you contribute to the project regularly, it would be very much appreciated if you |
| 15 | +would stick to the following development workflow: |
| 16 | + |
| 17 | +1. Select an *issue* from the issue tracker that you want to work on and assign the issue to your account. |
| 18 | + If the *issue* is about a relatively complex matter or requires larger API changes the description of the |
| 19 | + *issue* or its respective discussion should contain a brief concept about how the solution will look like. |
| 20 | + |
| 21 | +2. During the implementation of the feature or bug-fix add your changes in small atomic commits. |
| 22 | + Commit messages should be short but expressive. |
| 23 | + The first line of the message should not exceed **50** characters and the 2nd line should be empty. |
| 24 | + If you want to add further text you can do so from the 3rd line on without limitations. |
| 25 | + If possible reference fixed issues in the commit message (e.g. "fixes #101"). |
| 26 | + |
| 27 | +3. When done with the implementation, compile and test the code. |
| 28 | + If your work includes a new function or class please write a small unit test for it. |
| 29 | + |
| 30 | +4. Send us a pull request with your changes. |
| 31 | + The pull request message should explain the changes and reference the *issue* addressed by your code. |
| 32 | + Your pull request will be reviewed by one of our team members. |
| 33 | + Pull requests should never be merged by the author of the contribution, but by another team member. |
| 34 | + |
| 35 | + |
| 36 | +The issue tracker |
| 37 | +----------------- |
| 38 | + |
| 39 | +Please try to avoid duplicates of issues. If you encounter duplicated issues, please close all of them except |
| 40 | +one, reference the closed issues in the one that is left open and add missing information from the closed issues |
| 41 | +(if necessary) to the remaining issue. |
| 42 | + |
| 43 | +Assign meaningful tags to newly crated issues and if possible assign them to milestones. |
| 44 | + |
| 45 | + |
| 46 | +Reviewing pull requests |
| 47 | +----------------------- |
| 48 | + |
| 49 | +Every code (even small contributions from core developers) should be added to the project via pull requests. |
| 50 | +Each pull request that passes all builds and tests should be reviewed by at least one of the core developers. |
| 51 | +If a contribution is rather complex or leads to significant API changes, the respective pull request should be |
| 52 | +reviewed by two other developers. |
| 53 | +In such cases the first reviewer or the contributor should request a second review in a comment. |
| 54 | + |
| 55 | + |
| 56 | +Testing |
| 57 | +------- |
| 58 | + |
| 59 | +- Unit test can be found in the `tests` sub directory. |
| 60 | +- Provide a unit test for every class, method or function. |
| 61 | +- Please make sure that all tests pass before merging/sending pull requests. |
| 62 | + |
| 63 | + |
| 64 | +Style guide |
| 65 | +----------- |
| 66 | + |
| 67 | +Adhere to the MATLAB Style Guidelines 2.0 as suggested by Richard Johnson. |
| 68 | + |
| 69 | +Furthermore, adhere to these additional guidelines for the nix-mx project: |
| 70 | + |
| 71 | +- keep line length at 90 max. |
| 72 | +- use `r` as return variable name of simple (2-3 line) functions. |
| 73 | +- always use ';' to terminate proper statements, never for terminating control structures. |
| 74 | +- Structure names should start with a capital letter. |
| 75 | +- Structure field names should be camel case and start with a lower case letter. |
0 commit comments