@@ -24,3 +24,67 @@ Python compatibility
2424--------------------
2525
2626We follow `numpy's Python support policy <https://numpy.org/neps/nep-0029-deprecation_policy.html >`_.
27+
28+ Release process
29+ ---------------
30+
31+ 1. Update the version number in ``petab/version.py ``.
32+
33+ 2. Update the changelog in ``doc/CHANGELOG.md ``.
34+ The update content can be generated automatically:
35+ draft a new dummy GitHub release with a dummy tag and the ``develop ``
36+ branch, then click :guilabel: `Generate release notes `.
37+
38+ 3. Create a pull request with the to-be-released changes to the main branch
39+ (usually from ``develop ``).
40+
41+ 4. Once the pull request is merged, create a new release on GitHub.
42+ Make sure to set the tag to the version number prefixed with 'v'
43+ (e.g., ``v1.0.0 ``), and the release title to ``libpetab-python $RELEASE_TAG ``
44+ (e.g., ``libpetab-python v1.0.0 ``).
45+
46+ 5. Check that the release is now available on PyPI.
47+ The upload to PyPI is performed automatically by a GitHub Actions workflow,
48+ which may take a few minutes to complete.
49+
50+ 6. Merge the main branch back into the `develop ` branch.
51+
52+ Style guide
53+ -----------
54+
55+ Code style
56+ ~~~~~~~~~~
57+
58+ We use pre-commit with ruff to enforce code style. To install pre-commit and
59+ the pre-commit hooks, run:
60+
61+ .. code-block :: bash
62+
63+ pip install pre-commit
64+ pre-commit install
65+
66+ To run the pre-commit checks manually on all, not just the modified files, run:
67+
68+ .. code-block :: bash
69+
70+ pre-commit run --all-files
71+
72+ Documentation style
73+ ~~~~~~~~~~~~~~~~~~~
74+
75+ We use `Sphinx <https://www.sphinx-doc.org/ >`_ to generate the documentation.
76+ The documentation is written in `reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html >`_.
77+
78+ We use the `sphinx docstring-style <https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html >`__ for new code.
79+ The ``:param [ParamName]: `` and ``:return: `` statements are important when
80+ applicable.
81+ Manual type annotations (``:type [ParamName]: ``) are redundant and should be
82+ avoided.
83+
84+ To build the documentation, run:
85+
86+ .. code-block :: bash
87+
88+ cd doc
89+ make html
90+ # then open `build/html/index.html` in a browser
0 commit comments