From 307bd11f1bc2ddc99dabda39f8c9936754f2bb07 Mon Sep 17 00:00:00 2001 From: lochhh Date: Fri, 10 Apr 2026 18:05:10 +0100 Subject: [PATCH 1/4] Define dependency groups for dev and doc --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index a707d60eb..5e454cc1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,6 +59,9 @@ entry-points."napari.manifest".movement = "movement.napari:napari.yaml" [project.optional-dependencies] napari = ["napari[all]>=0.6.0"] + +[dependency-groups] +all = [{include-group = "dev"}, {include-group = "docs"}] dev = [ "pytest", "pytest-cov", From 2ed015028f0e72508b835bcb291dde0bc451a2c7 Mon Sep 17 00:00:00 2001 From: lochhh Date: Fri, 10 Apr 2026 18:45:22 +0100 Subject: [PATCH 2/4] Update installation commands for dev and docs dependencies --- CLAUDE.md | 4 ++-- docs/source/community/contributing.md | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 026e92c6a..d0c33dc7c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -16,7 +16,7 @@ source .venv/bin/activate # On macOS and Linux .venv\Scripts\activate # On Windows PowerShell # Install in editable mode with dev dependencies -uv pip install -e ".[dev]" +uv pip install -e . --group dev # Install pre-commit hooks pre-commit install @@ -61,7 +61,7 @@ mypy movement ### Documentation ```bash # Install documentation dependencies -pip install -e ".[docs]" +uv pip install -e . --group docs # Build documentation (from docs/ directory) cd docs diff --git a/docs/source/community/contributing.md b/docs/source/community/contributing.md index 0d420cfc2..20e5266aa 100644 --- a/docs/source/community/contributing.md +++ b/docs/source/community/contributing.md @@ -76,7 +76,7 @@ Now that you have the repository locally, you need to set up a Python environmen Then, install the package in editable mode with development dependencies: ```sh - pip install -e ".[dev]" + pip install -e . --group dev ``` ::: @@ -93,12 +93,18 @@ Now that you have the repository locally, you need to set up a Python environmen Then, install the package in editable mode with development dependencies: ```sh - uv pip install -e ".[dev]" + uv pip install -e . --group dev ``` ::: :::: - If you also want to edit the documentation and preview the changes locally, you will additionally need the `docs` extra dependencies. See [Editing the documentation](#editing-the-documentation) for more details. + If you also want to [edit the documentation](#editing-the-documentation) and preview the changes locally, you will additionally need the `docs` dependencies. + To install both `dev` and `docs` dependencies at once, use the `all` group: + + ```sh + pip install -e . --group all # conda env + uv pip install -e . --group all # uv env + ``` 2. Finally, initialise the [pre-commit hooks](#formatting-and-pre-commit-hooks): @@ -602,10 +608,10 @@ This keeps the documentation aligned with releases, while allowing manual redepl ### Editing the documentation To edit the documentation, ensure you have already set up a [development environment](#creating-a-development-environment). -To build the documentation locally, install the extra dependencies by running the following command from the repository root: +To build the documentation locally, install the `docs` dependencies by running the following command from the repository root: ```sh -pip install -e ".[docs]" # conda env -uv pip install -e ".[docs]" # uv env +pip install -e . --group docs # conda env +uv pip install -e . --group docs # uv env ``` Now create a new branch, edit the documentation source files (`.md` or `.rst` in the `docs` folder), From 3975c5aeba7ef41c01999da506383ce9e55855b0 Mon Sep 17 00:00:00 2001 From: lochhh Date: Fri, 10 Apr 2026 18:48:20 +0100 Subject: [PATCH 3/4] Configure tox to use dependency_groups in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5e454cc1b..ab4fd39ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -218,7 +218,7 @@ passenv = XAUTHORITY NUMPY_EXPERIMENTAL_ARRAY_FUNCTION PYVISTA_OFF_SCREEN -extras = +dependency_groups = dev commands = pytest -v --color=yes --cov=movement --cov-report=xml From 65a124c9272b2234f262d0fe9b789b5d011fb574 Mon Sep 17 00:00:00 2001 From: lochhh Date: Mon, 13 Apr 2026 17:38:49 +0100 Subject: [PATCH 4/4] Use build_sphinx_docs@build-docs-group-dep --- .github/workflows/docs_build_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_build_and_deploy.yml b/.github/workflows/docs_build_and_deploy.yml index 8b991c5fa..2aaa6e616 100644 --- a/.github/workflows/docs_build_and_deploy.yml +++ b/.github/workflows/docs_build_and_deploy.yml @@ -39,7 +39,7 @@ jobs: ~/.movement/* key: cached-test-data-${{ runner.os }} restore-keys: cached-test-data - - uses: neuroinformatics-unit/actions/build_sphinx_docs@main + - uses: neuroinformatics-unit/actions/build_sphinx_docs@build-docs-group-dep with: python-version: 3.13 use-make: true