From c6199f534b66be9942ff2aaf7b1e63eabb300a2c Mon Sep 17 00:00:00 2001 From: Vince Reuter Date: Sun, 14 Apr 2024 04:44:31 +0200 Subject: [PATCH] share optional dependencies subgroups --- .github/workflows/tests.yaml | 2 +- pyproject.toml | 14 ++++++++++++-- shell.nix | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 52a1825..209f836 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -18,6 +18,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install project - run: python -m pip install .[test] + run: python -m pip install .[testsuite] - name: Run unit tests on Python ${{ matrix.python-version }} on ${{ matrix.os }} run: pytest tests -vv --cov=./ --cov-report=xml diff --git a/pyproject.toml b/pyproject.toml index 21e01c8..103a8c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "looptrace-napari" dynamic = ["version"] -requires-python = ">= 3.10, < 3.12" +requires-python = ">= 3.10, <= 3.12" authors = [ {name = "Vince Reuter"} ] @@ -14,6 +14,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Bio-Informatics", "Typing :: Typed", ] @@ -47,16 +48,25 @@ version = { attr = "looptrace_napari.__version__" } looptrace-napari = "looptrace_napari:napari.yaml" [project.optional-dependencies] -test = [ +formatting = [ "black[colorama] >= 24.1", "codespell >= 2.2.4", "isort >= 5.10", +] +linting = [ "mypy >= 1.0.1", "pandas-stubs", "pylint >= 3", +] +testsuite = [ "pytest >= 7.1.0", "pytest-cov", ] +testall = [ + "looptrace-napari[formatting]", + "looptrace-napari[linting]", + "looptrace-napari[testsuite]", +] [tool.black] enable-unstable-feature = [ diff --git a/shell.nix b/shell.nix index 14c52cd..7e70c94 100644 --- a/shell.nix +++ b/shell.nix @@ -7,7 +7,7 @@ }: let pyenv = pkgs.python311.withPackages (pp: with pp; [ pip wheel ]); - pipInstallExtras = if dev then "\"[test]\"" else ""; + pipInstallExtras = if dev then "\"[testall]\"" else ""; in pkgs.mkShell { name = "looptrace-napari-env";