Skip to content

test: guard blackjax NUTS tests on blackjax (Python matrix follow-up)#1359

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/matrix-blackjax-skip
Jul 11, 2026
Merged

test: guard blackjax NUTS tests on blackjax (Python matrix follow-up)#1359
Jammy2211 merged 1 commit into
mainfrom
feature/matrix-blackjax-skip

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1358. The two _times_from_positions tests in test_blackjax_nuts.py were guarded with skipif(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), so requires_jax did 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 installs autofit[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

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>
@Jammy2211 Jammy2211 merged commit a2e55b7 into main Jul 11, 2026
4 of 5 checks passed
@Jammy2211 Jammy2211 deleted the feature/matrix-blackjax-skip branch July 11, 2026 12:08
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