Skip to content

feat: mirror rendered figures to an opt-in Eyes scratch folder (lens) - #9

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/eyes-scratch-mirror-lens
Oct 21, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/eyes-scratch-mirror-lens

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Phase 2 of the Eyes scratch mirror: ports autogalaxy_visualization#5 exactly, with EYES_LIB = "autolens". When PYAUTO_EYES_SCRATCH is set, rendered figures are copied to $PYAUTO_EYES_SCRATCH/autolens/<domain>/ (for example .../eyes/autolens/imaging) for review before any PR or CI. Each mirror replaces the domain folder, skips misc, keeps subpaths such as cluster's point_<i>/, and does nothing when the variable is unset. CI never sets it. Closes #8.

Scripts Changed

  • _viz_cli.py: adds mirror_to_scratch() and the python _viz_cli.py scratch [domain ...] entry point, plus a docstring line. Placed after the feat: point domains keep image_with_points.png and fit_image_with_points.png #7 keep_dataset_and_fit(extra_pngs=...) code, which is unchanged.
  • gallery/gallery_run.sh: mirrors each producer that succeeds. A failed mirror never fails the run.
  • scripts/misc/test/test_eyes_scratch.py: new hermetic tests, run by the existing lint.yml pytest scripts/misc/test/ leg.
  • AGENTS.md, README.md: notes on the opt-in mirror.

Test Plan

  • ruff check . and ruff format --check . are clean
  • pytest scripts/misc/test/: 17 passed
  • With the variable unset, python _viz_cli.py scratch is a no-op that prints a message and creates nothing
  • Hermetic run to a scratchpad folder mirrored all 10 domains (cluster's nested point_0/, point_1/ kept). gallery_run.sh weak mirrored after the render.
  • Real gallery_run.sh imaging with PYAUTO_EYES_SCRATCH=/mnt/c/Users/Jammy/Science/scratch/eyes put 22 PNGs in eyes/autolens/imaging. No tracked PNG, GALLERY.md or manifest changed.

Companion: PyAutoBrain PR on the same branch, which drops the "phase 2" caveat from skills/eyes/eyes.md.

🤖 Generated with Claude Code

Port of phase 1 (autogalaxy_visualization#5): mirror_to_scratch() and the
`python _viz_cli.py scratch [domain ...]` entry point copy scripts/<domain>/images/
PNGs to $PYAUTO_EYES_SCRATCH/autolens/<domain>/ (folder replaced, misc skipped,
no-op when unset); gallery_run.sh mirrors each successful producer. Hermetic
tests in scripts/misc/test/test_eyes_scratch.py; AGENTS.md/README notes.

Refs #8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit f8f759f into main Oct 21, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the feature/eyes-scratch-mirror-lens branch October 21, 2026 11:43
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.

feat: mirror rendered figures to an opt-in Eyes scratch folder (lens)

1 participant