Repository navigation
refactor: auto-simulate datasets with ag.util.dataset.simulate_if_needed - #99
Merged
Merged
Conversation
Replace the 8-line should_simulate + subprocess.run block with the
one-line util.dataset.simulate_if_needed(dataset_path, simulator=...)
helper (PyAutoArray#670): 18 blocks in 16 scripts. Mechanical rewrite:
dataset and simulator paths kept exactly; a redundant str(...) around
the path is dropped because the helper str()s it. Non-standard blocks
are untouched.
The one in-block comment ("Use the same Python interpreter as this
tutorial.") is dropped with the sys.executable call it described.
16 notebooks regenerated with PyAutoHands generate.py howtogalaxy
--assistant-root autogalaxy_assistant; unrelated Colab-context refreshes and
unicode-escaping noise from the generator were reverted, so each
notebook diff is only this rewrite.
check_dataset_allowlist reports the same guarded call-site count before
and after. 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
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.
Part of PyAutoLabs/autogalaxy_workspace#268 (phase 3 of PyAutoLabs/PyAutoArray#669).
Summary
Replaces the 8-line
should_simulate+subprocess.runauto-simulate block with the one-lineag.util.dataset.simulate_if_needed(dataset_path, simulator=...)in 16 tutorial scripts (18 blocks).str(...)around the path is dropped because the helper callsstr()itself. Behaviour is unchanged.sys.executablecall it described.generate.py howtogalaxy --assistant-root <autogalaxy_assistant>, and each notebook diff is only this rewrite.Testing
check_dataset_allowlist: 18 guarded call sites before and 18 after.chapter_1_introduction/tutorial_3_fitting.pypassed against released autogalaxy with merged PyAutoArraymain, simulating its dataset through the helper.This repo had no non-standard blocks.
Merge mode: human
/prm, after the release.Generated by Claude Code