From 4c11ed1042f57d875a14c45ca8bc7942ee20abc1 Mon Sep 17 00:00:00 2001 From: Lourens Veen Date: Thu, 3 Sep 2026 10:01:37 +0200 Subject: [PATCH 1/4] Add capsuli.__version__ so Sphinx can pick up the version --- src/capsuli/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/capsuli/__init__.py b/src/capsuli/__init__.py index e69de29..c3c64a2 100644 --- a/src/capsuli/__init__.py +++ b/src/capsuli/__init__.py @@ -0,0 +1,3 @@ +from importlib.metadata import version + +__version__ = version("capsuli") From 650b5097579126ec8a5542d0f8c4ded116948874 Mon Sep 17 00:00:00 2001 From: Lourens Veen Date: Thu, 3 Sep 2026 10:03:19 +0200 Subject: [PATCH 2/4] Add developer's documentation on how to release --- docs/source/developing.rst | 37 +++++++++++++++++++++++++++++++++++++ docs/source/index.rst | 1 + 2 files changed, 38 insertions(+) create mode 100644 docs/source/developing.rst diff --git a/docs/source/developing.rst b/docs/source/developing.rst new file mode 100644 index 0000000..01b403b --- /dev/null +++ b/docs/source/developing.rst @@ -0,0 +1,37 @@ +Developing +========== + +Making a release +---------------- + +There are four steps to making a release: + +1. Choose the next version number + + It should be of the form ``x.y.z``, and be larger than all previous versions + +2. Update the change log + + Edit ``CHANGELOG.md`` and add ``## x.y.z`` at the top with a description of the new + version. Take care to keep the formatting and structure of the file intact, as the + release automation relies on it. + +3. Create a release PR + + Create a new pull request that merges ``develop`` into ``main`` and is titled + ``Release x.y.z``. Wait for the checks to run, then check + + - that the release description is what you want (see the comment posted by the + workflow), + - that the documentation rendered correctly on ReadTheDocs (click the RTD check), + - that there are no warnings in the package build (click on the "Build distribution" + check) + + If there are any issues, put more commits onto ``develop`` to fix them; the PR will + update accordingly as you go. + +4. Merge the release PR + + Once happy, merge the PR, and check that the ``do_release`` workflow finished + correctly. Congratulations, you have a release! + diff --git a/docs/source/index.rst b/docs/source/index.rst index e2a32c6..3ac4a22 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -9,6 +9,7 @@ Capsuli :caption: Contents: tutorial + developing Indices and tables ================== From 77fa5d62bb2eb79e8ded2ccb321e672c9cc436cf Mon Sep 17 00:00:00 2001 From: Lourens Veen Date: Thu, 3 Sep 2026 10:03:43 +0200 Subject: [PATCH 3/4] Remove TestPyPI upload --- .github/workflows/do_release.yml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.github/workflows/do_release.yml b/.github/workflows/do_release.yml index 19b6fed..d6f878c 100644 --- a/.github/workflows/do_release.yml +++ b/.github/workflows/do_release.yml @@ -65,28 +65,6 @@ jobs: with: ref: v${{ needs.get-description.outputs.version }} - publish-to-testpypi: - name: Publish to TestPyPI - if: false - needs: [build-python-packages] - runs-on: ubuntu-latest - environment: - name: testpypi - url: https://test.pypi.org/p/capsuli - permissions: - id-token: write - steps: - - name: Download packages - uses: actions/download-artifact@v8 - with: - name: python-package-distributions - path: dist/ - - - name: Publish packages to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - publish-to-pypi: name: Publish to PyPI needs: [build-python-packages] From b8888624588d6ec1d96405853e0657d5b91523ac Mon Sep 17 00:00:00 2001 From: Lourens Veen Date: Thu, 3 Sep 2026 10:17:49 +0200 Subject: [PATCH 4/4] Re-add [docs] deps to fix RTD build --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index d2853f0..15ef371 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,14 @@ dev = [ "sphinx-autoapi", "tox", ] +docs = [ + "myst_parser", + "pytest", + "recommonmark", + "sphinx", + "sphinx_rtd_theme", + "sphinx-autoapi", +] [project.urls] Repository = "https://github.com/NaturalHPC/capsuli"