Skip to content

chore: remove stale notebooks/scripts, unlinked and years out of sync - #51

Merged
petercorke merged 1 commit into
mainfrom
chore/remove-stale-notebook-scripts
Sep 26, 2026
Merged

petercorke merged 1 commit into
mainfrom
chore/remove-stale-notebook-scripts

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

  • notebooks/scripts/*.py was a one-off jupytext (py:light) export of the chapter notebooks from April 2022. Confirmed by regenerating the exact April-2022 notebook with jupytext and diffing against what was committed in that same commit — a near-exact structural match (unlike plain jupyter nbconvert --to python, which adds a shebang/coding header and # In[ ]: markers that these files never had).
  • Only 4 of the 16 files were ever regenerated since (Jan 2023, "regenerated from book LaTeX source"). The rest — including chap2.py — have been frozen since the original commit while their source notebooks kept receiving fixes. Concretely: the framelabel/frame typo just fixed in chap2.ipynb (Fix frame labels in chapter 2 notebook #50) was still present in chap2.py.
  • Nothing in the repo links to or documents this folder. notebooks/README.md's own "Convert to Python script" section already documents the manual jupyter nbconvert --to python command as the way to get a .py copy of a notebook, independent of whether one is pre-generated and committed.
  • Removing the stale, undiscoverable copies rather than adding CI/bot machinery to keep them in sync — this repo has a light, book-companion maintenance model, and:
    • a CI drift-check would need a pinned jupytext dev-dependency (output format is version-sensitive — confirmed empirically) plus a required regenerate-before-commit step for every notebook edit, code or markdown;
    • an auto-commit bot can't actually work for external-contributor PRs (GitHub Actions' default token has no write access to a fork's branch), and even for direct pushes it removes the one human-review checkpoint on the generated diff.
  • Also removes notebooks/Makefile, which only ever supported the reverse direction (.py → .ipynb via jupytext) and has no remaining purpose once the .py files it consumed are gone.

Test plan

  • Grepped the whole repo (README, docs, notebooks, Makefile) for any reference to notebooks/scripts or notebooks/Makefile — none found
  • Grepped tests/ for any reference to the removed files — none found
  • Ran the fast test suite; two pre-existing failures encountered are unrelated environment gaps (missing nbformat, missing roboticstoolbox-python package metadata in this dev env), confirmed by reproducing them directly outside this change

🤖 Generated with Claude Code

notebooks/scripts/*.py was a one-off jupytext (py:light) snapshot of the
chapter notebooks from April 2022 (confirmed by regenerating the
April-2022 notebook with jupytext and diffing against the committed
file at that same commit -- near-exact match, unlike plain `jupyter
nbconvert --to python`, which adds shebang/coding headers and `# In[ ]:`
markers this file never had). Only 4 of the 16 files were ever
regenerated since (Jan 2023, "regenerated from book LaTeX source"); the
rest, including chap2.py, have been frozen since the original commit
while their source notebooks kept receiving fixes -- e.g. the
framelabel/frame typo just fixed in the chap2 notebook was still
present here.

Nothing in the repo links to or documents this folder -- the README's
own "Convert to Python script" section already documents the manual
`jupyter nbconvert --to python` command as the way to get a .py copy of
a notebook, independent of whether one is pre-generated and committed.
Removing the stale, undiscoverable copies rather than adding CI/bot
machinery to keep them in sync: this repo is book-companion content
with a light maintenance model, not worth the ongoing ceremony of a
drift-check (needs a pinned jupytext dev-dependency and a required
regenerate-before-commit step) or an auto-commit bot (can't actually
work for external-contributor PRs, since GitHub Actions' default token
has no write access to a fork's branch; removes the one human-review
checkpoint on the generated diff even for direct pushes).

Also removes notebooks/Makefile, which only ever supported the reverse
direction (.py -> .ipynb via jupytext) and has no remaining purpose
once the .py files it consumed are gone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@petercorke
petercorke merged commit 3017bb8 into main Sep 26, 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