fix: make welcome.py self-contained instead of loading missing dataset - #45
Merged
Conversation
…om disk `welcome.py` previously loaded `dataset/example_1d/gaussian_x1/data.json`, but `dataset/` is gitignored — so a fresh clone has nothing to load and the script crashes with `FileNotFoundError`. Synthesise a noisy 1D Gaussian inline with numpy instead, making the script self-contained like the other workspace `welcome.py` files. Refs PyAutoLabs/autolens_workspace#108 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
welcome.pycrashed withFileNotFoundError: dataset/example_1d/gaussian_x1/data.jsonon a fresh clone, because
dataset/is gitignored and the data filesonly exist after a simulator script runs. Make the welcome demo
self-contained: synthesise a noisy 1D Gaussian inline with numpy, same
spirit as the other workspaces' welcome scripts which build their demo
data in-memory.
Scripts Changed
welcome.py— dropfrom os import pathand theaf.util.numpy_array_from_jsoncalls; synthesise the demo gaussian + noise inline withnumpy.random.default_rngTest Plan
yes "" | python welcome.pyruns to completion (exit 0) on a clone with nodataset/directoryRefs PyAutoLabs/autolens_workspace#108
🤖 Generated with Claude Code