refactor: merge PYAUTO_DISABLE_CRITICAL_CAUSTICS into PYAUTO_FAST_PLOTS#340
Merged
refactor: merge PYAUTO_DISABLE_CRITICAL_CAUSTICS into PYAUTO_FAST_PLOTS#340
Conversation
The critical-curve/caustic overlay skip in _caustics_from and _critical_curves_from now keys off PYAUTO_FAST_PLOTS instead of its own dedicated flag. In every workspace and release config the two flags were always set together for the same purpose (faster plots for smoke tests and release builds), so folding them into one flag removes a layer of duplication. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Apr 10, 2026
Merged
Collaborator
Author
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
Fold the
PYAUTO_DISABLE_CRITICAL_CAUSTICSplot-speedup flag intoPYAUTO_FAST_PLOTSso a single env var governs bothtight_layout()skipping and critical-curve/caustic overlay skipping. Every workspace and release config already set both flags together for the same purpose (cheaper plots during smoke tests and release builds) — one flag is simpler to document, set, and reason about.Closes #339.
API Changes
Environment variable only — no Python API changes.
PYAUTO_DISABLE_CRITICAL_CAUSTICSis retired; setPYAUTO_FAST_PLOTS=1instead to skip bothtight_layout()and critical-curve/caustic overlay computation. Callers that only setPYAUTO_DISABLE_CRITICAL_CAUSTICSwill no longer skip overlays — they must migrate toPYAUTO_FAST_PLOTS=1.Paired PyAutoBuild PR removes the retired flag from the release workflow, default env vars, and docs. A follow-up workspace sweep will remove it from the
autofit/autogalaxy/autolensworkspaceenv_vars.yaml,run_scripts.sh, and CLAUDE.md files.See full details below.
Test Plan
pytest test_autogalaxy/→ 811 passed (no tests reference either env var)PYAUTO_FAST_PLOTS=1, both_caustics_fromand_critical_curves_fromshort-circuit to([], [])from bothautogalaxy/plot/plot_utils.pyandautogalaxy/util/plot_utils.py.PYAUTO_FAST_PLOTS, the guard does not fire (falls through intoLensCalc).grep -r PYAUTO_DISABLE_CRITICAL_CAUSTICS autogalaxy/→ zero matches.Full API Changes (for automation & release notes)
Removed (env var)
PYAUTO_DISABLE_CRITICAL_CAUSTICS— no longer recognised byautogalaxy/plot/plot_utils.py::_caustics_from,_critical_curves_from, or by the identical copies inautogalaxy/util/plot_utils.py.Changed Behaviour (env var)
PYAUTO_FAST_PLOTS=1now additionally short-circuits critical-curve and caustic overlay computation in bothautogalaxy/plot/plot_utils.pyandautogalaxy/util/plot_utils.py, returning([], [])from_caustics_fromand_critical_curves_from. Previously this flag only skippedplt.tight_layout()(in PyAutoArray).Migration
PYAUTO_DISABLE_CRITICAL_CAUSTICS=1 PYAUTO_FAST_PLOTS=1 python script.pyPYAUTO_FAST_PLOTS=1 python script.pyKnown follow-up (not in this PR)
autogalaxy/plot/plot_utils.pyandautogalaxy/util/plot_utils.pyare currently byte-identical duplicates of each other. Both were updated here to keep them in sync; deduplicating them is worth a separate cleanup task.Generated with Claude Code