Skip to content

Commit ade6091

Browse files
authored
Merge pull request #1431 from effigies/ci/py314
chore: Add Python 3.14 tests
2 parents b5ecf48 + f05e505 commit ade6091

File tree

14 files changed

+2456
-92
lines changed

14 files changed

+2456
-92
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,15 @@ jobs:
113113
fail-fast: false
114114
matrix:
115115
os: ['ubuntu-latest', 'windows-latest', 'macos-13', 'macos-latest']
116-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"]
116+
python-version:
117+
- "3.9"
118+
- "3.10"
119+
- "3.11"
120+
- "3.12"
121+
- "3.13"
122+
- "3.13t"
123+
- "3.14"
124+
- "3.14t"
117125
architecture: ['x86', 'x64', 'arm64']
118126
dependencies: ['full', 'pre']
119127
include:
@@ -127,6 +135,11 @@ jobs:
127135
python-version: "3.9"
128136
architecture: 'x64'
129137
dependencies: 'min'
138+
# Absolute minimum dependencies
139+
- os: ubuntu-latest
140+
python-version: "3.10"
141+
architecture: 'x64'
142+
dependencies: 'min'
130143
exclude:
131144
# Use ubuntu-latest to cover the whole range of Python. For Windows
132145
# and OSX, checking oldest and newest should be sufficient.
@@ -217,7 +230,9 @@ jobs:
217230
run: python -c "import sys; print(sys.version)"
218231
- name: Install tox
219232
run: |
220-
uv tool install -v tox --with=git+https://github.com/effigies/tox-gh-actions@abiflags --with=tox-uv
233+
uv tool install -v tox \
234+
--with=tox-uv \
235+
--with=git+https://github.com/effigies/tox-gh-actions@abiflags
221236
- name: Show tox config
222237
run: tox c
223238
- name: Run tox

dev-requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

doc-requirements.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

doc/README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Nibabel documentation
55
To build the documentation, change to the root directory (containing
66
``pyproject.toml``) and run::
77

8-
pip install -r doc-requirements.txt
8+
uv sync --extra doc
9+
source .venv/bin/activate
910
make -C doc html

doc/source/devel/make_release.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,9 @@ Release checklist
6868

6969
because this will be the output used by pypi_
7070

71-
* Check the dependencies listed in ``nibabel/info.py`` (e.g.
72-
``NUMPY_MIN_VERSION``) and in ``doc/source/installation.rst`` and in
73-
``requirements.txt`` and ``.travis.yml``. They should at least match. Do
74-
they still hold? Make sure `nibabel on travis`_ is testing the minimum
71+
* Check the dependencies listed in ``pyproject.toml`` and in
72+
``doc/source/installation.rst``. They should at least match. Do
73+
they still hold? Verify that `nibabel on GitHub actions`_ is testing the minimum
7574
dependencies specifically.
7675

7776
* Do a final check on the `nipy buildbot`_. Use the ``try_branch.py``
@@ -129,7 +128,7 @@ Release checklist
129128

130129
make -C doc doctest
131130

132-
This should also be tested by `nibabel on travis`_.
131+
This should also be tested by `nibabel on GitHub actions`_.
133132

134133
* Check everything compiles without syntax errors::
135134

doc/source/links_names.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
.. _nibabel issues: https://github.com/nipy/nibabel/issues
2121
.. _nibabel github issues: https://github.com/nipy/nibabel/issues
2222
.. _nibabel wiki: https://github.com/nipy/nibabel.wiki
23-
.. _nibabel on travis: https://travis-ci.org/nipy/nibabel
23+
.. _nibabel on github actions: https://github.com/nipy/nibabel/actions
2424

2525
.. other related projects
2626
.. _nipy community: http://nipy.org

min-requirements.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

nibabel/cmdline/tests/test_roi.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
from nibabel.testing import data_path
1010

1111

12+
@pytest.fixture(scope='module', autouse=True)
13+
def NO_COLOR():
14+
with mock.patch.dict(os.environ, {'NO_COLOR': '1'}):
15+
yield
16+
17+
1218
def test_parse_slice():
1319
assert parse_slice(None) == slice(None)
1420
assert parse_slice('1:5') == slice(1, 5)

nibabel/tests/test_viewers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ def test_viewer():
8686

8787
# other cases
8888
fig, axes = plt.subplots(1, 4)
89-
plt.close(fig)
9089
v1 = OrthoSlicer3D(data, axes=axes)
9190
aff = np.array([[0, 1, 0, 3], [-1, 0, 0, 2], [0, 0, 2, 1], [0, 0, 0, 1]], float)
9291
v2 = OrthoSlicer3D(data, affine=aff, axes=axes[:3])
@@ -102,6 +101,7 @@ def test_viewer():
102101
v2.link_to(v1) # shouldn't do anything
103102
v1.close()
104103
v2.close()
104+
plt.close(fig)
105105

106106

107107
@needs_mpl

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ doc = [
7070
"tomli; python_version < '3.11'",
7171
]
7272
test = [
73-
"pytest >=6",
74-
"pytest-doctestplus >=1",
75-
"pytest-cov >=2.11",
73+
"pytest >=8",
74+
"pytest-doctestplus >=1.4",
75+
"pytest-cov >=6",
7676
"pytest-httpserver >=1.0.7",
7777
"pytest-xdist >=3.5",
7878
"coverage[toml]>=7.2",

0 commit comments

Comments
 (0)