Skip to content

Add example notebook CI#363

Merged
blink1073 merged 10 commits intoCalysto:mainfrom
blink1073:test-notebooks
Mar 12, 2026
Merged

Add example notebook CI#363
blink1073 merged 10 commits intoCalysto:mainfrom
blink1073:test-notebooks

Conversation

@blink1073
Copy link
Copy Markdown
Contributor

@blink1073 blink1073 commented Mar 12, 2026

Summary

  • Adds scripts/run_notebooks.sh to execute all example notebooks (except Calysto Processing and SAS) via jupyter nbconvert --execute, using uv run --with to supply the appropriate kernel package for each notebook
  • Starts an ipcluster with 5 engines before running (required by Mandelbrot.ipynb for parallel computation across n=30 rows); polls until all engines are connected rather than using a fixed sleep
  • Adds just run-notebooks recipe to the justfile
  • Adds a run_notebooks job to .github/workflows/tests.yml running on ubuntu-latest, with minimal permissions and persist-credentials: false
  • Updates CONTRIBUTING.md with a section describing the example notebooks and how they are tested

Test plan

  • Ran just run-notebooks locally — all 6 notebooks executed successfully

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.
@blink1073 blink1073 enabled auto-merge (squash) March 12, 2026 15:25
Comment thread .github/workflows/tests.yml Fixed
Comment thread .github/workflows/tests.yml Fixed
Comment thread .github/workflows/tests.yml Fixed
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 12, 2026

Codecov Report

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

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.
📢 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.

- 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.
Comment thread .github/workflows/tests.yml Fixed
- 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.
@blink1073 blink1073 merged commit 0084f02 into Calysto:main Mar 12, 2026
25 checks passed
@blink1073 blink1073 deleted the test-notebooks branch March 12, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants