Here we describe the development guidelines for TauREx 3 and some advice for those wishing to contribute. Since TauREx 3 is open-source, all contributions are welcome!!!
All standalone documentation should be written in plain text (.rst
)
files using reStructuredText
for markup and formatting. All docstrings should follow the
numpydoc format. New
features must include both appropriate docstrings and any necessary
standalone documentation
Unittesting is important in preserving sanity and code integrity. For TauREx 3 we employ the standard unittest module. When bugfixing, ensure unittests pass. In the root directory do:
python -m unittest discover
To run all unit tests in TauREx3
When building new features, create new unittests and include them in the
test/
directory, any future collaborations from other developers are
less likely to break your feature unexpectedly when they have something
to easily test against.
Some rules:
- Tests must be quick (in the order of seconds)
- No extra files should be included. Instead have the unit test generate them on the spot.
Code should follow the PEP8 standard. This can be facilitated with a linter such as flake8
Git is the source control environment used. In particular, we follow the git-flow branching model internally. In this model, there are two long-lived branches:
master
: used for official releases. **Contributors should not need to use it or care about it**develop
: reflects the latest integrated changes for the next release. This is the one that should be used as the base for developing new features or fixing bugs.
For contributions we employ the Fork-and-Pull model:
- A contributor first forks the TauREx3 repo
- They then clone their forked branch
- The contributor then commits and merges their changes into their
forked
develop
branch - A
Pull-Request
is created against the official
develop
branch - Anyone interest can review and comment on the pull request, and suggest changes. The contributor can continue to commit more changes until it is approved
- Once approved, the code is considered ready and the pull request is merged into the official develop