Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,16 @@ updates:
actions-infrastructure:
patterns:
- "actions/*"
cooldown:
default-days: 14
- package-ecosystem: uv
directory: "/"
labels: ["dependencies"]
schedule:
interval: monthly
groups:
python:
patterns:
- "*"
cooldown:
default-days: 14
26 changes: 17 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ dicomfs = ["nibabel[dicom]", "pillow >=8.4"]
minc2 = ["h5py >=3.5"]
spm = ["scipy >=1.8"]
viewers = ["matplotlib >=3.5"]
zstd = ["backports.zstd; python_version<'3.14'"]
zstd = ["backports.zstd >=1.1; python_version<'3.14'"]
# For doc and test, make easy to use outside of tox
# tox should use these with extras instead of duplicating
doc = [
"sphinx",
"sphinx >=7.4",
"matplotlib>=3.5",
"numpydoc",
"texext",
"tomli; python_version < '3.11'",
"numpydoc >=1.9",
"texext >=0.6.8",
"tomli >=2.3; python_version < '3.11'",
]
test = [
"pytest >=8",
Expand All @@ -77,10 +77,18 @@ test = [
"coverage[toml]>=7.2",
]
# Remaining: Simpler to centralize in tox
dev = ["tox"]
doctest = ["tox"]
style = ["tox"]
typing = ["tox"]
dev = []
doctest = []
style = []
typing = []

[dependency-groups]
style = [
"ruff >=0.14.0",
]
typecheck = [
"mypy >=1.15",
]

[tool.hatch.build.targets.sdist]
exclude = [
Expand Down
43 changes: 16 additions & 27 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ commands =
--durations=20 --durations-min=1.0 \
--pyargs nibabel {posargs:-n auto}

[testenv:py3{9,10,11,12,13,13t,14,14t}-full-{x,arm}64]
[testenv:py3{9,10,11,12,13,13t,14,14t}-{full,none}-{x,arm}64]
runner = uv-venv-lock-runner

[testenv:install]
Expand All @@ -131,32 +131,26 @@ commands =
[testenv:doctest]
description = Run doctests in documentation site
labels = docs
runner = uv-venv-lock-runner
allowlist_externals = make
extras =
doc
test
commands =
make -C doc doctest

[testenv:style]
[testenv:style{,-fix}]
description = Check our style guide
labels = check
deps =
ruff>=0.3.0
skip_install = true
commands =
ruff check --diff nibabel
ruff format --diff nibabel

[testenv:style-fix]
description = Auto-apply style guide to the extent possible
labels = pre-release
deps =
ruff
runner = uv-venv-lock-runner
dependency_groups =
style
skip_install = true
commands =
ruff check --fix nibabel
ruff format nibabel
!fix: ruff check --diff nibabel
!fix: ruff format --diff nibabel
fix: ruff check --fix nibabel
fix: ruff format nibabel

[testenv:spellcheck]
description = Check spelling
Expand All @@ -170,17 +164,12 @@ commands =
[testenv:typecheck]
description = Check type consistency
labels = check
deps =
mypy
pytest
types-setuptools
types-Pillow
pydicom
numpy
backports.zstd
importlib_resources
typing_extensions
skip_install = true
runner = uv-venv-lock-runner
dependency_groups =
typecheck
extras =
all
test
commands =
mypy nibabel

Expand Down
Loading