Skip to content

Commit

Permalink
MNT: Update support matrix for Python and numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 8, 2024
1 parent 8aa89c9 commit 1c49074
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 37 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,17 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-13', 'macos-latest']
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
architecture: ['x64', 'x86', 'arm64']
dependencies: ['full', 'pre']
include:
# Basic dependencies only
- os: ubuntu-latest
python-version: 3.8
python-version: 3.9
dependencies: 'none'
# Absolute minimum dependencies
- os: ubuntu-latest
python-version: 3.8
python-version: 3.9
dependencies: 'min'
# NoGIL
- os: ubuntu-latest
Expand Down Expand Up @@ -153,10 +153,10 @@ jobs:
- os: macos-13
dependencies: pre
# Drop pre tests for SPEC-0-unsupported Python versions
- python-version: '3.8'
dependencies: pre
- python-version: '3.9'
dependencies: pre
- python-version: '3.10'
dependencies: pre

env:
DEPENDS: ${{ matrix.dependencies }}
Expand Down
16 changes: 8 additions & 8 deletions doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ is for you.
Requirements
------------

.. check these against pyproject.toml
.. check these against pyproject.toml / tox.ini
* Python_ 3.8 or greater
* NumPy_ 1.20 or greater
* Python_ 3.9 or greater
* NumPy_ 1.22 or greater
* Packaging_ 17.0 or greater
* importlib-resources_ 1.3 or greater (or Python 3.9+)
* SciPy_ (optional, for full SPM-ANALYZE support)
* h5py_ (optional, for MINC2 support)
* PyDICOM_ 1.0.0 or greater (optional, for DICOM support)
* `Python Imaging Library`_ (optional, for PNG conversion in DICOMFS)
* importlib-resources_ 5.12 or greater (or Python 3.12+)
* SciPy_ 1.8 or greater (optional, for full SPM-ANALYZE support)
* h5py_ 3.5 or greater (optional, for MINC2 support)
* PyDICOM_ 2.3.0 or greater (optional, for DICOM support)
* `Python Imaging Library`_ 8.4 or greater (optional, for PNG conversion in DICOMFS)
* pytest_ (optional, to run the tests)
* sphinx_ (optional, to build the documentation)

Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ authors = [{ name = "NiBabel developers", email = "[email protected]" }]
maintainers = [{ name = "Christopher Markiewicz" }]
readme = "README.rst"
license = { text = "MIT License" }
requires-python = ">=3.8"
requires-python = ">=3.9"
dependencies = [
"numpy >=1.20",
"numpy >=1.22",
"packaging >=17",
"importlib_resources >=5.12; python_version < '3.12'",
"typing_extensions >=4.6; python_version < '3.13'",
Expand All @@ -23,11 +23,11 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
]
# Version from setuptools_scm
Expand All @@ -53,7 +53,7 @@ parrec2nii = "nibabel.cmdline.parrec2nii:main"
[project.optional-dependencies]
all = ["nibabel[dicomfs,minc2,spm,zstd]"]
# Features
dicom = ["pydicom >=1.0.0"]
dicom = ["pydicom >=2.3"]
dicomfs = ["nibabel[dicom]", "pillow"]
minc2 = ["h5py"]
spm = ["scipy"]
Expand Down
38 changes: 18 additions & 20 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ requires =
tox>=4
envlist =
# No preinstallations
py3{8,9,10,11,12}-none
py3{9,10,11,12,13}-none
# Minimum Python
py38-{min,full}
py39-{min,full}
# x86 support range
py3{9,10,11}-{full,pre}-{x86,x64}
py3{9,10,11}-pre-{x86,x64}
# x64-only range
py312-{full,pre}-x64
py3{12,13}-{full,pre}-x64
# Special environment for numpy 2.0-dev testing
py313-dev-x64
install
Expand All @@ -26,7 +26,6 @@ skip_missing_interpreters = true
# Configuration that allows us to split tests across GitHub runners effectively
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
Expand Down Expand Up @@ -83,28 +82,27 @@ deps =
# We're extending this to all optional dependencies
# This only affects the range that we test on; numpy is the only non-optional
# dependency, and will be the only one to affect pip environment resolution.
min: numpy ==1.20
min: h5py ==2.10
min: indexed_gzip ==1.4
min: matplotlib ==3.4
min: pillow ==8.1
min: pydicom ==2.1
min: pyzstd ==0.14.3
min: scipy ==1.6
min: numpy ==1.22
min: h5py ==3.5
min: indexed_gzip ==1.6
min: matplotlib ==3.5
min: pillow ==8.4
min: pydicom ==2.3
min: pyzstd ==0.15.2
min: scipy ==1.8
# Numpy 2.0 is a major breaking release; we cannot put much effort into
# supporting until it's at least RC stable
pre: numpy <2.0.dev0
dev: numpy >=2.1.dev0
# Scipy stopped producing win32 wheels at py310
py3{8,9}-full-x86,x64,arm64: scipy >=1.6
py39-full-x86,x64,arm64: scipy >=1.8
# Matplotlib depends on scipy, so cannot be built for py310 on x86
py3{8,9}-full-x86,x64,arm64: matplotlib >=3.4
py39-full-x86,x64,arm64: matplotlib >=3.5
# h5py stopped producing win32 wheels at py39
py38-full-x86,{full,pre}-{x64,arm64}: h5py >=2.10
full,pre,dev: pillow >=8.1
full,pre: indexed_gzip >=1.4
full,pre,dev: pyzstd >=0.14.3
full,pre: pydicom >=2.1
{full,pre}-{x64,arm64}: h5py >=3.5
full,pre,dev: pillow >=8.4
full,pre: indexed_gzip >=1.6
full,pre,dev: pyzstd >=0.15.2
full,pre: pydicom >=2.3
dev: pydicom @ git+https://github.com/pydicom/pydicom.git@main

commands =
Expand Down

0 comments on commit 1c49074

Please sign in to comment.