Skip to content

Extract howtofit into its own repository #38

@Jammy2211

Description

@Jammy2211

Overview

Move the HowToFit tutorial series out of autofit_workspace into a standalone
PyAutoLabs/HowToFit repository, mirroring the recent HowToLens extraction
(PyAutoLens PR #468 + autolens_workspace PRs, HowToLens bootstrap PR #1) and
HowToGalaxy extraction (PyAutoGalaxy PR #363 + autogalaxy_workspace PR #37,
HowToGalaxy bootstrap PR #1). Each lecture series becomes its own versioned,
tagged, independently-releasable repo rather than a subtree of the workspace,
and is now picked up automatically by /pre_build (see PyAutoBuild PR #53 which
registered HowToLens and HowToGalaxy).

Plan

  • Scaffold a new PyAutoLabs/HowToFit repo with chapters 1-3 extracted out of
    autofit_workspace/scripts/howtofit and autofit_workspace/notebooks/howtofit
    (keep chapter_2_scientific_workflow as a deliberate empty stub, drop loose
    intro/plan text files). Tag matching the current workspace version.
  • Delete howtofit/ from autofit_workspace and rewrite the 8 cross-references
    that still point into it (welcome.py, cookbooks, both READMEs, CLAUDE.md,
    top-level README).
  • Update PyAutoFit library docs and paper to frame HowToFit as a standalone
    repo — 31 references across README, docs/howtofit/, docs/index.rst,
    docs/general/workspace.rst, paper/paper.md, and the docs/api/
    cross-refs.
  • Register HowToFit in PyAutoBuild alongside HowToLens and HowToGalaxy so
    /pre_build tags the new repo and bumps its Colab URLs on every release.
Detailed implementation plan

Affected Repositories

  • autofit_workspace (primary — umbrella + sub-2)
  • PyAutoLabs/HowToFit (new, sub-1 target)
  • PyAutoFit (sub-3 target)
  • PyAutoBuild (follow-up target)

Work Classification

Workspace (umbrella lives on autofit_workspace; sub-tasks fan out to the library and build repos later).

Branch Survey

Repository Current Branch Dirty?
./autofit_workspace main clean
./PyAutoFit (not yet touched)
./PyAutoBuild main clean
PyAutoLabs/HowToFit (does not exist yet)

Suggested branch (sub-1): feature/howtofit-bootstrap (on the new PyAutoLabs/HowToFit once created).
Worktree root: ~/Code/PyAutoLabs-wt/howtofit-bootstrap/

Starting state

  • Jammy2211/HowToFit exists on GitHub but is empty (no default branch). Sub-1
    scaffolds PyAutoLabs/HowToFit directly — no transfer step.
  • autofit_workspace/version.txt = 2026.4.13.6 (matches HowToLens/HowToGalaxy
    extraction tag).
  • scripts/howtofit/ contents:
    • chapter_1_introduction/: start_here.py + 5 tutorials
    • chapter_2_scientific_workflow/: empty stub (README.rst + __init__.py)
    • chapter_3_graphical_models/: 8 tutorials (including two tutorial_optional_*)
    • Loose text files intro and plan (legacy planning notes)
  • No cross-module simulator dependencies — sub-2 is a clean delete (unlike
    HowToGalaxy which had to relocate sersic.py back to scripts/imaging/).

Sub-task 1 — bootstrap PyAutoLabs/HowToFit

  1. Create PyAutoLabs/HowToFit repo (public, empty init).
  2. Copy autofit_workspace/scripts/howtofit/* → new repo scripts/ (drop the howtofit/ segment).
  3. Copy autofit_workspace/notebooks/howtofit/* → new repo notebooks/.
  4. Keep chapter_2_scientific_workflow/ stub; drop loose intro/plan.
  5. Add workspace-like scaffolding: config/, root-level start_here.py, welcome.py,
    version.txt (2026.4.13.6), requirements.txt, runtime.txt, smoke_tests.txt,
    CLAUDE.md, README.rst, CITATIONS.rst, CODE_OF_CONDUCT.md, CONTRIBUTING.md, LICENSE.
  6. Rewrite in-tutorial Colab URLs from PyAutoLabs/autofit_workspace/blob/<old>/notebooks/howtofit/chapter_X/...
    to PyAutoLabs/HowToFit/blob/2026.4.13.6/notebooks/chapter_X/....
  7. Tag 2026.4.13.6, push.

Sub-task 2 — remove howtofit from autofit_workspace

  • Delete scripts/howtofit/ and notebooks/howtofit/.
  • Update these files to point at the new repo:
    • welcome.py:79 (description bullet)
    • scripts/cookbooks/multiple_datasets.py:458 (URL link)
    • scripts/README.rst:6, notebooks/README.rst:6 (bullet)
    • CLAUDE.md:11 (file layout)
    • README.rst:15,46,65 (various prose + toctree-style links)
  • Drop howtofit-specific entries from config/build/no_run.yaml,
    config/build/env_vars.yaml if present.
  • New issue will be opened on autofit_workspace when sub-2 starts.

Sub-task 3 — update PyAutoFit library docs/URLs

Rewrite every howtofit URL across:

  • README.rst
  • docs/index.rst (toctree stays local; only link refs change)
  • docs/howtofit/*.rst (4 pages — bulk-sed the Colab URLs)
  • docs/general/workspace.rst
  • paper/paper.md
  • docs/api/{searches,plot,priors,samples,analysis,database,model}.rst (cross-refs)
  • docs/cookbooks/multiple_datasets.rst
  • docs/science_examples/astronomy.rst
  • docs/overview/statistical_methods.rst
  • docs/features/graphical.rst

Migration pattern:
PyAutoLabs/autofit_workspace/blob/<old>/notebooks/howtofit/chapter_X/tutorial_Y.ipynb
PyAutoLabs/HowToFit/blob/2026.4.13.6/notebooks/chapter_X/tutorial_Y.ipynb

New issue will be opened on PyAutoFit when sub-3 starts.

Follow-up — register HowToFit in PyAutoBuild

Piggybacks on PR #53 (HowToLens/HowToGalaxy registration). Add HowToFit/howtofit to:

  • pre_build.sh
  • .github/workflows/release.yml (find_scripts, generate_notebooks, run_scripts Configure, run_notebooks Configure, release_workspaces)
  • autobuild/config/copy_files.yaml, autobuild/config/no_run.yaml
  • autobuild/bump_colab_urls.sh regex
  • CLAUDE.md workspace table + bump_colab_urls description

Can be a standalone PR or ride with sub-3.

Key Files

  • autofit_workspace/scripts/howtofit/** — source material for sub-1, deleted in sub-2.
  • autofit_workspace/welcome.py, README.rst, CLAUDE.md, scripts/README.rst, notebooks/README.rst, scripts/cookbooks/multiple_datasets.py — sub-2 prose updates.
  • PyAutoFit/docs/howtofit/*.rst, PyAutoFit/README.rst, PyAutoFit/paper/paper.md, PyAutoFit/docs/**/*.rst — sub-3 URL rewrites.
  • PyAutoBuild/pre_build.sh, .github/workflows/release.yml, autobuild/config/*.yaml, autobuild/bump_colab_urls.sh — follow-up registration.

Original Prompt

Click to expand starting prompt

$(cat /home/jammy/Code/PyAutoLabs/admin_jammy/prompt/autofit/howtofit.md)

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