Skip to content

refactor: merge PYAUTO_DISABLE_CRITICAL_CAUSTICS into PYAUTO_FAST_PLOTS #339

@Jammy2211

Description

@Jammy2211

Overview

Merge the two plot-speedup environment variables PYAUTO_DISABLE_CRITICAL_CAUSTICS and PYAUTO_FAST_PLOTS into a single PYAUTO_FAST_PLOTS flag. Today both vars are always set together in every workspace/release config and serve the same purpose — making plots cheaper for smoke tests and release runs. One flag is simpler to document, set, and reason about.

Plan

  • Replace the PYAUTO_DISABLE_CRITICAL_CAUSTICS check in PyAutoGalaxy's plot_utils.py with a PYAUTO_FAST_PLOTS check so the surviving flag also governs critical-curve/caustic overlay skipping.
  • Remove PYAUTO_DISABLE_CRITICAL_CAUSTICS from PyAutoBuild's env-var config, release workflow, and CLAUDE docs.
  • Sweep all 5 workspace repos, dropping the retired flag from their env_vars.yaml, run_scripts.sh, and CLAUDE.md command examples.
  • Update admin_jammy/prompt/active.md to remove the stale bullet for the retired flag.
  • Verify by running a PyAutoGalaxy plot script with and without PYAUTO_FAST_PLOTS=1 and confirming overlays are skipped/computed as expected.
  • Grep the whole tree afterwards to catch any lingering references.
Detailed implementation plan

Affected Repositories

  • PyAutoGalaxy (primary — only repo with code changes)
  • PyAutoBuild (configs + release workflow + CLAUDE.md)
  • autofit_workspace (env_vars.yaml, run_scripts.sh)
  • autogalaxy_workspace (env_vars.yaml, CLAUDE.md)
  • autolens_workspace (env_vars.yaml, CLAUDE.md)
  • autolens_workspace_test (env_vars.yaml)
  • autofit_workspace_test (env_vars.yaml)
  • admin_jammy (active.md)

Work Classification

Both (library + workspace) — starts as library work (PyAutoGalaxy, PyAutoBuild), workspace sweep follows.

Branch Survey

Repository Current Branch Dirty?
PyAutoGalaxy main clean (untracked only)
PyAutoArray main clean (untracked only)
PyAutoBuild main minor test_results churn
autofit_workspace main data fixtures dirty
autogalaxy_workspace main data fixtures dirty
autolens_workspace main data fixtures dirty
autolens_workspace_test main data fixtures dirty
autofit_workspace_test main clean
admin_jammy main papers.md dirty

Suggested branch: feature/merge-fast-plot-env-vars
Worktree root: ~/Code/PyAutoLabs-wt/merge-fast-plot-env-vars/ (created later by /start_library)

Note: PyAutoBuild has an old local branch feature/fast-plots-tight-layout from earlier work in this area — informational only, not a conflict.

Implementation Steps

  1. PyAutoGalaxy — in both autogalaxy/plot/plot_utils.py and autogalaxy/util/plot_utils.py (currently byte-identical duplicates — flagged as a separate cleanup, not addressed here), at lines 379 and 431, replace:

    if os.environ.get("PYAUTO_DISABLE_CRITICAL_CAUSTICS") == "1":

    with:

    if os.environ.get("PYAUTO_FAST_PLOTS") == "1":
  2. PyAutoBuild:

    • autobuild/config/env_vars.yaml line 13 — remove the PYAUTO_DISABLE_CRITICAL_CAUSTICS entry.
    • .github/workflows/release.yml line 759 — remove export PYAUTO_DISABLE_CRITICAL_CAUSTICS=1.
    • CLAUDE.md line 116 — remove the bullet documenting the old var.
  3. Workspaces — remove PYAUTO_DISABLE_CRITICAL_CAUSTICS from all config/build/env_vars.yaml (line 14): autofit_workspace, autogalaxy_workspace, autolens_workspace, autolens_workspace_test, autofit_workspace_test. Also drop the PYAUTO_DISABLE_CRITICAL_CAUSTICS entry from the autolens_workspace_test unset list (line 30).

  4. Workspace scripts/docs:

    • autofit_workspace/run_scripts.sh line 17 — drop export PYAUTO_DISABLE_CRITICAL_CAUSTICS=1.
    • autolens_workspace/CLAUDE.md lines 36, 40 — remove from command example and doc bullet.
    • autogalaxy_workspace/CLAUDE.md lines 34, 38 — same.
  5. admin_jammyadmin_jammy/prompt/active.md line 11 — remove the stale bullet.

  6. Testing:

    • Run a PyAutoGalaxy script with PYAUTO_FAST_PLOTS=1 and verify the caustic/critical-curve overlays are skipped.
    • Run without PYAUTO_FAST_PLOTS and verify overlays are computed normally.
    • grep -r PYAUTO_DISABLE_CRITICAL_CAUSTICS across all repos — should return only historical archive entries (admin_jammy/prompt/issued/).

Key Files

  • PyAutoGalaxy/autogalaxy/plot/plot_utils.py — swap env var name (lines 379, 431)
  • PyAutoGalaxy/autogalaxy/util/plot_utils.py — swap env var name (lines 379, 431)
  • PyAutoBuild/autobuild/config/env_vars.yaml — remove entry
  • PyAutoBuild/.github/workflows/release.yml — remove export
  • PyAutoBuild/CLAUDE.md — remove doc bullet
  • autofit_workspace/config/build/env_vars.yaml — remove entry
  • autogalaxy_workspace/config/build/env_vars.yaml — remove entry
  • autolens_workspace/config/build/env_vars.yaml — remove entry
  • autolens_workspace_test/config/build/env_vars.yaml — remove entry + unset list
  • autofit_workspace_test/config/build/env_vars.yaml — remove entry
  • autofit_workspace/run_scripts.sh — drop export
  • autolens_workspace/CLAUDE.md — remove from command + bullet
  • autogalaxy_workspace/CLAUDE.md — remove from command + bullet
  • admin_jammy/prompt/active.md — remove stale bullet

Known issues flagged (out of scope)

  • PyAutoGalaxy/autogalaxy/plot/plot_utils.py and autogalaxy/util/plot_utils.py are byte-identical duplicates. Worth deduplicating in a follow-up task.
  • admin_jammy/prompt/issued/import_optimization.md is a historical archive mentioning the old var; left untouched.

Original Prompt

Click to expand starting prompt

Can you merge the environment variables PYAUTO_DISABLE_CRITICAL_CURVES And PYAUTO_FAST_PLOT into jsut PYAUTO_FAST_PLOT

(Note: actual var names are PYAUTO_DISABLE_CRITICAL_CAUSTICS and PYAUTO_FAST_PLOTS — the surviving flag will be PYAUTO_FAST_PLOTS.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions