Skip to content

docs: drop the defunct pynufft and pylops from the source-install requirements - #107

Merged
Jammy2211 merged 3 commits into
mainfrom
feature/pynufft-removal-phase-3
Aug 24, 2026
Merged

docs: drop the defunct pynufft and pylops from the source-install requirements#107
Jammy2211 merged 3 commits into
mainfrom
feature/pynufft-removal-phase-3

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Part of PyAutoLabs/PyAutoHands#258 (phase 3 of 3 of the pynufft-removal residue sweep — this is the PyAutoCTI leg; PyAutoHands and PyAutoHeart carry their own PRs, and the three are independent).

What changed

docs/installation/source.rst told users, under "For unit tests to pass you will also need the following optional requirements":

pip install pynufft
pip install pylops==1.11.1

Neither is needed. The whole stanza is gone from the Building Only PyAutoCTI section — the sentence and its code-block go together, since leaving the heading with an empty code-block would be invalid RST.

  • pynufft is no longer a dependency of any PyAuto library: PyAutoArray#475 deleted TransformerNUFFTPyNUFFT and dropped pynufft from both optional and dev.
  • pylops is defunct (confirmed by the maintainer on this task).

Verified, not assumed

The prompt for this task specifically asked that PyAutoCTI's suite be confirmed to pass without pynufft before the line came out. The same evidence covers pylops:

  • .github/workflows/main.yml is a thin caller of PyAutoHeart's reusable lib-tests.yml, which installs ./PyAutoCTI[optional] plus the PyAutoNerves/PyAutoFit/PyAutoArray chain and installs neither pynufft nor pylops — in either the unittest leg or the unittest-nojax leg.
  • pyproject.toml's optional extra is ["numba"].
  • The last green main run of that workflow (31134701968) is success on every leg — 3.12, 3.13, and unittest-nojax.
  • Full-tree greps find pynufft only in paper/paper.bib, files/citations.tex and the deleted line; pylops only in paper/paper.bib and the deleted line. No import, no test, no config.

About the red CI on this PR

It is not this change — the diff is documentation only. test_serial_eper.py::test__region_list_from__array_2d_list_from fails on main too, because lib-tests.yml clones PyAutoArray main and PyAutoArray#440's zero-length shape_native guard (2026-08-09, after this repo's last main run on 2026-08-07) now rejects a degenerate (3, 0) region the test builds from an out-of-range pixels window. Full analysis in this comment; tracked separately so it does not widen a docs PR.

Deliberately out of scope

  • paper/paper.bib and files/citations.tex — published-record material; the parent task made that call explicitly.
  • The Building All Projects section still says pip install -r PyAutoArray/optional_requirements.txt, and the prose above points at PyAutoCTI/requirements.txt — neither file exists any more (packaging moved to pyproject.toml extras). Separate doc rot, separate task.

The install doc told users to `pip install pynufft` "for unit tests to pass".
pynufft is no longer a dependency of any PyAuto library (PyAutoArray#475
deleted TransformerNUFFTPyNUFFT and dropped pynufft from both `optional` and
`dev`), and PyAutoCTI's suite does not need it. Verified rather than assumed:

- .github/workflows/main.yml calls PyAutoHeart's reusable lib-tests.yml, which
  installs ./PyAutoCTI[optional] plus the Nerves/Fit/Array chain and never
  installs pynufft in either leg.
- pyproject.toml's `optional` extra is ["numba"] — pynufft is not in it.
- The latest main run of that workflow is green on every leg: unittest on
  Python 3.12 and 3.13, plus the unittest-nojax leg.
- A full-tree grep finds pynufft only in paper/paper.bib and
  files/citations.tex (published-record material, deliberately out of scope)
  and in this line — no import, no test, no config.

