MALA is open source software and as such always welcomes additions and improvements. However, we kindly ask any contributor to adhere to the following suggestions in order to keep the overall quality and maintainability of the code high.
MALA has a versioning system. The version number is only updated when merging
on master
. This constitutes a release. Please note that not all changes
to code constitute such a release and generally, merges will be directed
to the develop
branch
(see branching strategy). The version number has
the form MAJOR.MINOR.FIX
:
MAJOR
: Big changes to the code, that fundamentally change the way it functions or wrap up a longer development.MINOR
: new features have been added to the code.FIX
: A bug in a feature has been fixed.
Every new version should be accompanied by a changelog. Please include the version of the test data repository with which this version is supposed to be used in this changelog.
In order to correctly update the MALA version, we use bumpversion. The actual release process is very straightforward:
- Create a PR from
develop
tomaster
. - Merge the PR.
- Update the
date-released: ...
entry inCITATION.cff
(onmaster
). - Create a tagged (and signed) commit on
master
withbumpversion minor --allow-dirty
(check changes withgit show
orgit diff HEAD^
). Use eithermajor
,minor
orfix
, depending on what this release updates. - Check out
develop
and do agit merge master --ff
- Push
master
anddevelop
including tags (--tags
). - Create a new release out of the tag on GitHub (https://github.com/mala-project/mala/releases/new) and add release notes/change log.
- Check if release got published to PyPI.
In general, contributors should develop on branches based off of develop
and
merge requests should be to develop
. Please choose a descriptive branch name.
Branches from develop
to master
will be done after prior consultation of
the core development team.
- Regularly check your code for PEP8 compliance
- Make sure all your classes, functions etc. are documented properly, follow the NumPy style for docstrings
- Keep your code object-oriented, modular, and easily reusable
- If you're adding code that should be tested, add tests
- If you're adding or modifying examples, make sure to add them to
test_examples.py
If you add additional dependencies, make sure to add them to requirements.txt
if they are required or to setup.py
under the appropriate extras
tag if
they are not.
Further, in order for them to be available during the CI tests, make sure to
add required dependencies to the appropriate environment files in folder install/
and extra requirements directly in the Dockerfile
for the conda
environment build.
We actively welcome pull requests.
- Fork the repo and create your branch from
develop
- During development, make sure that you follow the guidelines for developing code
- Rebase your branch onto
develop
before submitting a merge request - Ensure the test suite passes before submitting a pull request
- Use issues to document potential enhancements, bugs and such
- Please tag your issues, and consider setting up a deadline
- Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue
By contributing to MALA, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.