We use Semantic Versioning with the modifications described under :ref:`deprecation_policy`.
petab aims to provide a stable API for users. However, not all features can be maintained indefinitely. We will deprecate features in minor releases and where possible, issue a warning when they are used. We will keep deprecated features for at least six months after the release that includes the respective deprecation warning and then remove them earliest in the next minor or major release. If a deprecated feature is the source of a major bug, we may remove it earlier.
We follow numpy's Python support policy.
- Update the version number in
petab/version.py. - Update the changelog in
doc/CHANGELOG.md. The update content can be generated automatically: draft a new dummy GitHub release with a dummy tag and thedevelopbranch, then click :guilabel:`Generate release notes`. - Create a pull request with the to-be-released changes to the main branch
(usually from
develop). - Once the pull request is merged, create a new release on GitHub.
Make sure to set the tag to the version number prefixed with 'v'
(e.g.,
v1.0.0), and the release title tolibpetab-python $RELEASE_TAG(e.g.,libpetab-python v1.0.0). - Check that the release is now available on PyPI. The upload to PyPI is performed automatically by a GitHub Actions workflow, which may take a few minutes to complete.
- Merge the main branch back into the develop branch.
We use pre-commit with ruff to enforce code style. To install pre-commit and the pre-commit hooks, run:
pip install pre-commit
pre-commit installTo run the pre-commit checks manually on all, not just the modified files, run:
pre-commit run --all-filesWe use Sphinx to generate the documentation. The documentation is written in reStructuredText.
We use the sphinx docstring-style for new code.
The :param [ParamName]: and :return: statements are important when
applicable.
Manual type annotations (:type [ParamName]:) are redundant and should be
avoided.
To build the documentation, run:
cd doc
make html
# then open `build/html/index.html` in a browser