Skip to content

docs: fix stale *_workspace self-location paths in HowToGalaxy and HowToLens #75

Closed

Description

@Jammy2211

Overview

The HowTo lecture series were split out of the *_workspace repos into their own HowToFit / HowToGalaxy / HowToLens repos, but the prose did not move with them. Tutorials still tell the reader that their working directory, config, dataset and output folders live inside the workspace repo. HowToGalaxy additionally carries a broken image link left over from the move, which was grandfathered into .url_check_allowlist.txt rather than fixed — so the weekly URL check has been green over a 404 ever since.

HowToFit's single stale block was fixed in parallel on feature/howtofit-tutorials-1-3 (6f335b2) and is not part of this task.

Plan

  • Fix only self-location references — clone/download URLs, and <workspace>/{output,config,dataset} paths that are now <HowToRepo>/{output,config,dataset}.
  • Leave cross-references alone. "See autolens_workspace/*/guides/modeling/chaining.py" and its kin point readers at the sibling workspace as their next destination and are correct post-split. There are dozens; none should change.
  • Fix the HowToGalaxy tuning-fork image to its HowToGalaxy home, and delete the .url_check_allowlist.txt entry that grandfathered the breakage — leaving the entry keeps a green check over a fixed URL and re-hides the next break.
  • Regenerate the notebook/markdown mirrors and workspace_index.json / llms*.txt through each repo's own convention rather than hand-editing them.
  • Ship as two independent PRs, one per repo.
Detailed implementation plan

Affected Repositories

  • HowToGalaxy (primary)
  • HowToLens

Branch Survey

Repository Current Branch Dirty?
./HowToGalaxy main clean (level with origin/main; no worktrees)
./HowToLens main clean (level with origin/main)

Suggested branch: feature/howto-stale-self-location (both repos)

HowToLens is taken as a deliberate parallel worktree off origin/main. The registered claim (model-figures-rollout-lens) names branch feature/model-figures-rollout-lens, but that worktree is actually on feature/model-figure-prose-lens — 3 commits ahead, clean tree. Of this task's seven HowToLens target files exactly one overlaps it (scripts/chapter_2_lens_modeling/tutorial_2_practicalities.py), on different lines: that branch edits model-figure prose, this task edits the four autolens_workspace/output strings.

Implementation Steps

HowToGalaxy (15 known hits, scripts/ only — re-run the survey over README.md, start_here.py, welcome.py, llms*.txt before editing):

  1. scripts/chapter_2_modeling/tutorial_2_practicalities.py — path_prefix prose (autogalaxy_workspace/output/howtogalaxy/chapter_2), autogalaxy_workspace/output x3, autogalaxy_workspace/config.
  2. scripts/chapter_2_modeling/tutorial_3_realism_and_complexity.py — 2 print strings.
  3. scripts/chapter_1_introduction/tutorial_2_data.py:338 — autogalaxy_workspace/dataset/imaging/howtogalaxy/.
  4. scripts/chapter_1_introduction/tutorial_0_visualization.py:33,102 — dataset path and autogalaxy_workspace/config/visualize.
  5. scripts/chapter_1_introduction/tutorial_1_grids_and_galaxies.py:9 — image URL → HowToGalaxy/scripts/chapter_1_introduction/HubbleTuningFork.jpg (the file is already there).
  6. .url_check_allowlist.txt — delete the autogalaxy_workspace/.../HubbleTuningFork.jpg line.

HowToLens (14 known hits):

  1. scripts/chapter_2_lens_modeling/tutorial_2_practicalities.py — autolens_workspace/output x4.
  2. scripts/chapter_2_lens_modeling/tutorial_3_realism_and_complexity.py — 2 print strings.
  3. scripts/simulator/{lens_x2,lens_x3,lens_sersic,lens_extra_galaxy,no_lens_light__mass_sis}.py — each says "The dataset can be viewed in the folder autolens_workspace/dataset/imaging/..." when the script writes into HowToLens/dataset.