Phase 3 of 3 of the pynufft-removal residue sweep (PyAutoHands#258).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7kFdoYcD6wnTifNXV5T98

Copy link
Copy Markdown
Collaborator Author

CI is red on all three legs (3.12, 3.13, no-jax), and it is not this PR: the diff is a single deleted line in docs/installation/source.rst, and the run executed on the PR merge ref — so the same failure is on main today.

FAILED test_autocti/extract/two_d/serial/test_serial_eper.py::test__region_list_from__array_2d_list_from
  autoarray.exc.MaskException: shape_native[1] must be a positive number of pixels;
  got 0. The full shape_native input was (3, 0)
1 failed, 270 passed

What is actually failing

lib-tests.yml clones PyAutoArray main at run time, so this repo's suite tracks autoarray's current source. PyAutoArray#440 (merged f2f7a4f, 2026-08-09) added the zero-length shape_native guard in Mask2D.__init__ — one of the input-validation guards from #333/B8. This repo's last main run was 2026-08-07 (run 31134701968, green), so the break has simply been dormant: nothing has pushed here since the guard landed.

The guard is doing its job — it exposed an assertion that was passing vacuously:

extract = ac.Extract2DSerialEPER(region_list=[(0, 3, 1, 4), (0, 3, 5, 8)])
array_2d_list = extract.array_2d_list_from(
    array=serial_array, settings=ac.SettingsExtract(pixels=(2, 3))
)
assert (array_2d_list[1] == np.array([[10.0], [10.0], [10.0]])).all()

serial_array is 3×10 (columns 0–9, values 0–9). For region (0, 3, 5, 8), serial_trailing_region_from(pixels=(2, 3)) yields (0, 3, 10, 11) — a window entirely past the right edge of the array. The slice was therefore (3, 0), empty, and (empty_array == [[10.0], ...]).all() is vacuously True on an empty comparison. The value 10.0 does not exist anywhere in the fixture, which is the tell. Now autoarray refuses to build the degenerate structure and it raises instead.

Proposed patch (not in this PR — it is unrelated and would widen a docs change)

Either:

  1. Fix the test — use an in-range window for the second region and assert the real values, deleting the == [[10.0], ...] line that never checked anything; or
  2. Clip in the extractor — if extracting past the array edge is meant to be supported, have serial_trailing_region_from / array_2d_list_from clip to the array bounds and have the test assert the clipped shape explicitly.

(2) is a behaviour decision about what an out-of-range pixels window should mean, so it wants a human call rather than my guess. Worth checking whether the parallel-EPER siblings carry the same vacuous pattern while fixing it.

Filed in PyAutoMind as draft/bug/autocti/serial_eper_zero_width_region_vs_autoarray_guard.md.

The docs change here stands on its own — and CTI's suite passing without pynufft is unaffected by this failure (270 of 271 tests pass, and the one that fails is a mask-shape guard, nothing to do with NUFFT).


Generated by Claude Code

Removes the whole "For unit tests to pass you will also need the following
optional requirements" stanza from the Building-Only-PyAutoCTI section: with
pynufft gone in the previous commit, `pip install pylops==1.11.1` was the only
line left, and pylops is defunct.

Same evidence as for pynufft: nothing in this repo imports or references pylops
(the only other hit is paper/paper.bib, a published record), pyproject's
`optional` extra is ["numba"], and CI installs no pylops while 270 of 271 tests
pass — the single failure is an unrelated autoarray mask-shape guard on main.

The sentence and its code-block go together; leaving the heading with an empty
code-block would be invalid RST.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7kFdoYcD6wnTifNXV5T98
@Jammy2211 Jammy2211 changed the title docs: drop pynufft from the source-install optional requirements docs: drop the defunct pynufft and pylops from the source-install requirements Aug 23, 2026

Copy link
Copy Markdown
Collaborator Author

#108 is green on all three legs (3.12, 3.13, no-jax) — it fixes the main failure described above.

Merge order: #108 first, then this PR needs its branch updated (or a re-run) to pick up the fixed main and go green. Nothing further is needed on the docs change itself.


Generated by Claude Code

@Jammy2211
Jammy2211 merged commit 7376d14 into main Aug 24, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/pynufft-removal-phase-3 branch August 25, 2026 18:18
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