test: guard blackjax NUTS tests on blackjax (Python matrix follow-up)#1359
Merged
Conversation
Follow-up to #1358: the two _times_from_positions tests were guarded on jax, but they need *blackjax* (which pulls jax). jax installs on 3.11+ via the autoarray/autolens [optional] chain, so requires_jax did not skip them there — and blackjax lives in autofit's own [optional], which the matrix does not install, so they failed with 'No module named blackjax' on 3.11/3.12/3.13. Guard on blackjax instead; skips across the whole matrix, runs in per-repo CI (which installs autofit[optional]). Co-Authored-By: Claude Opus 4.8 <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
Follow-up to #1358. The two
_times_from_positionstests intest_blackjax_nuts.pywere guarded withskipif(jax absent), but they actually need blackjax (which pulls jax). On the Python Version Matrix, jax installs on 3.11+ (via the autoarray/autolens[optional]chain), sorequires_jaxdid not skip them there — and blackjax lives in autofit's own[optional]extra, which the matrix doesn't install. Result:ModuleNotFoundError: No module named 'blackjax'on 3.11/3.12/3.13.Switches the guard to
skipif(importlib.util.find_spec("blackjax") is None). The tests skip across the whole matrix (no blackjax) and still run in the per-repo autofit CI (which installsautofit[optional]→ blackjax). The 5 non-blackjax tests in the file already pass on the matrix and are untouched.Verified: file collects cleanly; decorators applied to exactly the two blackjax tests.
🤖 Generated with Claude Code