From ee0d628d521f925cc7e5355fae25bec10d651c36 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Tue, 3 Mar 2026 21:06:58 +0100 Subject: [PATCH 1/2] PEP 735 compliance --- .github/workflows/docker_build.jinja | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/pull-request.yml | 2 +- README.md | 2 +- pyproject.toml | 27 +++++++++++++++++++++++++++ 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker_build.jinja b/.github/workflows/docker_build.jinja index 940d5946..bac8308d 100644 --- a/.github/workflows/docker_build.jinja +++ b/.github/workflows/docker_build.jinja @@ -38,7 +38,7 @@ jobs: python-version: "3.11" - name: Install neurodocker - run: python -m pip install --editable .[dev] + run: python -m pip install --editable . --group dev - name: Generate Dockerfile run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5bd88d51..9dd72efa 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,7 @@ jobs: with: python-version: '3.10' - name: Install neurodocker - run: python -m pip install --editable .[all] + run: python -m pip install --editable . --group all - name: build docs run: | make -C docs cli diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index d30341ff..0a770e16 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -38,7 +38,7 @@ jobs: python-version: ${{ matrix.python-version }} allow-prereleases: true - name: Install neurodocker - run: python -m pip install --editable .[dev] + run: python -m pip install --editable . --group dev - name: Run python tests run: pytest --numprocesses auto - name: Get code coverage diff --git a/README.md b/README.md index d3d2594d..19145f29 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Clone the repository and install in editable mode. ``` git clone https://github.com/ReproNim/neurodocker cd neurodocker -python -m pip install --no-cache-dir --editable .[all] +python -m pip install --no-cache-dir --editable . --group all ``` Before committing changes, initialize `prek` with `prek install`, or `pre-commit` with `pre-commit install`. This will format code with each commit to keep the style consistent. _Neurodocker_ uses `ruff` for formatting. diff --git a/pyproject.toml b/pyproject.toml index 7ee3e435..ebc9bd2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,33 @@ build-backend = "hatchling.build" requires = ["hatchling>=1.27.0", "hatch-vcs"] +[dependency-groups] +all = [ + {include-group = "dev"}, + {include-group = "doc"}, + {include-group = "minify"} +] +dev = [ + {include-group = "minify"}, + "codecov", + "coverage[toml]", + "mypy", + "pre-commit", + "pytest >= 6.0", + "pytest-cov >= 2.0.0", + "pytest-reportlog >= 0.1.2", + "pytest-xdist >= 2.2.0", + "types-PyYAML" +] +doc = [ + "sphinx <7", + "pydata-sphinx-theme >= 0.13", + "sphinxcontrib.apidoc >= 0.3" +] +minify = [ + "docker >= 4.4.1" +] + [project] authors = [{name = "Neurodocker Developers"}] classifiers = [ From f886d20b33549e1df7d4d145b7b1eb0b1ea5d894 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Tue, 24 Mar 2026 21:30:00 +0100 Subject: [PATCH 2/2] Rename dependency groups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dev → test all → dev --- .github/workflows/docker_build.jinja | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/pull-request.yml | 2 +- README.md | 2 +- pyproject.toml | 24 ++++++++++++------------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docker_build.jinja b/.github/workflows/docker_build.jinja index bac8308d..fe04146e 100644 --- a/.github/workflows/docker_build.jinja +++ b/.github/workflows/docker_build.jinja @@ -38,7 +38,7 @@ jobs: python-version: "3.11" - name: Install neurodocker - run: python -m pip install --editable . --group dev + run: python -m pip install --editable . --group test - name: Generate Dockerfile run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9dd72efa..ad872586 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,7 @@ jobs: with: python-version: '3.10' - name: Install neurodocker - run: python -m pip install --editable . --group all + run: python -m pip install --editable . --group doc - name: build docs run: | make -C docs cli diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0a770e16..7f69f455 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -38,7 +38,7 @@ jobs: python-version: ${{ matrix.python-version }} allow-prereleases: true - name: Install neurodocker - run: python -m pip install --editable . --group dev + run: python -m pip install --editable . --group test - name: Run python tests run: pytest --numprocesses auto - name: Get code coverage diff --git a/README.md b/README.md index 19145f29..dfb20c51 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Clone the repository and install in editable mode. ``` git clone https://github.com/ReproNim/neurodocker cd neurodocker -python -m pip install --no-cache-dir --editable . --group all +python -m pip install --no-cache-dir --editable . --group dev ``` Before committing changes, initialize `prek` with `prek install`, or `pre-commit` with `pre-commit install`. This will format code with each commit to keep the style consistent. _Neurodocker_ uses `ruff` for formatting. diff --git a/pyproject.toml b/pyproject.toml index ebc9bd2e..35bc02a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,12 +3,20 @@ build-backend = "hatchling.build" requires = ["hatchling>=1.27.0", "hatch-vcs"] [dependency-groups] -all = [ - {include-group = "dev"}, +dev = [ {include-group = "doc"}, - {include-group = "minify"} + {include-group = "minify"}, + {include-group = "test"} ] -dev = [ +doc = [ + "sphinx <7", + "pydata-sphinx-theme >= 0.13", + "sphinxcontrib.apidoc >= 0.3" +] +minify = [ + "docker >= 4.4.1" +] +test = [ {include-group = "minify"}, "codecov", "coverage[toml]", @@ -20,14 +28,6 @@ dev = [ "pytest-xdist >= 2.2.0", "types-PyYAML" ] -doc = [ - "sphinx <7", - "pydata-sphinx-theme >= 0.13", - "sphinxcontrib.apidoc >= 0.3" -] -minify = [ - "docker >= 4.4.1" -] [project] authors = [{name = "Neurodocker Developers"}]