Contributing
We follow Github flow in the development.
The basic procedure to contribute code to the project is:
- Install from cloned repository
- Create your own branch and implement the changes (and tests, preferably)
- Make sure the tests pass
- Create a pull request on Github
- Another contributor reviews the pull request
- Fix review comments if any
- Reviewer merges the pull request
Install from cloned repository
Clone repository to your local files:
This project uses Hatch for project management. First, install hatch. You will also need a recent version of pip.
Then, go to the root of the cloned repository and create an environment for it:
After that, you can enter the environment by:
You can confirm that the project has been installed by:
Running tests
This project uses pytest
for testing. To run the tests after cloning and installing, go to the root of the cloned repository and run:
Documenting the source code
The source code should be documented using Google style docstrings.
Generating the documentation
This documentation is created using Material for MkDocs and mkdocstrings. The documentation is published using Github Pages. There are utility scripts defined in pyproject.toml
to build and publish the documentation.
When working on documentation, use hatch environment docs
:
Build the documentation:
Serve the documentation on local machine for inspection:
Publish the documentation:
Publishing to Zenodo
Whenever a new release is created in Github, the version will automatically be published in Zenodo.
Publishing to PyPI
First, remember to update the version in version.py. Then, follow Hatch publishing instructions.
Build the package with hatch:
Then, publish to TestPyPI with:
If the TestPyPI package is OK, publish to PyPI with:
Use token authentication with PyPI.