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
19 changes: 17 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,15 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-13', 'macos-latest']
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"]
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.13t"
- "3.14"
- "3.14t"
architecture: ['x86', 'x64', 'arm64']
dependencies: ['full', 'pre']
include:
Expand All @@ -127,6 +135,11 @@ jobs:
python-version: "3.9"
architecture: 'x64'
dependencies: 'min'
# Absolute minimum dependencies
- os: ubuntu-latest
python-version: "3.10"
architecture: 'x64'
dependencies: 'min'
exclude:
# Use ubuntu-latest to cover the whole range of Python. For Windows
# and OSX, checking oldest and newest should be sufficient.
Expand Down Expand Up @@ -217,7 +230,9 @@ jobs:
run: python -c "import sys; print(sys.version)"
- name: Install tox
run: |
uv tool install -v tox --with=git+https://github.com/effigies/tox-gh-actions@abiflags --with=tox-uv
uv tool install -v tox \
--with=tox-uv \
--with=git+https://github.com/effigies/tox-gh-actions@abiflags
- name: Show tox config
run: tox c
- name: Run tox
Expand Down
3 changes: 0 additions & 3 deletions dev-requirements.txt

This file was deleted.

7 changes: 0 additions & 7 deletions doc-requirements.txt

This file was deleted.

3 changes: 2 additions & 1 deletion doc/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ Nibabel documentation
To build the documentation, change to the root directory (containing
``pyproject.toml``) and run::

pip install -r doc-requirements.txt
uv sync --extra doc
source .venv/bin/activate
make -C doc html
9 changes: 4 additions & 5 deletions doc/source/devel/make_release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ Release checklist

because this will be the output used by pypi_

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

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

make -C doc doctest

This should also be tested by `nibabel on travis`_.
This should also be tested by `nibabel on GitHub actions`_.

* Check everything compiles without syntax errors::

Expand Down
2 changes: 1 addition & 1 deletion doc/source/links_names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
.. _nibabel issues: https://github.com/nipy/nibabel/issues
.. _nibabel github issues: https://github.com/nipy/nibabel/issues
.. _nibabel wiki: https://github.com/nipy/nibabel.wiki
.. _nibabel on travis: https://travis-ci.org/nipy/nibabel
.. _nibabel on github actions: https://github.com/nipy/nibabel/actions

.. other related projects
.. _nipy community: http://nipy.org
Expand Down
16 changes: 0 additions & 16 deletions min-requirements.txt

This file was deleted.

6 changes: 6 additions & 0 deletions nibabel/cmdline/tests/test_roi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
from nibabel.testing import data_path


@pytest.fixture(scope='module', autouse=True)
def NO_COLOR():
with mock.patch.dict(os.environ, {'NO_COLOR': '1'}):
yield


def test_parse_slice():
assert parse_slice(None) == slice(None)
assert parse_slice('1:5') == slice(1, 5)
Expand Down
2 changes: 1 addition & 1 deletion nibabel/tests/test_viewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def test_viewer():

# other cases
fig, axes = plt.subplots(1, 4)
plt.close(fig)
v1 = OrthoSlicer3D(data, axes=axes)
aff = np.array([[0, 1, 0, 3], [-1, 0, 0, 2], [0, 0, 2, 1], [0, 0, 0, 1]], float)
v2 = OrthoSlicer3D(data, affine=aff, axes=axes[:3])
Expand All @@ -102,6 +101,7 @@ def test_viewer():
v2.link_to(v1) # shouldn't do anything
v1.close()
v2.close()
plt.close(fig)


@needs_mpl
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ doc = [
"tomli; python_version < '3.11'",
]
test = [
"pytest >=6",
"pytest-doctestplus >=1",
"pytest-cov >=2.11",
"pytest >=8",
"pytest-doctestplus >=1.4",
"pytest-cov >=6",
"pytest-httpserver >=1.0.7",
"pytest-xdist >=3.5",
"coverage[toml]>=7.2",
Expand Down
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

40 changes: 0 additions & 40 deletions tools/update_requirements.py

This file was deleted.

22 changes: 14 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ envlist =
# No preinstallations
py3{9,10,11,12,13,13t}-none
# Minimum Python with minimum deps
py39-min
py3{9,10}-min
# Run full and pre dependencies against all archs
py3{9,10,11,12,13,13t}-{full,pre}-{x86,x64,arm64}
# Python development versions
py3{14,14t}-pre-{x64,arm64}
install
doctest
style
Expand All @@ -28,6 +30,8 @@ python =
3.12: py312
3.13: py313
3.13t: py313t
3.14: py314
3.14t: py314t

[gh-actions:env]
DEPENDS =
Expand Down Expand Up @@ -66,7 +70,7 @@ set_env =
pre: PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
pre: UV_INDEX=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
pre: UV_INDEX_STRATEGY=unsafe-best-match
py313t: PYTHONGIL={env:PYTHONGIL:0}
py3{13,14}t: PYTHONGIL={env:PYTHONGIL:0}
extras =
test

Expand All @@ -82,15 +86,14 @@ extras =

# Matplotlib has wheels for everything except win32 (x86)
{full,pre}-{x,arm}64: viewers
# No free-threaded wheels for: zstd
py3{9,10,11,12,13,14}-{full,pre}-{x,arm}64: zstd

# Nightly, but not released cp313t wheels for: scipy
# When released, remove the py3* line and add full to the pre line
py3{9,10,11,12,13}-full-{x,arm}64: spm
pre-{x,arm}64: spm
{full,pre}-{x,arm}64: spm

# No cp313t wheels for: h5py, pyzstd
# No free-threaded wheels for: h5py
py3{9,10,11,12,13}-{full,pre}-{x,arm}64: minc2
py3{9,10,11,12,13}-{full,pre}-{x,arm}64: zstd
py314-pre-{x,arm}64: minc2

# win32 (x86) wheels still exist for scipy+py39
py39-full-x86: spm
Expand All @@ -108,6 +111,9 @@ 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]
runner = uv-venv-lock-runner

[testenv:install]
description = Install and verify import succeeds
labels = test
Expand Down
Loading
Loading