Overview
Sub-task 2 of 3 following up on #78. The howtolens tutorial series now lives in its own repo at PyAutoLabs/HowToLens (bootstrap shipped 2026-04-21 via PyAutoLabs/HowToLens#1). This task removes the now-duplicate content from autolens_workspace and rewires the surviving cross-references to point at the new repo.
Plan
- Delete
scripts/howtolens/ and notebooks/howtolens/ wholesale from autolens_workspace.
- Fix the three
scripts/guides/ scripts that auto-simulate their dataset by invoking scripts/howtolens/simulator/lens_sersic.py as a subprocess — they'd break when howtolens goes. Either relocate the simulator into autolens_workspace's own simulator layout or switch the guides to a shipped dataset.
- Slim the "HowToLens" sections of
README.rst and start_here.py down to a short pointer paragraph + link to the new repo.
- Rewrite remaining howtolens URL references inside other autolens_workspace scripts/notebooks (e.g.
scripts/imaging/modeling.py, interferometer/modeling.py, group/modeling.py) to point at github.com/PyAutoLabs/HowToLens.
- Drop howtolens-keyed entries from
config/build/env_vars.yaml and config/build/no_run.yaml.
- PyAutoLens-side docs (
docs/howtolens/, docs/overview/, docs/general/workspace.rst, paper.md, etc.) are explicitly deferred to sub-task 3 (docs-update).
Detailed implementation plan
Affected Repositories
- autolens_workspace (primary, PyAutoLabs/autolens_workspace)
Work Classification
Workspace
Branch Survey
| Repository |
Current Branch |
Dirty? |
| ./autolens_workspace |
main |
clean (one stray untracked path/ dir, unrelated) |
Suggested branch: feature/howtolens-workspace-cleanup
Worktree root: ~/Code/PyAutoLabs-wt/howtolens-workspace-cleanup/ (created later by /start_workspace)
Implementation Steps
-
Delete howtolens content — git rm -r scripts/howtolens notebooks/howtolens.
-
Fix scripts/guides/ simulator subprocess dependency — three callers reference scripts/howtolens/simulator/lens_sersic.py:
scripts/guides/data_structures.py:247
scripts/guides/plot/examples/plotters.py:70
scripts/guides/plot/advanced/plotters_pixelization.py:59
Decision to make at /start_workspace time:
- Option A: move
scripts/howtolens/simulator/lens_sersic.py into autolens_workspace (probably scripts/imaging/simulators/lens_sersic.py or a new scripts/simulator/ area) and rewrite the subprocess paths. Preserves feature parity with existing guide outputs.
- Option B: retarget the three guides onto an already-shipped dataset (e.g.
simple__no_lens_light, which already exists under dataset/imaging/). Simpler but may change the visuals those tutorials produce.
Recommendation: Option A — the lens_sersic dataset is specifically a lens with Sersic light profile, and the guides illustrate plotting of that scenario. Preserving it keeps those guides' outputs stable.
-
README.rst slim-down (autolens_workspace root, ~L12, L41-57, L79) — replace the HowToLens description block with ~2 sentences pointing at the standalone repo. Link: https://github.com/PyAutoLabs/HowToLens.
-
start_here.py slim-down (~L376-391) — replace the HowToLens lecture pitch with a one-paragraph pointer. Regenerate start_here.ipynb via the standard notebook generation step (or let /pre_build handle it later).
-
Cross-reference rewrites — the survey flagged notebook-body mentions in:
notebooks/imaging/modeling.ipynb:853
notebooks/interferometer/modeling.ipynb:710
notebooks/group/modeling.ipynb:992
These are auto-generated; edit the corresponding .py scripts instead. Rewrite prose like "checkout autolens_workspace/*/howtolens" to point at github.com/PyAutoLabs/HowToLens.
-
Build config cleanup:
config/build/env_vars.yaml:38-39 — remove the pattern: "howtolens/" override.
config/build/no_run.yaml:20,25,52-54 — remove howtolens-keyed skip entries.
-
Smoke test — autolens_workspace's existing smoke_tests.txt does not list howtolens scripts, so no list changes expected. Run /smoke-test autolens_workspace after the edits to confirm nothing regressed. Then manually exercise the three fixed scripts/guides/ scripts with PYAUTO_TEST_MODE=2.
Key Files
scripts/howtolens/ — delete
notebooks/howtolens/ — delete
scripts/guides/data_structures.py — fix subprocess call
scripts/guides/plot/examples/plotters.py — fix subprocess call
scripts/guides/plot/advanced/plotters_pixelization.py — fix subprocess call
scripts/imaging/simulators/lens_sersic.py (new) — relocated simulator, if Option A
README.rst — slim HowToLens section
start_here.py — slim HowToLens pitch
scripts/imaging/modeling.py, scripts/interferometer/modeling.py, scripts/group/modeling.py — URL cross-refs
config/build/env_vars.yaml, config/build/no_run.yaml — remove howtolens entries
Out of Scope
PyAutoLens library-side docs updates (sub-task 3: howtolens-docs-update) — index.rst, docs/howtolens/*.rst, docs/overview/*.rst, docs/general/workspace.rst, paper.md, README.rst in the PyAutoLens repo.
Original Prompt
Click to expand starting prompt
Sub-task 2 of 3 following up on #78.
The howtolens tutorial series has been extracted into its own repo at PyAutoLabs/HowToLens (bootstrap PR: PyAutoLabs/HowToLens#1, shipped 2026-04-21).
This sub-task removes the howtolens content from PyAutoLabs/autolens_workspace and updates all internal cross-references that still point at scripts/howtolens/ or notebooks/howtolens/.
In scope
- Delete
scripts/howtolens/ and notebooks/howtolens/ (wholesale).
- Fix the three
scripts/guides/ callers that subprocess.run into scripts/howtolens/simulator/lens_sersic.py — they'll break when howtolens goes: scripts/guides/data_structures.py:247, scripts/guides/plot/examples/plotters.py:70, scripts/guides/plot/advanced/plotters_pixelization.py:59. Pick one of: (a) copy the simulator out of howtolens into scripts/imaging/simulators/ and update subprocess paths; (b) switch the guides to an already-shipped dataset like simple or simple__no_lens_light.
- Slim the HowToLens sections in
autolens_workspace/README.rst (~L12, L41-57, L79) and autolens_workspace/start_here.py (~L376-391) — regenerate matching .ipynb. Replace the embedded content with a short pointer paragraph + a link to https://github.com/PyAutoLabs/HowToLens.
- Update the
howtolens-referencing prose in other workspace scripts/notebooks (cross-refs in scripts/imaging/modeling.py, scripts/interferometer/modeling.py, scripts/group/modeling.py, etc.) to point at the new repo URL rather than autolens_workspace/*/howtolens.
- Remove the howtolens-keyed entries from
config/build/env_vars.yaml and config/build/no_run.yaml (they have no targets to apply to anymore).
Out of scope — sub-task 3
Changes to PyAutoLens/docs/ (index.rst toctree, howtolens/*.rst, overview/*.rst, general/workspace.rst, README.rst, paper.md). These live in the PyAutoLens library repo, not the workspace — deferred to sub-task 3 (howtolens-docs-update).
Validation
- Smoke list: after the edits, run
/smoke-test on autolens_workspace (its existing smoke_tests.txt — no howtolens scripts are currently listed there, so no list edits expected, but confirm).
- Manually run the three
scripts/guides/ callers to confirm the subprocess fix works.
Follow-up
Sub-task 3 (docs-update) will replace the PyAutoLens-side docs that still describe howtolens as an autolens_workspace/howtolens/ subtree. HowToGalaxy + HowToFit get the same three-step treatment once HowToLens is fully bedded in.
Overview
Sub-task 2 of 3 following up on #78. The howtolens tutorial series now lives in its own repo at PyAutoLabs/HowToLens (bootstrap shipped 2026-04-21 via PyAutoLabs/HowToLens#1). This task removes the now-duplicate content from
autolens_workspaceand rewires the surviving cross-references to point at the new repo.Plan
scripts/howtolens/andnotebooks/howtolens/wholesale from autolens_workspace.scripts/guides/scripts that auto-simulate their dataset by invokingscripts/howtolens/simulator/lens_sersic.pyas a subprocess — they'd break when howtolens goes. Either relocate the simulator into autolens_workspace's own simulator layout or switch the guides to a shipped dataset.README.rstandstart_here.pydown to a short pointer paragraph + link to the new repo.scripts/imaging/modeling.py,interferometer/modeling.py,group/modeling.py) to point atgithub.com/PyAutoLabs/HowToLens.config/build/env_vars.yamlandconfig/build/no_run.yaml.docs/howtolens/,docs/overview/,docs/general/workspace.rst,paper.md, etc.) are explicitly deferred to sub-task 3 (docs-update).Detailed implementation plan
Affected Repositories
Work Classification
Workspace
Branch Survey
path/dir, unrelated)Suggested branch:
feature/howtolens-workspace-cleanupWorktree root:
~/Code/PyAutoLabs-wt/howtolens-workspace-cleanup/(created later by/start_workspace)Implementation Steps
Delete howtolens content —
git rm -r scripts/howtolens notebooks/howtolens.Fix
scripts/guides/simulator subprocess dependency — three callers referencescripts/howtolens/simulator/lens_sersic.py:scripts/guides/data_structures.py:247scripts/guides/plot/examples/plotters.py:70scripts/guides/plot/advanced/plotters_pixelization.py:59Decision to make at
/start_workspacetime:scripts/howtolens/simulator/lens_sersic.pyinto autolens_workspace (probablyscripts/imaging/simulators/lens_sersic.pyor a newscripts/simulator/area) and rewrite the subprocess paths. Preserves feature parity with existing guide outputs.simple__no_lens_light, which already exists underdataset/imaging/). Simpler but may change the visuals those tutorials produce.Recommendation: Option A — the
lens_sersicdataset is specifically a lens with Sersic light profile, and the guides illustrate plotting of that scenario. Preserving it keeps those guides' outputs stable.README.rst slim-down (autolens_workspace root, ~L12, L41-57, L79) — replace the HowToLens description block with ~2 sentences pointing at the standalone repo. Link:
https://github.com/PyAutoLabs/HowToLens.start_here.py slim-down (~L376-391) — replace the HowToLens lecture pitch with a one-paragraph pointer. Regenerate
start_here.ipynbvia the standard notebook generation step (or let/pre_buildhandle it later).Cross-reference rewrites — the survey flagged notebook-body mentions in:
notebooks/imaging/modeling.ipynb:853notebooks/interferometer/modeling.ipynb:710notebooks/group/modeling.ipynb:992These are auto-generated; edit the corresponding
.pyscripts instead. Rewrite prose like "checkoutautolens_workspace/*/howtolens" to point atgithub.com/PyAutoLabs/HowToLens.Build config cleanup:
config/build/env_vars.yaml:38-39— remove thepattern: "howtolens/"override.config/build/no_run.yaml:20,25,52-54— remove howtolens-keyed skip entries.Smoke test — autolens_workspace's existing
smoke_tests.txtdoes not list howtolens scripts, so no list changes expected. Run/smoke-test autolens_workspaceafter the edits to confirm nothing regressed. Then manually exercise the three fixedscripts/guides/scripts withPYAUTO_TEST_MODE=2.Key Files
scripts/howtolens/— deletenotebooks/howtolens/— deletescripts/guides/data_structures.py— fix subprocess callscripts/guides/plot/examples/plotters.py— fix subprocess callscripts/guides/plot/advanced/plotters_pixelization.py— fix subprocess callscripts/imaging/simulators/lens_sersic.py(new) — relocated simulator, if Option AREADME.rst— slim HowToLens sectionstart_here.py— slim HowToLens pitchscripts/imaging/modeling.py,scripts/interferometer/modeling.py,scripts/group/modeling.py— URL cross-refsconfig/build/env_vars.yaml,config/build/no_run.yaml— remove howtolens entriesOut of Scope
PyAutoLens library-side docs updates (sub-task 3: howtolens-docs-update) —
index.rst,docs/howtolens/*.rst,docs/overview/*.rst,docs/general/workspace.rst,paper.md,README.rstin the PyAutoLens repo.Original Prompt
Click to expand starting prompt
Sub-task 2 of 3 following up on #78.
The howtolens tutorial series has been extracted into its own repo at
PyAutoLabs/HowToLens(bootstrap PR: PyAutoLabs/HowToLens#1, shipped 2026-04-21).This sub-task removes the howtolens content from
PyAutoLabs/autolens_workspaceand updates all internal cross-references that still point atscripts/howtolens/ornotebooks/howtolens/.In scope
scripts/howtolens/andnotebooks/howtolens/(wholesale).scripts/guides/callers thatsubprocess.runintoscripts/howtolens/simulator/lens_sersic.py— they'll break when howtolens goes:scripts/guides/data_structures.py:247,scripts/guides/plot/examples/plotters.py:70,scripts/guides/plot/advanced/plotters_pixelization.py:59. Pick one of: (a) copy the simulator out of howtolens intoscripts/imaging/simulators/and update subprocess paths; (b) switch the guides to an already-shipped dataset likesimpleorsimple__no_lens_light.autolens_workspace/README.rst(~L12, L41-57, L79) andautolens_workspace/start_here.py(~L376-391) — regenerate matching.ipynb. Replace the embedded content with a short pointer paragraph + a link tohttps://github.com/PyAutoLabs/HowToLens.howtolens-referencing prose in other workspace scripts/notebooks (cross-refs inscripts/imaging/modeling.py,scripts/interferometer/modeling.py,scripts/group/modeling.py, etc.) to point at the new repo URL rather thanautolens_workspace/*/howtolens.config/build/env_vars.yamlandconfig/build/no_run.yaml(they have no targets to apply to anymore).Out of scope — sub-task 3
Changes to
PyAutoLens/docs/(index.rst toctree,howtolens/*.rst,overview/*.rst,general/workspace.rst,README.rst,paper.md). These live in the PyAutoLens library repo, not the workspace — deferred to sub-task 3 (howtolens-docs-update).Validation
/smoke-testonautolens_workspace(its existingsmoke_tests.txt— no howtolens scripts are currently listed there, so no list edits expected, but confirm).scripts/guides/callers to confirm the subprocess fix works.Follow-up
Sub-task 3 (docs-update) will replace the PyAutoLens-side docs that still describe howtolens as an
autolens_workspace/howtolens/subtree. HowToGalaxy + HowToFit get the same three-step treatment once HowToLens is fully bedded in.