From 346845069528edc87b9cef6b943b9df1ac93874f Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 19 Nov 2026 21:18:07 +0000 Subject: [PATCH] fix(colab-gate): colossus rationale names the los_halos notebooks; hmf kept until next release colossus: the los_halos simulator notebooks now reach it through LOSSampler and stop on Colab with a clear ImportError naming colossus and autolens[los]; accepted by the human 2026-11-19, so it is not added to _SHARED_EXTRAS. hmf: source main no longer imports it, but the released autolens 2026.11.19.1 does, and the continuous check F audits PyPI, so the entry stays (with a reason saying so) until a release carrying PyAutoLens PR 867 is on PyPI. Refs #356 Co-Authored-By: Claude Opus 5.5 --- heart/config/colab_gate.yaml | 4 ++-- tests/test_colab_gate.py | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/heart/config/colab_gate.yaml b/heart/config/colab_gate.yaml index f03184c3..9c7a41bf 100644 --- a/heart/config/colab_gate.yaml +++ b/heart/config/colab_gate.yaml @@ -19,8 +19,8 @@ accepted_missing: - name: colossus - reason: line-of-sight halo tooling in autolens/lens/los.py. colossus is declared only in autogalaxy's test and dev extras, never as a base dependency, and no workspace or HowTo notebook reaches the module. A user who calls the line-of-sight code on Colab gets an explicit ModuleNotFoundError naming it. + reason: line-of-sight halo tooling in autolens/lens/los.py, installed by the autolens[los] extra and not by the Colab bootstrap. The los_halos simulator notebooks (simulator, simulator_jax) reach it through LOSSampler; on Colab they stop with an ImportError that names colossus and says to pip install autolens[los]. Leaving those two notebooks to stop on Colab was accepted by the human on 2026-11-19, so colossus is deliberately not added to _SHARED_EXTRAS. - name: hmf - reason: the same autolens/lens/los.py line-of-sight tooling as colossus, and additionally undeclared in any pyproject, so no install path carries it today (tracked as a library follow-up). No workspace or HowTo notebook reaches it. + reason: only the released autolens 2026.11.19.1 and earlier import it (autolens/lens/los.py, unguarded); source main moved LOSSampler to colossus (PyAutoLens PRs 867 and 868) and imports no hmf. The continuous check F audits the PyPI release, so this entry stays until a release carrying PR 867 is on PyPI, then is deleted. - name: mcp reason: autofit/mcp/server.py is the MCP server entry point, installed via the autofit[mcp] extra and launched outside notebooks. An unconditional import is correct for a server module, and no notebook imports it. diff --git a/tests/test_colab_gate.py b/tests/test_colab_gate.py index 32667ce8..665ab21e 100644 --- a/tests/test_colab_gate.py +++ b/tests/test_colab_gate.py @@ -588,9 +588,12 @@ def test_detail_line_names_the_first_failures_then_counts_the_rest(): def test_shipped_config_accepts_exactly_the_three_argued_exemptions(): """The shipped exemption list, read from the real file the gate loads. - Three of the five library-side holes the gate found are not notebook - paths: `colossus` and `hmf` (the line-of-sight tooling in - autolens/lens/los.py) and `mcp` (autofit/mcp/server.py, the MCP server + Three library-side holes are argued exemptions: `colossus` (the + line-of-sight tooling in autolens/lens/los.py, behind the autolens[los] + extra; the los_halos simulator notebooks reach it and stop on Colab with + a clear ImportError, accepted 2026-11-19), `hmf` (imported only by the + released autolens 2026.11.19.1 and earlier; deleted once a release + without it is on PyPI) and `mcp` (autofit/mcp/server.py, the MCP server entry point). Anything else appearing here is a hole in the `--no-deps` bootstrap being quietened rather than fixed, which is what the config file's own header forbids — so the set is asserted exactly, not as a