Key Files

  • HowToGalaxy/.url_check_allowlist.txt — the grandfather entry to delete.
  • HowToGalaxy/scripts/chapter_1_introduction/HubbleTuningFork.jpg — the image's real home.
  • scripts/*.py / notebooks/*.ipynb / markdown/*.md — three mirrors per tutorial; regenerate, do not hand-edit the derived two.

Original Prompt

Click to expand starting prompt

HowTo tutorials still describe themselves as living inside the *_workspace repos

Type: docs
Target: workspaces
Repos:

  • HowToGalaxy
  • HowToLens
    Themes:
  • howto
  • tutorials
    Difficulty: medium
    Autonomy: safe
    Priority: medium
    Status: draft
    Consequence: notify
    Witness: No <workspace>/{output,config,dataset} path or clone/download URL in
    HowToGalaxy or HowToLens refers to the HowTo repo's own files; the
    HubbleTuningFork image renders from its HowToGalaxy home and its
    .url_check_allowlist.txt grandfather entry is gone; genuine cross-references
    to sibling workspace examples are untouched.
    Review-minutes: 20
    Unattended: ready
    Filed: 2026-09-14

The HowTo lecture series were split out of the *_workspace repos into their
own HowToFit / HowToGalaxy / HowToLens repos. The prose did not move with
them: tutorials still tell the reader their working directory, config, dataset
and output folders live inside the workspace repo, and HowToFit's __Paths__
block sends a reader who wants to clone HowToFit to autofit_workspace.

User-reported (2026-09-14), from HowToFit tutorial 1:

If you don't have a HowToFit clone, you can download it here:
https://github.com/PyAutoLabs/autofit_workspace

The distinction that governs every edit

Two classes of *_workspace reference live in these repos. Only the second is
stale, and the fix must not flatten them together:

  • KEEP — cross-references. "See autolens_workspace/*/guides/modeling/chaining.py",
    "all examples in the autogalaxy_workspace use Nautilus", "the workspace
    scientific workflow example". These point at the sibling workspace as the
    reader's next destination and are correct post-split. There are dozens of
    them. Do not touch them.
  • FIX — self-location. Text that assumes the HowTo tutorials live inside
    the workspace repo: clone/download URLs, and <workspace>/{output,config,dataset}
    paths that are now <HowToRepo>/{output,config,dataset}.

Scope

