Skip to content

refactor: auto-simulate datasets with ac.util.dataset.simulate_if_needed - #39

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/pyautoarray-simulate-helper-yuqd16
Nov 1, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
claude/pyautoarray-simulate-helper-yuqd16

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Part of PyAutoLabs/autogalaxy_workspace#268 (phase 3 of PyAutoLabs/PyAutoArray#669).

Merge only after the PyAutoArray release that carries PyAutoLabs/PyAutoArray#670. ac.util.dataset is autoarray's dataset_util, and PyAutoCTI requires autoarray>=2026.7.29.2, so the helper reaches autocti with that release and no PyAutoCTI change is needed.

Summary

Replaces the 8-line should_simulate + subprocess.run auto-simulate block with the one-line ac.util.dataset.simulate_if_needed(dataset_path, simulator=...) in 39 scripts (43 blocks).

  • The rewrite is mechanical and done with an AST matcher, so it only touches the exact standard block. Dataset and simulator paths are kept exactly. These scripts use CRLF line endings, which are preserved, so the diff contains only the rewritten lines.
  • Notebooks are not touched: notebook regeneration is blocked for this workspace because autocti is not in COLAB_PROJECTS (see AGENTS.md). The committed notebooks don't contain the old block either.

Testing

  • Every inserted call is identical to black's output, all changed scripts compile, and scripts/check_sizes.sh reports no shrinkage.
  • check_dataset_allowlist: 43 guarded call sites before and 43 after; the leg-2 capped-deletion check passes.
  • Not smoke-run: autocti fails to build in the cloud session, so no script was executed. The helper itself is tested in PyAutoArray and smoke-run in the lens/galaxy workspaces.

Merge mode: human /prm, after the release.


Generated by Claude Code

Replace the 8-line should_simulate + subprocess.run block with the
one-line ac.util.dataset.simulate_if_needed(dataset_path, simulator=...)
helper (PyAutoArray#670; ac.util.dataset re-exports autoarray's
dataset_util): 43 blocks in 39 scripts. Mechanical rewrite: dataset and
simulator paths kept exactly; CRLF line endings preserved. Notebook
regeneration is blocked for this workspace (autocti is not in
COLAB_PROJECTS, see AGENTS.md), so notebooks are not touched.

check_dataset_allowlist reports the same guarded call-site count before
and after (43). Requires the PyAutoArray release that carries #670.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8NyQo2s3YUk8eUrrB3
@Jammy2211
Jammy2211 merged commit e5ef5af into main Nov 1, 2026
7 checks passed
@Jammy2211
Jammy2211 deleted the claude/pyautoarray-simulate-helper-yuqd16 branch November 1, 2026 20:51
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.

2 participants