test: remove jax-using unit tests; assertions moved to autolens_workspace_test#295
Merged
test: remove jax-using unit tests; assertions moved to autolens_workspace_test#295
Conversation
…pace_test Unit tests in test_autoarray/ that imported jax (directly via importorskip or indirectly via library helpers like ImagingSparseOperator and the KNN interpolator) caused two problems: they broke the no-jax CI matrix on Python 3.9 / 3.10, and they paid the jax import cost on every local run even when self-skipping. Per the project rule "library unit tests stay numpy-only; cross-xp checks live in workspace_test", move all 9 jax assertions into autolens_workspace_test/scripts/jax_assertions/. Library code unchanged. Conftest's collect_ignore_glob for test_jax_*.py removed since no such files remain (test_jax_changes.py renamed to test_changes.py since it never used jax in the first place). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_autoarray/(7 functions across 5 files + 2 from the deletedtest_jax_pytree.py).collect_ignore_globfortest_jax_*.pyremoved since no such files remain.test_jax_changes.py→test_changes.py(it never used jax).Why
Two problems with the prior layout:
test__data_vector_via_weighted_data_two_methods_agree,test__inversion_imaging__via_mapper_knn, etc. trigger eagerimport jaxinside library helpers (ImagingSparseOperator,data_vector_via_psf_weighted_data_from, KNN interpolator) and crash withModuleNotFoundError: No module named 'jax'.pytest.importorskip.Per the project rule "library unit tests stay numpy-only; cross-xp checks live in workspace_test", the assertions are relocated as runnable scripts in autolens_workspace_test#PR.
Tests removed → destination
test_inversion_imaging_util.py::test__data_vector_via_weighted_data_two_methods_agreescripts/jax_assertions/sparse_operators.pytest_inversion_imaging_util.py::test__curvature_matrix_via_psf_weighted_noise_two_methods_agreescripts/jax_assertions/sparse_operators.pytest_inversion_interferometer_util.py::test__curvature_matrix_via_psf_precision_operator_fromscripts/jax_assertions/sparse_operators.pytest_factory.py::test__inversion_imaging__via_mapper_knnscripts/jax_assertions/knn_interpolator.pytest_inversion_util.py::test__reconstruction_positive_only_from__jax_ill_conditioned_grad_is_finitescripts/jax_assertions/nnls.pytest_inversion_util.py::test__reconstruction_positive_only_from__jax_matches_unpreconditioned_primalscripts/jax_assertions/nnls.pytest_jax_pytree.py(3 tests)scripts/jax_assertions/pytree.pytest_irregular_2d.pyjax half oftest__grid_2d_via_deflection_grid_from__propagates_xpscripts/jax_assertions/grid_irregular.pyTest plan
739 passed(was748— exactly 9 removed)pinv2failures are unrelated pynufft↔scipy incompat, not in CI)python_matrix.ymlmatrix passes on 3.9 / 3.10 / 3.11 / 3.12 / 3.13 after merge