Skip to content

build: relax dependency bounds and support Python 3.10–3.15 - #63

Merged
J-Endres merged 2 commits into
mainfrom
relax-dependencies
Nov 11, 2026
Merged

J-Endres merged 2 commits into
mainfrom
relax-dependencies

Conversation

@J-Endres

Copy link
Copy Markdown
Collaborator

Makes pulseq-zero easier to install alongside other packages. The supported Python range is widened, and every dependency floor is the lowest version that the test suite actually passes on.

Dependency changes

Before After Reason
Python (undeclared, effectively ≥3.11) >=3.10 tested on 3.10 – 3.15
numpy >=2.4.4 >=1.22 np.trapezoid now falls back to np.trapz on numpy 1.x
torch (undeclared) >=2.3 imported directly. Custom autograd.Functions need ≥2.0, and torch <2.3 fails with "Numpy is not available" when installed alongside numpy 2
mrzerocore >=0.4.7 >=1.0.0 (>=1.4.0 on 3.10 and 3.15) <1.0 lacks Pulse.grad / freq_offset / duration. 1.0.2–1.3.0 fail to import on 3.10 (typing.Self). Before 1.4, mrzerocore pulled in h5py, which has no 3.15 wheels
pypulseq >=1.4 >=1.5 to_mr0() fails on 1.4.x, so the README's 1.4 claim was wrong

uv.lock now uses mrzerocore 1.4.0, which no longer pulls in ismrmrd, h5py, scikit-image or torchkbnufft by default. The demos don't use any of them.

Testing

The full suite (67 tests) and the adapter completeness check were run in fresh uv venvs:

Python mrzerocore numpy torch pypulseq Result
3.10 1.4.0 1.22.4 2.3.0 1.5.0 ✅
3.11 1.0.0 1.23.2 2.3.0 1.5.0 ✅
3.11 – 3.15 1.4.0 2.5.4 2.15.0 1.5.0.post1 ✅

Combinations that fail, which is why the bounds are set where they are: torch 1.13, torch 2.0–2.2 with numpy 2, mrzerocore 0.4.x, pypulseq 1.4.x.

CI now runs the oldest allowed dependency versions on 3.10 and 3.11 (uv --resolution lowest-direct) and the newest on 3.15, so a bound that becomes too low makes CI fail. This workflow has not run on GitHub yet, so please check the first run.

The second commit bumps the version to 1.2.0 and adds the changelog entry.

🤖 Generated with Claude Code

Jonathan Endres and others added 2 commits November 11, 2026 11:36
Every lower bound is now verified by running the test suite with
`uv --resolution lowest-direct` instead of being guessed.

- declare requires-python >=3.10 (was missing; numpy>=2.4.4 forced 3.11+)
- numpy >=2.4.4 -> >=1.22; fall back to np.trapz on numpy 1.x
- declare torch >=2.3 (imported directly; <2.3 breaks with numpy 2)
- mrzerocore >=0.4.7 -> >=1.0.0 (older lacks Pulse.grad/freq_offset/duration),
  >=1.4.0 on Python 3.10 (typing.Self) and 3.15 (h5py has no wheels)
- pypulseq >=1.4 -> >=1.5 (to_mr0 fails on 1.4.x)
- upgrade locked mrzerocore to 1.4.0, which drops ismrmrd/h5py/scikit-image
- CI: lowest-direct on 3.10 and 3.11, latest on 3.15
- README: document supported versions; drop stale "no runtime deps" and
  PyPulseq 1.4 claims

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@J-Endres
J-Endres merged commit 97a7e97 into main Nov 11, 2026
6 checks passed
@J-Endres
J-Endres deleted the relax-dependencies branch November 11, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant