ci: split NSS tests into parallel job (handley-lab blackjax fork ≠ mainline)#1281
Merged
Conversation
…inline) The Tests workflow has been red on `main` since 2026-05-16 09:48 UTC, the moment PR #1277 merged the `autofit[nss]` install extra. The 12 tests under `test_autofit/non_linear/search/nest/nss/` hit the script's own ImportError guard on `af.NSS()` because the CI install step only installs `[optional]`. A naïve fix (combine `[optional,nss]` into one pip install) hit a real dependency conflict — both extras pin `blackjax` but to different versions: - [optional] pins `blackjax>=1.2.0` (mainline, PyPI) - [nss] pins handley-lab fork @ ef45acd2 (~0.1.0b1.dev85+) The fork carries the `blackjax.ns.adaptive.init` entrypoint that mainline 1.2.x lacks, so it's not a "use the older one" merge — they're genuinely incompatible. pip rightly refuses `[optional,nss]` with `ResolutionImpossible`. Resolution: split into parallel jobs. - `unittest`: installs `[optional]` and runs the full test suite EXCLUDING `test_autofit/non_linear/search/nest/nss/`. This keeps `test_blackjax_nuts.py` (which requires mainline blackjax 1.2+) green. - `unittest_nss` (new): installs `[nss]` alone in a fresh env and runs ONLY the NSS test suite. Matrix is python 3.12 / 3.13 to match the main `unittest` job. Both jobs need to pass for the `Tests` workflow to be green. The existing `nss_install_smoke.yml` workflow stays as the weekly-cron upstream-drift canary on the [nss] git pins; this new job is the PR/push-time test gate. Fixes the failing Tests check observed on runs 25958838630 (#1277 merge), 25959492149 (#1278 merge), 25998822676 (#1280 revert merge), and 25999018708 (the first attempt at this fix that revealed the extras conflict). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e5b4718 to
4f85310
Compare
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
PyAutoFit's
Testsworkflow onmainhas been red since 2026-05-16 09:48 UTC, the moment PR #1277 ("feat: autofit[nss] install extra") merged. The 12 tests undertest_autofit/non_linear/search/nest/nss/hit the script's own ImportError guard onaf.NSS()because the CI install step only installs[optional].Why "just add [nss] to [optional]" doesn't work
First attempt (single
pip install ./PyAutoFit[optional,nss]) hitResolutionImpossible— see run #25999018708. Both extras pinblackjaxbut to incompatible versions:[optional]>=1.2.0(mainline, PyPI)[nss]git+https://github.com/handley-lab/blackjax.git@ef45acd2(≈ 0.1.0b1.dev85)The fork carries
blackjax.ns.adaptive.init(mainline 1.2.x lacks it), so it's not "use the older one" — they're genuinely incompatible. pip rightly refuses to resolve both at once.Resolution: split into parallel jobs
unittest: installs[optional]and runs the full test suite EXCLUDINGtest_autofit/non_linear/search/nest/nss/. Keepstest_blackjax_nuts.py(mainline blackjax) green.unittest_nss(new): installs[nss]alone in a fresh env and runs ONLY the NSS test suite. Matrix is Python 3.12 / 3.13 to match the mainunittestjob.Both jobs must pass for
Teststo be green. The existingnss_install_smoke.ymlworkflow stays as the weekly-cron upstream-drift canary on the[nss]git pins; this new job is the PR/push-time test gate.