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] 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 ================== 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" 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")