rseng-notebooks

Solid

Covers engineering discipline for computational notebooks: execution-order and hidden-state pitfalls, restart-and-run-all hygiene, keeping notebooks in version control with jupytext, testing notebooks with nbval-style execution checks, parameterizing and batch-running them with papermill, refactoring mature notebook code into importable modules, and deciding what belongs in a notebook versus a package. Use PROACTIVELY when a project contains .ipynb files, when the user works in Jupyter or similar notebooks, mentions notebook reproducibility, testing, version control or parameterization, when a notebook has grown into the de-facto pipeline, or when notebook results must become citable, reviewable artifacts.

Code & Development 14 stars 2 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
39
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Notebook engineering Notebooks are where most research computing happens - and their superpower (interactive, stateful, out-of-order execution) is exactly their reproducibility hazard. The discipline is not "stop using notebooks"; it is knowing what notebooks are FOR (exploration, narrative, teaching) and applying engineering at the point where a notebook turns into infrastructure without anyone deciding it should. The CodeRefinery Jupyter lesson teaches the same split. ## Hidden state: the core hazard A notebook's on-screen code and its kernel's actual state can disagree: cells run out of order, deleted cells leave live variables, and a figure can come from code that no longer exists. Working rules: - Restart-and-run-all IS the test: before trusting, committing or sharing any notebook, restart the kernel and run top to bottom. A notebook that only works in one execution order is broken - fix the order now, while you still remember it. - Keep cells re-runnable: no cell should break when run twice (guard appends, recreations, cumulative mutations); avoid mutating a variable across distant cells - derive new names instead. - Definitions up top: imports, parameters and configuration in the first cells; a parameters cell makes intent explicit and enables parameterization later. - Watch execution counts: out-of-sequence numbers in a "final" notebook are the tell (rseng-version-control-review reviewers can see them too). ## Version control that works Raw...

Details

Author
fdiblen
Repository
fdiblen/rseng-agent-skills
Created
4 days ago
Last Updated
4 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category