Contributions to the OpenSense software ecosystem are very welcome! The packages follow a common development workflow, which is described in detail in the poligrain contributing guide.
Guidelines in brief¶
Contributions should go through a pull request (PR), ideally linked to an open issue for discussing the implementation first.
Code format and style are enforced by linting tools (
pre-commit); runpre-commit run -abefore committing.New code must have 100% test coverage (exceptions need to be discussed with the maintainers).
Typical workflow¶
Fork and clone the repository you want to contribute to.
Set up the dev environment: create a
condaenvironment (Python 3.10 or 3.11) and installpoetry,noxandpre-commit, then runpoetry install.Write code and commit: activate the pre-commit hooks with
pre-commit install, work on a feature branch, and commit regularly.Open a pull request: sync your fork with the upstream repository, push your branch, and open a PR. The CI will run linting and tests, and test coverage is reported automatically.
Running checks locally¶
nox -s lint— lintingnox -s tests— Python testsnox -s docs -- --serve— build and serve the docs locally
For the full step-by-step guide, including details on writing tests and troubleshooting, see the complete contributing guide.