|
| 1 | +# Contributing |
| 2 | + |
| 3 | +When contributing to this repository, please first discuss the change you wish to make via issue, |
| 4 | +email, or any other method with the owners of this repository before making a change. |
| 5 | + |
| 6 | +Please note we have a code of conduct, please follow it in all your interactions with the project. |
| 7 | + |
| 8 | +## Pull Request Process |
| 9 | + |
| 10 | +We have two main branches: the dev branch where we deploy new features and the master branch which contains the stable build that most users will work with. Below is the general for adding a new feature: |
| 11 | + |
| 12 | +1. Ensure any new code is accompanied by a test that adequately covers all expected use cases, and [MATLAB documentation](https://www.mathworks.com/help/matlab/matlab_prog/add-help-for-your-program.html) |
| 13 | +2. Update the README.md with details of changes to the interface, wherever relavent. This includes changes to any major UIs or install scripts. It's worth also ensuring the configuration scripts and tutorials in the docs/ dirctory are up to date. |
| 14 | +3. Create a pull request to merge into the dev branch. Before merging the code must pass all tests and be approved by one reviewer. |
| 15 | +4. Once merged into dev the changes may be summerized in the release notes. |
| 16 | +5. Once there have been sufficient changes to the dev branch to be considered a major version and all changes have been deployed for at least a week, the team will open a pull request to merge into the master branch. |
| 17 | +6. Before merging into master the submodule dependencies should be updated and checked first. The previous code is archived in the releases tab. |
| 18 | +3. Increase the version numbers in any examples files and the README.md to the new version that this |
| 19 | + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). |
| 20 | +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you. |
| 21 | + |
| 22 | +## Style guidelines |
| 23 | + |
| 24 | +Although there aren't any strict guidelines we suggest making your code as consistent with the rest of the repository as possible. Some examples: |
| 25 | +* Variables and function names generally follow the MATLAB convention of 'Dromedary case' (`expRef`, `inferParameters`) and when defining a commonly used variable be consistent with the names in other files. If assigning an output of a function, try to use name defined in that functions' header (`[expRef, expDate, expSequence] = listExps(subjects)`). |
| 26 | +* Class names and properties are in 'camel case' (`AlyxPanel`, `obj.Token`). |
| 27 | +* In general clarity > brevity. Don't be afraid to spread things out over a number of lines and to add in-line comments. Long variable names are often much clearer (`inputSensorPosCount` vs `iputPosN`). |
| 28 | +* There are a number of utility functions in [cb-tools](https://github.com/cortex-lab/Rigbox/tree/master/cb-tools/burgbox) that we encourage the use of. Many of these implementations of functional programming methods. |
| 29 | +* Information on the physical organization of the repository can be found [here](https://github.com/cortex-lab/Rigbox/issues/123#issue-422187511). |
| 30 | + |
| 31 | +## Code of Conduct |
| 32 | + |
| 33 | +### Our Pledge |
| 34 | + |
| 35 | +In the interest of fostering an open and welcoming environment, we as |
| 36 | +contributors and maintainers pledge to making participation in our project and |
| 37 | +our community a harassment-free experience for everyone, regardless of age, body |
| 38 | +size, disability, ethnicity, gender identity and expression, level of experience, |
| 39 | +nationality, personal appearance, race, religion, or sexual identity and |
| 40 | +orientation. |
| 41 | + |
| 42 | +### Our Standards |
| 43 | + |
| 44 | +Examples of behavior that contributes to creating a positive environment |
| 45 | +include: |
| 46 | + |
| 47 | +* Using welcoming and inclusive language |
| 48 | +* Being respectful of differing viewpoints and experiences |
| 49 | +* Gracefully accepting constructive criticism |
| 50 | +* Focusing on what is best for the community |
| 51 | +* Showing empathy towards other community members |
| 52 | + |
| 53 | +Examples of unacceptable behavior by participants include: |
| 54 | + |
| 55 | +* The use of sexualized language or imagery and unwelcome sexual attention or |
| 56 | +advances |
| 57 | +* Trolling, insulting/derogatory comments, and personal or political attacks |
| 58 | +* Public or private harassment |
| 59 | +* Publishing others' private information, such as a physical or electronic |
| 60 | + address, without explicit permission |
| 61 | +* Other conduct which could reasonably be considered inappropriate in a |
| 62 | + professional setting |
| 63 | + |
| 64 | +### Our Responsibilities |
| 65 | + |
| 66 | +Project maintainers are responsible for clarifying the standards of acceptable |
| 67 | +behavior and are expected to take appropriate and fair corrective action in |
| 68 | +response to any instances of unacceptable behavior. |
| 69 | + |
| 70 | +Project maintainers have the right and responsibility to remove, edit, or |
| 71 | +reject comments, commits, code, wiki edits, issues, and other contributions |
| 72 | +that are not aligned to this Code of Conduct, or to ban temporarily or |
| 73 | +permanently any contributor for other behaviors that they deem inappropriate, |
| 74 | +threatening, offensive, or harmful. |
| 75 | + |
| 76 | +### Scope |
| 77 | + |
| 78 | +This Code of Conduct applies both within project spaces and in public spaces |
| 79 | +when an individual is representing the project or its community. Examples of |
| 80 | +representing a project or community include using an official project e-mail |
| 81 | +address, posting via an official social media account, or acting as an appointed |
| 82 | +representative at an online or offline event. Representation of a project may be |
| 83 | +further defined and clarified by project maintainers. |
| 84 | + |
| 85 | +### Enforcement |
| 86 | + |
| 87 | +Instances of abusive, harassing, or otherwise unacceptable behavior may be |
| 88 | +reported by contacting the project team at [INSERT EMAIL ADDRESS]. All |
| 89 | +complaints will be reviewed and investigated and will result in a response that |
| 90 | +is deemed necessary and appropriate to the circumstances. The project team is |
| 91 | +obligated to maintain confidentiality with regard to the reporter of an incident. |
| 92 | +Further details of specific enforcement policies may be posted separately. |
| 93 | + |
| 94 | +Project maintainers who do not follow or enforce the Code of Conduct in good |
| 95 | +faith may face temporary or permanent repercussions as determined by other |
| 96 | +members of the project's leadership. |
| 97 | + |
| 98 | +### Attribution |
| 99 | + |
| 100 | +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, |
| 101 | +available at [http://contributor-covenant.org/version/1/4][version] |
| 102 | + |
| 103 | +[homepage]: http://contributor-covenant.org |
| 104 | +[version]: http://contributor-covenant.org/version/1/4/ |
0 commit comments