Skip to content

test: skip default-nufftax interferometer tests when nufftax absent (py<3.12)#382

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/matrix-nufftax-py312
Jul 11, 2026
Merged

test: skip default-nufftax interferometer tests when nufftax absent (py<3.12)#382
Jammy2211 merged 1 commit into
mainfrom
feature/matrix-nufftax-py312

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Part of fixing the Python Version Matrix red (PyAutoBuild weekly). The default Interferometer transformer is the JAX-native TransformerNUFFT, backed by nufftax — declared for Python ≥ 3.12 only (3.9–3.11 are not officially supported; general.yaml). On those interpreters the backend can't install, so every test that builds a default interferometer/transformer raised ModuleNotFoundError at construction.

Adds a pytest_collection_modifyitems hook in test_autoarray/conftest.py that, only when nufftax is unavailable, skips exactly the default-nufftax interferometer/transformer tests — keeping the explicit DFT and pynufft transformer tests running. On 3.12/3.13 (nufftax present) nothing is skipped.

Test Plan (verified locally, Python 3.12.10)

  • nufftax present: test_transformer.py 13 passed / 0 skipped; the 3 interferometer files 43 passed / 0 skipped — hook is inert.
  • nufftax blocked (simulating <3.12): test_transformer.py → 5 passed (2 DFT + 3 pynufft), 8 skipped (the __nufft__ tests); interferometer files → 43 skipped cleanly, no failures/errors.

Pairing

Lands with PyAutoBuild feature/matrix-nufftax-py312 (adds PyAutoArray[optional] so nufftax/pynufft install on 3.12/3.13). Test-only change — no library source touched.

🤖 Generated with Claude Code

The default Interferometer transformer is the JAX-native TransformerNUFFT,
backed by nufftax (declared for Python >= 3.12 only). On 3.9-3.11 (not
officially supported) the backend can't install, so default interferometer /
transformer tests raise ModuleNotFoundError at construction. Add a
pytest_collection_modifyitems hook that skips exactly those when nufftax is
unavailable, keeping the explicit DFT and pynufft transformer tests. On
3.12/3.13 nothing is skipped. Fixes the PyAutoBuild Python Version Matrix red
on 3.9-3.11 (paired with PyAutoArray[optional] in that workflow).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Jammy2211

Copy link
Copy Markdown
Collaborator Author

Paired with PyAutoBuild#144 (adds PyAutoArray[optional] to the Python Version Matrix). Both land together.

@Jammy2211 Jammy2211 merged commit 4477fd5 into main Jul 11, 2026
4 checks passed
@Jammy2211 Jammy2211 deleted the feature/matrix-nufftax-py312 branch July 11, 2026 10:12
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