From e316773d55ea88e77eecb7f7b799fca8f8d28b50 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 10 Mar 2025 14:16:22 +0100 Subject: [PATCH 1/6] Update developer's guide --- doc/development.rst | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/doc/development.rst b/doc/development.rst index df4edf55..994d8fa3 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -24,3 +24,57 @@ Python compatibility -------------------- We follow `numpy's Python support policy `_. + +Release process +--------------- + +1. Update the version number in ``petab/version.py``. + +2. Update the changelog in ``doc/CHANGELOG.md``. + +3. Create a pull request with the changes to the main branch. + +4. 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 to ``libpetab-python $RELEASE_TAG`` + (e.g., ``libpetab-python v1.0.0``). + +5. The release will be automatically uploaded to PyPI through a GitHub actions + workflow. + + +Style guide +----------- + +Code style +~~~~~~~~~~ + +We use pre-commit with ruff to enforce code style. To install pre-commit and +the pre-commit hooks, run: + +.. code-block:: bash + + pip install pre-commit + pre-commit install + +To run the pre-commit checks manually on all, not just the modified files, run: + +.. code-block:: bash + + pre-commit run --all-files + +Documentation style +~~~~~~~~~~~~~~~~~~~ + +We use `Sphinx `_ to generate the documentation. +The documentation is written in `reStructuredText `_. + +We use the `sphinx docstring-style `__ for new code. + +To build the documentation, run: + +.. code-block:: bash + + cd doc + make html + # then open `build/html/index.html` in a browser From 5092606953ec10a9c553dfee7365403d14cab2f2 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 11 Mar 2025 15:20:40 +0100 Subject: [PATCH 2/6] Update doc/development.rst Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> --- doc/development.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/development.rst b/doc/development.rst index 994d8fa3..a8da89ed 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -30,7 +30,7 @@ Release process 1. Update the version number in ``petab/version.py``. -2. Update the changelog in ``doc/CHANGELOG.md``. +2. 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 the ``develop`` branch, then click "Generate release notes". 3. Create a pull request with the changes to the main branch. From fcff6b62e9b68d870aecb70efa70301dc0304e9b Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 11 Mar 2025 15:21:52 +0100 Subject: [PATCH 3/6] Update doc/development.rst Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> --- doc/development.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/development.rst b/doc/development.rst index a8da89ed..0a6d4884 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -39,8 +39,7 @@ Release process (e.g., ``v1.0.0``), and the release title to ``libpetab-python $RELEASE_TAG`` (e.g., ``libpetab-python v1.0.0``). -5. The release will be automatically uploaded to PyPI through a GitHub actions - workflow. +5. 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. Style guide From dc5ed5f9f97b6527780a69ac2964602a99983fe1 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 11 Mar 2025 15:22:14 +0100 Subject: [PATCH 4/6] Update doc/development.rst Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> --- doc/development.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/development.rst b/doc/development.rst index 0a6d4884..48600cc8 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -69,6 +69,8 @@ We 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: From 3e980870e805ce122eaf8cecb8e2424fbc470e29 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 11 Mar 2025 15:26:12 +0100 Subject: [PATCH 5/6] .. --- doc/development.rst | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/development.rst b/doc/development.rst index 48600cc8..ea652b5c 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -30,7 +30,10 @@ Release process 1. Update the version number in ``petab/version.py``. -2. 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 the ``develop`` branch, then click "Generate release notes". +2. 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 the ``develop`` + branch, then click :guilabel:`Generate release notes`. 3. Create a pull request with the changes to the main branch. @@ -39,8 +42,11 @@ Release process (e.g., ``v1.0.0``), and the release title to ``libpetab-python $RELEASE_TAG`` (e.g., ``libpetab-python v1.0.0``). -5. 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. +5. 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. +6. Merge the main branch back into the `develop` branch. Style guide ----------- @@ -69,8 +75,10 @@ We 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. +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: From 7bb49a706f8cc9f397790931eec16ea2f214c269 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 12 Mar 2025 13:51:00 +0100 Subject: [PATCH 6/6] update --- doc/development.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/development.rst b/doc/development.rst index ea652b5c..181505a9 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -35,7 +35,8 @@ Release process draft a new dummy GitHub release with a dummy tag and the ``develop`` branch, then click :guilabel:`Generate release notes`. -3. Create a pull request with the changes to the main branch. +3. Create a pull request with the to-be-released changes to the main branch + (usually from ``develop``). 4. 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'