Skip to content

feat: bootstrap HowToLens from autolens_workspace tutorials#1

Merged
Jammy2211 merged 1 commit intomainfrom
feature/howtolens-bootstrap
Apr 21, 2026
Merged

feat: bootstrap HowToLens from autolens_workspace tutorials#1
Jammy2211 merged 1 commit intomainfrom
feature/howtolens-bootstrap

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

Extracts the howtolens tutorial lecture series from autolens_workspace into its own repository. Brings HowToLens into line with the other PyAutoLabs workspace repos so it can be built, smoke-tested, and released independently.

  • 204 files added (chapters 1–4 + chapter_optional, simulator/, config/, notebooks/, scripts/, CI workflows, README.rst, CLAUDE.md, smoke_tests.txt, version.txt, welcome.py, start_here.py).
  • Mirrors the autolens_workspace / autogalaxy_workspace / autofit_workspace layout — scripts/chapter_<N>_<name>/, notebooks/chapter_<N>_<name>/, config/, dataset/ (runtime), output/ (runtime).
  • Datasets are generated at runtime by scripts/simulator/ — no .fits committed. Tutorials that need pre-existing data invoke their simulator via subprocess (see tutorial_7_fitting.py's auto-sim block for the pattern).

Chapters

  • chapter_1_introduction — grids, light/mass profiles, galaxies, tracers, simulated data, fitting
  • chapter_2_lens_modeling — Bayesian inference, non-linear searches, fitting CCD imaging
  • chapter_3_search_chaining — automated pipelines via chained searches
  • chapter_4_pixelizations — pixelized source reconstruction with inversions + regularization
  • chapter_optional — extras (e.g. tutorial_searches.py)

CI

Workflow Purpose
.github/workflows/smoke_tests.yml Python 3.12 + 3.13 matrix. Checks out PyAutoConf, PyAutoFit, PyAutoArray, PyAutoGalaxy, PyAutoLens on matching branch (falls back to main), runs python .github/scripts/run_smoke.py. Slack-notifies on failure.
.github/workflows/url_check.yml Copy of the shared PyAutoBuild/autobuild/url_check.sh runner.

smoke_tests.txt currently lists 6 chapter 1 tutorials (1, 2, 4, 5, 6, 8). Tutorials 0 and 7 are excluded pending a content-alignment pass — see the inline comment in smoke_tests.txt.

Local smoke-test results

Ran chapter 1 locally with PYAUTO_TEST_MODE=2 PYAUTO_FAST_PLOTS=1:

Tutorial Result
0 visualization FAIL — pre-existing upstream bug: missing Path import; depends on pre-simulated dataset/imaging/simple__no_lens_light that HowToLens does not ship
1 grids_and_galaxies PASS
2 ray_tracing PASS
4 point_sources PASS
5 lensing_formalism PASS
6 data PASS (simulates dataset/imaging/howtolens)
7 fitting FAIL — pre-existing upstream bug: second dataset load (line ~615, simple__no_lens_light__mass_sis) has no auto-sim fallback. Upstream autolens_workspace also fails
8 summary PASS

Follow-ups (tracked on PyAutoLabs/autolens_workspace#78)

  1. This bootstrap PR.
  2. workspace-cleanup — remove scripts/howtolens/ and notebooks/howtolens/ from autolens_workspace, update all cross-references.
  3. docs-update — update PyAutoLens docs (index.rst toctree, howtolens/*.rst, README.rst, paper.md, overview/*.rst, general/workspace.rst) to point to the new repo.
  4. PyAutoBuild howtolens project target registration — generate.py currently has no howtolens target; needed before /pre_build can build notebooks for this repo.
  5. Tutorial 0 + 7 content alignment — rework to use HowToLens's runtime-simulation conventions (either auto-sim the datasets they need or switch them to dataset/imaging/howtolens).
  6. Repo transfer — after merge, transfer Jammy2211/HowToLens to the PyAutoLabs org.

Test plan

  • CI smoke tests pass on Python 3.12 + 3.13
  • CI url_check passes
  • Confirm /ship_workspace can operate on HowToLens after PyAutoBuild registration (follow-up PR)

Refs PyAutoLabs/autolens_workspace#78.

🤖 Generated with Claude Code

Extract the howtolens tutorial lecture series into its own repo. Mirrors
the autolens_workspace/autogalaxy_workspace/autofit_workspace layout:

  scripts/chapter_1_introduction … chapter_4_pixelizations
  scripts/simulator/               (runtime dataset generation)
  notebooks/                       (auto-generated from scripts)
  config/                          (PyAutoLens config files)
  smoke_tests.txt                  (subset of chapter 1 for CI)

Datasets are generated at runtime — no .fits committed. Tutorials that
need pre-existing data auto-invoke their simulator; see tutorial 7's
subprocess pattern.

CI:
  .github/workflows/smoke_tests.yml  Python 3.12 + 3.13 matrix, checks out
                                     all PyAutoLabs libraries, runs the
                                     smoke list via run_smoke.py. Slack
                                     notify on failure.
  .github/workflows/url_check.yml    copied verbatim from autolens_workspace.

Two chapter 1 tutorials are intentionally excluded from the initial
smoke list pending a content-alignment pass (documented in
smoke_tests.txt):
  - tutorial_0_visualization — missing Path import + needs pre-simulated
    dataset that HowToLens does not ship.
  - tutorial_7_fitting       — second dataset load at line ~615 has no
    auto-sim fallback. Both issues pre-exist upstream in
    autolens_workspace.

Follow-ups tracked on issue #78:
  1. This bootstrap PR.
  2. howtolens-workspace-cleanup — remove scripts/howtolens/ and
     notebooks/howtolens/ from autolens_workspace, update cross-refs.
  3. howtolens-docs-update — update PyAutoLens docs toctree, paper.md,
     overview/*.rst to reference the new repo.
  4. PyAutoBuild howtolens project target registration.

Refs PyAutoLabs/autolens_workspace#78.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant