Development¶
As an open-source project, other researchers/students are encouraged to improve upon the code/documentation. The code is released under the permissive BSD 2-Clause License. The source code repository is found at https://github.com/chemreac/chemreac which is also where issues and patches (“pull requests”) are accepted.
Documentation standard¶
The API docs are generated automatically and numpydoc is used to automatically parse docstrings of functions and classes. See the NumPy/SciPy documentation guide for more info.
Unit tests¶
The correctness of the implementation is verified through the use of (hundreds of) unit tests. Ideally all code should be covered with tests.
Continuous integration¶
In order to minimize the risk of (re)introducing bugs into the code base, it is continuously built on a CI server:
Environment¶
In theory chemreac
should be cross-platform. However, all development (and
testing) is done on Linux, and the documentation assumes a posix compliant
environment, or at least familiarity with this environment. Feedback from users
and developers on other platforms is most welcome.
If you are new to github and the like, a good start is SymPy’s wiki entry on development workflow (minus the SymPy specific parts obviously).
Example of setting up a development environment¶
Here is an example to get you started developing chemreac and contributing to the code:
Fork the repository on github
Install the dependencies specified in the README.rst file
Clone your own repo to get a local copy:
$ git clone https://github.com/YOUR_GITHUB_USERNAME/chemreac.git
4. Optionally set-up the pre-commit hook (prevents commiting untested code).
$ cd .git/hooks
$ ln -s ../../scripts/pre-commit.sh pre-commit
$ cd -
5. Create a new branch
$ git checkout -b fix_silly_bug
6. Edit files, add test(s), make sure all tests pass by running:
$ ./scripts/run_tests.sh
7. make a commit, and push your changes:
$ git commit -am "Fixed a silly bug in the complex-thingy."
$ git push origin --set-upstream fix_silly_bug
Go to your forked repo on github and create a pull-request from there.