Skip to content

docs(notebooks): the first cell is hand-written markdown again, and cell ids are committed - #859

Merged
petercorke merged 2 commits into
mainfrom
chore/notebook-header-plain
Oct 19, 2026
Merged

petercorke merged 2 commits into
mainfrom
chore/notebook-header-plain

Conversation

@petercorke

@petercorke petercorke commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Undoes the generated header of #850 and fixes the cell ids. No change to the toolbox. The notebooks are about to be reviewed and edited by hand, and a generated first cell would be overwritten, or fail --check, on any edit; the first cell should reflect the notebook's content, as in MVTB.

What changes

  • The first cell is hand-written markdown again. The generator, its tests and the rtb_header metadata are removed; each notebook keeps its current header text, including the "Modernised 2026-10-19" note, as ordinary markdown. The logo is an absolute GitHub URL (as in MVTB), because Colab fetches only the one .ipynb file and showed a broken image for figs/....
  • The generated bootstrap cell is unchanged.
  • Cell ids. sync_bootstrap.py now gives every cell an id (nbformat 4.5), and --check reports a missing one. Until now VS Code added ids as soon as a notebook was opened, so opening any notebook changed it.
  • Editor metadata. clear_outputs.py now also resets the metadata an editor writes (the 13 notebooks had seven different kernel names and versions, and leftover toc, varInspector, widgets, interpreter and vscode blocks) to a canonical kernel and language, keeping only our own rtb_bootstrap key, and writes the file exactly as nbformat does (sorted keys), which VS Code does too: opening and saving a notebook no longer changes it. This is a one-time reordering of keys in every notebook.
  • docs/notebooks/README.md says how to edit a notebook: clear the outputs before committing, and run sync_bootstrap.py only after changing the bootstrap template or a notebook's rtb_bootstrap metadata. docs.yml checks both.

18 tests in tests/test_notebook_bootstrap.py pass, and both --check scripts are clean. Written with AI assistance (Claude Code).

🤖 Generated with Claude Code

…ell ids are committed

The generated header is removed: the first cell should reflect the notebook, as in MVTB.
The logo is an absolute URL so that Colab shows it. sync_bootstrap.py gives every cell
an id, so that VS Code no longer changes a notebook when it opens it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@petercorke
petercorke enabled auto-merge (squash) October 19, 2026 20:13
@codacy-production

codacy-production Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 8 high

Alerts:
⚠ 8 issues (≤ 0 issues of at least minor severity)

Results:
8 new issues

Category Results
Security 8 high

View in Codacy

🟢 Metrics 12 complexity · -2 duplication

Metric Results
Complexity 12
Duplication -2

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

…tes notebooks as nbformat does

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@petercorke
petercorke merged commit 742b6ed into main Oct 19, 2026
23 of 24 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 19, 2026
@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (bd9e933) to head (ff00cd8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #859   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        146     146           
  Lines      16867   16867           
=====================================
  Misses     16867   16867           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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