File tree Expand file tree Collapse file tree 3 files changed +24
-23
lines changed Expand file tree Collapse file tree 3 files changed +24
-23
lines changed Original file line number Diff line number Diff line change 95
95
run : pip install archive/nibabel-archive.tgz
96
96
- run : python -c 'import nibabel; print(nibabel.__version__)'
97
97
- name : Install minimum test dependencies
98
- run : pip install pytest pytest-doctestplus pytest-xdist
98
+ run : pip install nibabel[test]
99
99
- name : Run tests
100
100
run : pytest --doctest-modules --doctest-plus -v --pyargs nibabel -n auto
101
101
Original file line number Diff line number Diff line change @@ -56,12 +56,26 @@ dicomfs = ["nibabel[dicom]", "pillow"]
56
56
minc2 = [" h5py" ]
57
57
spm = [" scipy" ]
58
58
zstd = [" pyzstd >= 0.14.3" ]
59
- # Dev dependencies: Move to tox, keep aliases to avoid breaking workflows
59
+ # For doc and test, make easy to use outside of tox
60
+ # tox should use these with extras instead of duplicating
61
+ doc = [
62
+ " sphinx" ,
63
+ " matplotlib>=1.5.3" ,
64
+ " numpydoc" ,
65
+ " texext" ,
66
+ " tomli; python_version < '3.11'" ,
67
+ ]
68
+ test = [
69
+ " pytest" ,
70
+ " pytest-doctestplus" ,
71
+ " pytest-cov" ,
72
+ " pytest-httpserver" ,
73
+ " pytest-xdist" ,
74
+ ]
75
+ # Remaining: Simpler to centralize in tox
60
76
dev = [" tox" ]
61
- doc = [" tox" ]
62
77
doctest = [" tox" ]
63
78
style = [" tox" ]
64
- test = [" tox" ]
65
79
typing = [" tox" ]
66
80
67
81
[tool .hatch .build .targets .sdist ]
Original file line number Diff line number Diff line change @@ -50,12 +50,8 @@ pass_env =
50
50
USER
51
51
LNAME
52
52
USERNAME
53
+ extras = test
53
54
deps =
54
- pytest
55
- pytest-doctestplus
56
- pytest-cov
57
- pytest-httpserver
58
- pytest-xdist
59
55
# NEP29/SPEC0 + 1yr: Test on minor release series within the last 3 years
60
56
# We're extending this to all optional dependencies
61
57
# This only affects the range that we test on; numpy is the only non-optional
@@ -98,6 +94,7 @@ commands =
98
94
description = " Install and verify imports succeed"
99
95
labels = test
100
96
deps =
97
+ extras =
101
98
install_command = python -I -m pip install {opts} {packages}
102
99
commands =
103
100
python -c " import nibabel; print(nibabel.__version__)"
@@ -106,27 +103,17 @@ commands =
106
103
description = Typical pytest invocation with coverage
107
104
labels = docs
108
105
allowlist_externals = make
109
- deps =
110
- sphinx
111
- matplotlib>=1.5.3
112
- numpydoc
113
- texext
114
- tomli; python_version < "3.11"
106
+ extras = doc
115
107
commands =
116
108
make -C doc html
117
109
118
110
[testenv:doctest]
119
111
description = Typical pytest invocation with coverage
120
112
labels = docs
121
113
allowlist_externals = make
122
- depends = docs
123
- deps =
124
- sphinx
125
- pytest
126
- matplotlib>=1.5.3
127
- numpydoc
128
- texext
129
- tomli; python_version < "3.11"
114
+ extras =
115
+ doc
116
+ test
130
117
commands =
131
118
make -C doc doctest
132
119
You can’t perform that action at this time.
0 commit comments