Add example notebook CI#363
Merged
blink1073 merged 10 commits intoCalysto:mainfrom Mar 12, 2026
Merged
Conversation
Adds a bash script that starts an ipcluster (5 engines), executes all example notebooks except Calysto Processing and SAS via nbconvert with per-kernel uv --with packages, then stops the cluster. Adds a justfile target and a GitHub Actions job that runs the script on ubuntu-latest. Updates CONTRIBUTING.md with a section describing the notebooks and how they are tested.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #363 +/- ##
=======================================
Coverage 90.95% 90.95%
=======================================
Files 51 51
Lines 2874 2874
Branches 402 402
=======================================
Hits 2614 2614
Misses 181 181
Partials 79 79 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add permissions: contents: read to run_notebooks job - Add persist-credentials: false on checkout - Fix setup-uv SHA to match v7 tag - Add --with nbconvert to uv run in run_notebooks.sh (not present in CI env)
- Move run_notebooks.sh to scripts/run_notebooks.sh - Fix EXAMPLES_DIR and kernel paths to resolve via REPO_DIR - Replace fixed sleep with polling loop that waits for all 5 engines to connect (fixes flaky CI failures on slow runners)
--with creates an ephemeral overlay env that spawned engine subprocesses don't inherit, so engines fail to start. --extra parallel installs ipyparallel into the venv proper.
- Pass --extra parallel to the Mandelbrot nbconvert invocation so the calysto_scheme kernel has ipyparallel available for %%parallel magic - Fix maintainer-tools base-setup SHA to match v1 tag
The engine processes need to import calysto_scheme, so both the kernel install and ipcluster start must run in the same uv env (--extra parallel --with calysto-scheme).
--daemonize causes uv to clean up the --with overlay before engine processes start, making calysto_scheme unimportable. Backgrounding with & keeps the uv process alive so the overlay persists.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/run_notebooks.shto execute all example notebooks (except Calysto Processing and SAS) viajupyter nbconvert --execute, usinguv run --withto supply the appropriate kernel package for each notebookMandelbrot.ipynbfor parallel computation acrossn=30rows); polls until all engines are connected rather than using a fixed sleepjust run-notebooksrecipe to the justfilerun_notebooksjob to.github/workflows/tests.ymlrunning onubuntu-latest, with minimal permissions andpersist-credentials: falseCONTRIBUTING.mdwith a section describing the example notebooks and how they are testedTest plan
just run-notebookslocally — all 6 notebooks executed successfully