HowToFit is out of scope — see "HowToFit was fixed elsewhere" below.

  • @howtogalaxy — 15 hits. tutorial_2_practicalities.py (path_prefix
    described as autogalaxy_workspace/output/howtogalaxy/chapter_2; "checkout
    the autogalaxy_workspace/output folder" x3; "config: the files in
    autogalaxy_workspace/config"), tutorial_3_realism_and_complexity.py
    (2 print strings), tutorial_2_data.py:338
    (autogalaxy_workspace/dataset/imaging/howtogalaxy/),
    tutorial_0_visualization.py:33,102
    (autogalaxy_workspace/dataset/..., autogalaxy_workspace/config/visualize).
  • @HowToLens — 14 hits. tutorial_2_practicalities.py
    (autolens_workspace/output x4), tutorial_3_realism_and_complexity.py
    (2 print strings), and five scripts/simulator/*.py — lens_x2, lens_x3,
    lens_sersic, lens_extra_galaxy, no_lens_light__mass_sis — each saying
    "The dataset can be viewed in the folder autolens_workspace/dataset/imaging/..."
    when the script writes into HowToLens/dataset.

Counts are from a 2026-09-14 grep of scripts/ only; re-run the survey across
each repo before editing, since README.md, start_here.py, welcome.py,
llms.txt and llms-full.txt may carry the same class of reference.

Separate bug, same root cause (@howtogalaxy)

scripts/chapter_1_introduction/tutorial_1_grids_and_galaxies.py:9 links the
Hubble tuning fork image at
https://github.com/PyAutoLabs/autogalaxy_workspace/blob/main/scripts/chapter_1_introduction/HubbleTuningFork.jpg.
That URL has been broken since the move; the file now lives at
HowToGalaxy/scripts/chapter_1_introduction/HubbleTuningFork.jpg. Rather than
being fixed, it was grandfathered into HowToGalaxy/.url_check_allowlist.txt
so the weekly url_check.yml cron stays green.

Fix the link and delete the allowlist entry. Leaving the entry behind keeps
a green check over a fixed URL and re-hides the next breakage.

Derived artefacts

Every prose fix lands in three mirrors per tutorial — scripts/*.py,
notebooks/*.ipynb, markdown/*.md — and workspace_index.json, llms.txt
and llms-full.txt carry some of the same links. Regenerate derived artefacts
through each repo's own regeneration convention rather than hand-editing the
notebook/markdown mirrors. ~90 edits total.

HowToFit was fixed elsewhere (2026-09-14)

HowToFit's only stale block — the __Paths__ download URL in
scripts/chapter_1_introduction/tutorial_1_models.py:93 — was fixed by a
parallel session on feature/howtofit-tutorials-1-3 (commit 6f335b2,
pushed) while this prompt was being surveyed. It now reads
https://github.com/PyAutoLabs/HowToFit.

One gap remains on that branch: the fix landed in scripts/ and
notebooks/ but not in markdown/chapter_1_introduction/tutorial_1_models.md:104,
which still reads https://github.com/PyAutoLabs/autofit_workspace. The
markdown mirror was not regenerated. That single line is the only HowToFit work
left; it belongs to feature/howtofit-tutorials-1-3, not to this task.

Registry state this task had to correct (2026-09-14)

worktree_check_conflict fired on HowToFit and HowToLens. Both claims were
residue, and the guard also under-reported:

  • howtofit-mode's HowToFit leg had already merged (409f562, HowToFit#55);
    its worktree is clean and 0 commits ahead.
  • model-figures-rollout-lens registers HowToLens on
    feature/model-figures-rollout-lens; the worktree is actually on
    feature/model-figure-prose-lens. active.md has the wrong branch.
  • The guard reported one claim on HowToFit when active.md carries three
    (howtofit-mode, model-figure-prose-simplify, howtofit-tutorials-1-3),
    and HowToFit has five live worktrees.

Delivery

One issue (HowToGalaxy, primary), two PRs — one per repo, independent. Run
/prm once, after both are green and merged; a single /prm per PR would close
the issue and advance the prompt prematurely.

HowToLens is taken as a deliberate parallel worktree off origin/main,
recorded as a parallel-claim: block on the active.md entry. Of this task's
seven HowToLens target files, exactly one overlaps
feature/model-figure-prose-lens (scripts/chapter_2_lens_modeling/tutorial_2_practicalities.py);
that branch's change there is model-figure prose, this task's is the four
autolens_workspace/output strings — different lines, and its tree is clean
with the work committed. A parallel worktree is preferred over a fold because a
fold shares the branch, not just the directory.

Out of scope

Adding a __Paths__ orientation block to HowToGalaxy and HowToLens for parity
with HowToFit. It is a real gap — those two repos have no "here is your working
directory, here is where to clone" section, which is why their stale paths are
scattered through prose instead of concentrated in one block — but it is new
authorship, not a correction. File it as a follow-up prompt.

Activity

  1. Jammy2211 commented on Sep 14, 2026

    @Jammy2211
    CollaboratorAuthor

    Both halves are open:

    Run /prm once, after BOTH are merged — a /prm per PR would close this issue and advance the PyAutoMind prompt after only half the work had landed.

  2. Jammy2211 commented on Sep 14, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped

    Both halves merged 2026-09-14.

    55 stale prose lines across the two repos, all self-location references left behind when the HowTo series was split out of the *_workspace repos. Genuine cross-references to the sibling workspaces' examples — ~45 in HowToGalaxy, 60 in HowToLens — were left untouched, since those are correct post-split.

    Beyond the filed scope

    The survey that produced this issue undercounted. Verifying each path against the code rather than string-swapping turned up:

    • Four paths wrong beyond the repo name in HowToLens: output/t7_with_positions (a folder name left from when that tutorial was numbered 7, also missing its chapter prefix), four tutorial_searches.py prints with no path at all past workspace/output, a simulator naming simple__no_lens_light when it writes simple__no_lens_light__mass_sis, and a search path naming the wrong run. A prefix-strip would have preserved all four.
    • A second spelling of the same defect: 13 (HowToGalaxy) + 17 (HowToLens) print strings saying checkout the workspace/output/..., naming a directory that exists in neither repo.
    • The tuning-fork image was not a 404 as filed — the script already pointed at HowToGalaxy, but as a blob URL, which returns 200 text/html and does not render. Now ?raw=true. The .url_check_allowlist.txt entry grandfathering the old workspace URL was deleted: that URL no longer appeared in any source file, so the entry held a green check over nothing.
    • Neither repo told the reader where to clone it. Both already had a __Directories__ block; only the clone URL was missing (and config/ in HowToLens). That is the same defect that opened this issue, in the other spelling, so it shipped here.
    • chapter_optional/tutorial_searches.py wrote three of its four searches into output/howtolens/chapter_2/ instead of chapter_optional/. Fixed, with the four print strings naming those paths moved in the same commit.

    Root cause worth knowing

    markdown/ is built by generate_markdown.py, a different tool from the generate.py that builds notebooks/, over a curated subset, and it really executes the scripts. Anyone following the documented regeneration step rebuilds notebooks/ and silently misses markdown/ — which is how the sibling HowToFit fix for this same bug shipped with a stale markdown mirror.

    Rendering from a task worktree also leaked the developer's directory layout into published pages. Fixed separately in PyAutoLabs/PyAutoHands#281 (issue PyAutoLabs/PyAutoHands#280), with a guard that now fails the build rather than publishing a machine layout.

    Still open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions