Skip to content

Commit

Permalink
Split extra dependencies and dependency groups (#1238)
Browse files Browse the repository at this point in the history
* Split extra dependencies and dependency groups

* Update docs

* Discard changes to CONTRIBUTING.rst

* Use new syntax for dependency groups

* Apply suggestion
  • Loading branch information
fepegar authored Dec 3, 2024
1 parent 08936ff commit 98a79e7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 37 deletions.
12 changes: 5 additions & 7 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ build:
os: ubuntu-22.04
tools:
python: "3.12"

python:
install:
- method: pip
path: .
extra_requirements:
- doc
jobs:
install:
- pip install .
- pip install dependency-groups
- pip-install-dependency-groups doc
64 changes: 34 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,38 +52,9 @@ dependencies = [
csv = [
"pandas",
]
dev = [
"bump2version",
"coverage",
"mypy",
"parameterized",
"pre-commit-uv",
"Pillow",
"pytest",
"pytest-cov",
"pytest-sugar",
"tox-uv",
"types-Deprecated",
]
doc = [
"einops",
"furo",
"matplotlib",
"sphinx",
"sphinx-autobuild",
"sphinx-copybutton",
"sphinx-gallery",
"sphinxext-opengraph",
]
plot = [
"matplotlib",
]
all = [
"torchio[doc]",
"torchio[plot]",
"torchio[csv]",
"torchio[dev]",
]

[project.scripts]
tiohd = "torchio.cli.print_info:app"
Expand All @@ -97,6 +68,40 @@ Source = "https://github.com/fepegar/torchio"
Documentation = "http://torchio.rtfd.io"
"Release notes" = "https://github.com/fepegar/torchio/releases"

[dependency-groups]
dev = [
{ include-group = "doc" },
{ include-group = "maintain" },
{ include-group = "test" },
"ipykernel",
"ruff",
]
doc = [
"einops",
"furo",
"matplotlib",
"sphinx",
"sphinx-autobuild",
"sphinx-copybutton",
"sphinx-gallery",
"sphinxext-opengraph",
]
maintain = [
"bump2version",
"pre-commit-uv",
]
test = [
"coverage",
"mypy",
"parameterized",
"pillow",
"pytest",
"pytest-cov",
"pytest-sugar",
"tox-uv",
"types-deprecated",
]

[tool.mypy]
pretty = true

Expand Down Expand Up @@ -147,6 +152,5 @@ ignore = [
"N813",
]


[tool.ruff.lint.isort]
force-single-line = true

0 comments on commit 98a79e7

Please sign in to comment.