Skip to content

feat: bootstrap HowToFit repository (sub-1 of howtofit extraction) - #1

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/howtofit-bootstrap
Apr 22, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/howtofit-bootstrap

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Bootstrap the new standalone PyAutoLabs/HowToFit repository by scaffolding the tutorial content extracted from autofit_workspace/scripts/howtofit/. This is sub-1 of a three-step HowToFit extraction, mirroring the pattern used for HowToLens / HowToGalaxy.

After this lands:

  • sub-2 (follow-up): remove howtofit/ from autofit_workspace + update its cross-references
  • sub-3 (follow-up): update PyAutoFit library docs + ~31 URL references across ~10 files
  • pyautobuild-register (follow-up): register the howtofit build target in PyAutoBuild/autobuild/config/

Scripts Changed

Root files

  • README.rst, CITATIONS.rst, CLAUDE.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, LICENSE — scaffolded from the HowToLens template and re-themed for PyAutoFit
  • version.txt (2026.4.13.6), runtime.txt (python-3.11), requirements.txt (autofit, numba), .gitignore
  • start_here.py, welcome.py — top-level entry scripts adapted to use autofit as af
  • smoke_tests.txt — 10 tutorials (tutorial_5_results_and_samples excluded with NEEDS_FIX, tracked by an InstanceInterpolator bug in PyAutoFit)

Tutorial content (copied from autofit_workspace/scripts/howtofit/)

  • scripts/chapter_1_introduction/ — start_here.py, tutorial_1..5, images, README
  • scripts/chapter_2_scientific_workflow/ — stub README (reserved for future material)
  • scripts/chapter_3_graphical_models/ — tutorial_1..5, tutorial_optional_hierarchical_ep, tutorial_optional_hierarchical_individual, README
  • scripts/simulators/ — simulators.py, simulators_sample.py, util.py

Simulator fix: scripts/simulators/simulators.py now chain-runs simulators_sample.py at the end via runpy.run_path. Every chapter-3 tutorial already subprocess.runs simulators.py on cold start; this makes that single call produce the gaussian_x1__low_snr/dataset_N/, gaussian_x1__hierarchical/dataset_N/, and gaussian_x2__offset_centres/dataset_N/ families the tutorials need. Fixes a latent bug inherited from autofit_workspace where committed sample datasets masked the mismatch.

Path substitutions applied throughout scripts/ and notebooks/:

  • "howtofit", "chapter_graphical_models" → "chapter_3_graphical_models"
  • autofit_workspace/output/howtofit/… → HowToFit/output/…
  • Jammy2211/autofit_workspace/blob/…/scripts/howtofit/ → PyAutoLabs/HowToFit/blob/…/scripts/
  • /path/to/autofit_workspace → /path/to/HowToFit (in prose)
  • References to autofit_workspace_developer/scripts/howtofit/... are intentionally preserved — that cross-repo reference still lives in autofit_workspace_developer.

CI / config

  • .github/workflows/smoke_tests.yml — adapted from HowToLens; checks out only PyAutoConf + PyAutoFit; matrix [3.12, 3.13]
  • .github/workflows/url_check.yml, .github/scripts/run_smoke.py — copied verbatim from HowToLens
  • config/ — full autofit_workspace config tree, with config/build/no_run.yaml trimmed to only chapter_1_introduction/tutorial_5_results_and_samples (NEEDS_FIX)

Notebooks

  • notebooks/ — 10 .ipynb files + 3 chapter READMEs. Regenerable via PyAutoBuild's generate.py once the howtofit target is registered. Committed here so this initial PR is self-consistent.

Test Plan

  • Local smoke tests pass — 10/10 scripts under PYAUTO_TEST_MODE=2 (python .github/scripts/run_smoke.py inside the HowToFit worktree)
  • CI smoke_tests.yml passes on this PR
  • url_check.yml passes on this PR

🤖 Generated with Claude Code

Scaffold HowToFit from autofit_workspace/scripts/howtofit/ following the
HowToLens/HowToGalaxy extraction pattern. Includes chapter_1_introduction,
chapter_2_scientific_workflow (stub), chapter_3_graphical_models, and
simulators, plus root files, CI workflows, and a PyAutoFit-only config tree.

Chapter 3 tutorials invoke simulators.py but need datasets produced by
simulators_sample.py — a bug masked in autofit_workspace by committed
datasets. Fixed here by chain-running simulators_sample.py at the end of
simulators.py via runpy.

Sub-2 removes howtofit/ from autofit_workspace; sub-3 updates PyAutoFit
library URLs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Apr 22, 2026
@Jammy2211
Jammy2211 merged commit 42317f1 into main Apr 22, 2026
5 checks passed
@Jammy2211
Jammy2211 deleted the feature/howtofit-bootstrap branch April 22, 2026 13:37
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
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