Skip to content

Commit 0f61bcb

Browse files
authored
Merge pull request #1447 from effigies/chore/lock-envs
chore(tox): Use lock runners for more tests
2 parents 2c7fa7c + 141e1d9 commit 0f61bcb

File tree

4 files changed

+1331
-735
lines changed

4 files changed

+1331
-735
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,16 @@ updates:
88
actions-infrastructure:
99
patterns:
1010
- "actions/*"
11+
cooldown:
12+
default-days: 14
13+
- package-ecosystem: uv
14+
directory: "/"
15+
labels: ["dependencies"]
16+
schedule:
17+
interval: monthly
18+
groups:
19+
python:
20+
patterns:
21+
- "*"
22+
cooldown:
23+
default-days: 14

pyproject.toml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ dicomfs = ["nibabel[dicom]", "pillow >=8.4"]
5858
minc2 = ["h5py >=3.5"]
5959
spm = ["scipy >=1.8"]
6060
viewers = ["matplotlib >=3.5"]
61-
zstd = ["backports.zstd; python_version<'3.14'"]
61+
zstd = ["backports.zstd >=1.1; python_version<'3.14'"]
6262
# For doc and test, make easy to use outside of tox
6363
# tox should use these with extras instead of duplicating
6464
doc = [
65-
"sphinx",
65+
"sphinx >=7.4",
6666
"matplotlib>=3.5",
67-
"numpydoc",
68-
"texext",
69-
"tomli; python_version < '3.11'",
67+
"numpydoc >=1.9",
68+
"texext >=0.6.8",
69+
"tomli >=2.3; python_version < '3.11'",
7070
]
7171
test = [
7272
"pytest >=8",
@@ -77,10 +77,18 @@ test = [
7777
"coverage[toml]>=7.2",
7878
]
7979
# Remaining: Simpler to centralize in tox
80-
dev = ["tox"]
81-
doctest = ["tox"]
82-
style = ["tox"]
83-
typing = ["tox"]
80+
dev = []
81+
doctest = []
82+
style = []
83+
typing = []
84+
85+
[dependency-groups]
86+
style = [
87+
"ruff >=0.14.0",
88+
]
89+
typecheck = [
90+
"mypy >=1.15",
91+
]
8492

8593
[tool.hatch.build.targets.sdist]
8694
exclude = [

tox.ini

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ commands =
109109
--durations=20 --durations-min=1.0 \
110110
--pyargs nibabel {posargs:-n auto}
111111

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

115115
[testenv:install]
@@ -131,32 +131,26 @@ commands =
131131
[testenv:doctest]
132132
description = Run doctests in documentation site
133133
labels = docs
134+
runner = uv-venv-lock-runner
134135
allowlist_externals = make
135136
extras =
136137
doc
137138
test
138139
commands =
139140
make -C doc doctest
140141

141-
[testenv:style]
142+
[testenv:style{,-fix}]
142143
description = Check our style guide
143144
labels = check
144-
deps =
145-
ruff>=0.3.0
146-
skip_install = true
147-
commands =
148-
ruff check --diff nibabel
149-
ruff format --diff nibabel
150-
151-
[testenv:style-fix]
152-
description = Auto-apply style guide to the extent possible
153-
labels = pre-release
154-
deps =
155-
ruff
145+
runner = uv-venv-lock-runner
146+
dependency_groups =
147+
style
156148
skip_install = true
157149
commands =
158-
ruff check --fix nibabel
159-
ruff format nibabel
150+
!fix: ruff check --diff nibabel
151+
!fix: ruff format --diff nibabel
152+
fix: ruff check --fix nibabel
153+
fix: ruff format nibabel
160154

161155
[testenv:spellcheck]
162156
description = Check spelling
@@ -170,17 +164,12 @@ commands =
170164
[testenv:typecheck]
171165
description = Check type consistency
172166
labels = check
173-
deps =
174-
mypy
175-
pytest
176-
types-setuptools
177-
types-Pillow
178-
pydicom
179-
numpy
180-
backports.zstd
181-
importlib_resources
182-
typing_extensions
183-
skip_install = true
167+
runner = uv-venv-lock-runner
168+
dependency_groups =
169+
typecheck
170+
extras =
171+
all
172+
test
184173
commands =
185174
mypy nibabel
186175

0 commit comments

Comments
 (0)