Repository navigation
docs: fix stale autolens_workspace self-location paths in tutorials and simulators - #82
Merged
Merged
Conversation
The HowTo series was split out of the *_workspace repos, but the prose did not
move with it: tutorials still told the reader that their dataset and output
folders live inside autolens_workspace.
Fixes self-location references only. The 60 cross-references pointing the reader
at the sibling workspace for further examples are correct post-split and are
untouched.
- 14 lines across 9 scripts naming autolens_workspace/{output,dataset}: two
chapter-2 tutorials and seven simulators.
- 17 print strings across 9 more scripts saying "checkout the workspace/output/..."
— the same defect without the repo name, naming a directory that does not
exist in this repo.
Four paths were wrong beyond the repo name, and are corrected against the code
rather than string-swapped:
- tutorial_6_masking_and_positions.py named output/t7_with_positions, a leftover
from when this was tutorial 7, and dropped the howtolens/chapter_2 prefix.
- tutorial_searches.py gave no path at all past workspace/output, in four
places; filled in from each search's own path_prefix/name.
- no_lens_light__mass_sis.py named dataset simple__no_lens_light; the script
writes simple__no_lens_light__mass_sis.
- tutorial_3_realism_and_complexity.py named output/3_realism_and_complexity;
the search writes tutorial_3_realism_and_complexity__local_maxima under
howtolens/chapter_2.
Uses this repo's existing bare relative-path style (`output/...`, `dataset/...`),
matching the four simulators already corrected post-split.
markdown/ is unaffected: its curated list covers only chapter 1, none of which
is touched here, and it already contains no stale paths.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ujQLXo85GNH7tG5eaNJ65
The __Directories__ block states that the working directory must be the HowToLens repository root, but never says where to get it. A reader who does not already have the repo is left without a next step. It also omits config/, which the same block in HowToFit and HowToGalaxy both name. Adds the clone URL and the config/ mention, matching the __Paths__ block HowToFit's tutorial 1 already carries. This is the same defect, in the other spelling, that this branch fixes elsewhere: prose written when these tutorials still lived inside autolens_workspace and the reader was assumed to have it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ujQLXo85GNH7tG5eaNJ65
tutorial_searches.py defines four searches; three wrote their results to output/howtolens/chapter_2/ instead of chapter_optional/, apparently copy-pasted from whichever chapter 2 tutorial they were adapted from. A reader working through the optional chapter found most of its results filed under chapter 2. The four print strings naming these paths are updated in the same commit. They were corrected earlier on this branch to match the code as it stood, so changing the path_prefix without them would re-break them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ujQLXo85GNH7tG5eaNJ65
Regenerates markdown/chapter_1_introduction/tutorial_0_visualization.md, the curated page for the tutorial whose __Directories__ block gained the clone URL and config/ mention in the previous commit. Kept separate so that prose change reads as a one-block addition. This commit also carries the catch-up the page had accumulated since it was last built: the workspace version-check warnings no longer appear (the render sets PYAUTO_SKIP_WORKSPACE_VERSION_CHECK=1), the convolver warning moved line number with PyAutoArray, and the four figures are re-rendered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ujQLXo85GNH7tG5eaNJ65
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.
Closes part of PyAutoLabs/HowToGalaxy#75 (the HowToGalaxy half ships as its own PR; run
/prmonly after both are merged).What this fixes
HowToLens was split out of
autolens_workspace, but its prose was not. Tutorials and simulators still told the reader that their own dataset and output folders live insideautolens_workspace— a repo they may not even have cloned.Scripts Changed
18 scripts, 31 prose lines (
scripts/only;notebooks/is generated):autolens_workspace/{output,dataset}—chapter_2_lens_modeling/tutorials 2 and 3, and seven simulators (lens_x2,lens_x3,lens_sersic,lens_extra_galaxy,no_lens_light,no_lens_light__mass_sis,source_complex).checkout the workspace/output/...— the same defect without the repo name, pointing at a directory that does not exist here.The 60 cross-references were deliberately left alone. Two classes of
autolens_workspacereference exist and only one is stale: text saying where the reader's files are (fixed), versus text pointing at the sibling workspace's examples — SLaM, chaining, pixelization, data preparation (correct post-split, untouched).Four paths were wrong beyond the repo name
Each was checked against the search's actual
path_prefix/namerather than having the prefix stripped, which is what surfaced these:tutorial_6_masking_and_positions.py:264workspace/output/t7_with_positions— a leftover from when this was tutorial 7, and no chapter prefixoutput/howtolens/chapter_2/tutorial_6_with_positionschapter_optional/tutorial_searches.py×4workspace/outputno_lens_light__mass_sis.py:167simple__no_lens_lightsimple__no_lens_light__mass_sis(what the script writes)tutorial_3_realism_and_complexity.py:207output/3_realism_and_complexityoutput/howtolens/chapter_2/tutorial_3_realism_and_complexity__local_maximaA plain prefix-strip would have shipped the first two still pointing at nothing.
One apparent truncation at
tutorial_4_group_scale.py:608was checked and not "fixed" — the path continues on the adjacent string literal, so a line-scoped regex would have corrupted it into a duplicated segment.Path style
Uses this repo's existing bare relative form (
output/...,dataset/...), matching the four simulators already corrected post-split andAGENTS.md's statement that scripts run from the repo root. The sibling HowToGalaxy PR uses aHowToGalaxy/-prefixed form because that is its existing house style; each repo stays internally consistent, which is what a reader of one repo actually sees.markdown/ is unaffected
markdown/is built bygenerate_markdown.pyfromconfig/build/markdown_examples.yaml, which curates only the nine chapter-1 tutorials — none of them touched here.grepovermarkdown/for stale paths returns zero. So unlike the sibling HowToGalaxy PR there is nothing to rebuild and nothing left stale.Verification
workspace/outputremaining: 0 ·autolens_workspace/{output,dataset,config}remaining: 0autolens_workspacecross-references retained inscripts/: 60llms-full.txt/workspace_index.jsonregenerated with no diffpy_compilecleanHeart was YELLOW at ship time; the human acknowledged the exact reason set (autofit/autolens workspace-validation failures, A100 profiling drift, missing release rehearsal), none of which this change can affect. Recorded on the task's
active.mdentry.Note for reviewers
This branch was taken as a deliberate parallel worktree alongside
feature/model-figure-prose-lens. Three lines here land in files that branch has also touched —chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.py246 and 429, andtutorial_2_multi_galaxy.py324. All three are single-line print strings insideprint(...)blocks following anaf.Nautilus(...)construction, so a prose-focused branch should not collide, but those are the lines to check at merge.Follow-up filed (not fixed here)
chapter_optional/tutorial_searches.pywrites three of its four searches intooutput/howtolens/chapter_2/instead ofchapter_optional/— a behavioural bug, out of scope for a prose PR. The four print strings here are truthful against the code as it stands, so a future fix to thosepath_prefixvalues must move this prose with it.🤖 Generated with Claude Code
https://claude.ai/code/session_014ujQLXo85GNH7tG5eaNJ65