From 045152aa8c5ef82e20e387dbeb14c1e9d08a6a8e Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 28 Oct 2026 08:51:56 +0100 Subject: [PATCH] doc: update developer guide * Remove references to the nonexistent `develop` branch from the release process * Run towncrier via `uv run` * Add instructions for running the unit tests * Use `uv run pre-commit`, since pre-commit is part of the default `dev` dependency group Co-Authored-By: Claude Opus 5.5 --- doc/development.rst | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/doc/development.rst b/doc/development.rst index 1741ea18..992616cc 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -41,7 +41,7 @@ Release process .. code-block:: shell - towncrier build --version X.Y.Z + uv run towncrier build --version X.Y.Z This adds a new section for the release to ``CHANGELOG.md``, and removes the collected fragments (``git rm``). Run with ``--draft`` to only preview @@ -52,8 +52,7 @@ Release process For a new minor version, add a ``## X.Y series`` heading and move the ```` marker below it. -3. Create a pull request with the to-be-released changes to the main branch - (usually from ``develop``). +3. Create a pull request with these changes to ``main``. 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' @@ -64,7 +63,21 @@ Release process 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. +Testing +------- + +To run the unit tests, run: + +.. code-block:: bash + + uv run pytest tests + +Tests for the BNGL import are skipped unless the respective test models +have been downloaded via: + +.. code-block:: bash + + uv run --no-project python -P tests/v1/fetch_bngl_corpus.py Style guide ----------- @@ -72,19 +85,20 @@ Style guide Code style ~~~~~~~~~~ -We use pre-commit with ruff to enforce code style. To install pre-commit and -the pre-commit hooks, run: +We use pre-commit with ruff to enforce code style. +pre-commit is part of the default ``dev`` dependency group. +To install it and the pre-commit hooks, run: .. code-block:: bash - uv tool install pre-commit - pre-commit install + uv sync + uv run 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 + uv run pre-commit run --all-files Documentation style ~~~~~~~~~~~~~~~~~~~