Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
share optional dependencies subgroups
Browse files Browse the repository at this point in the history
  • Loading branch information
vreuter committed Apr 14, 2024
1 parent e8b10d1 commit c6199f5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 12 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"}
]
Expand All @@ -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",
]
Expand Down Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit c6199f5

Please sign in to comment.