Skip to content

feat: add notebook smoke tests - #46

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/smoke-notebooks
Apr 30, 2026
Merged

feat: add notebook smoke tests#46
Jammy2211 merged 1 commit into
mainfrom
feature/smoke-notebooks

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Adds notebook-based smoke tests to the autofit_workspace CI. The existing script smoke loop now runs a second pass over Jupyter notebooks listed in smoke_notebooks.txt, executed via jupyter nbconvert. If a notebook fails to execute the runner regenerates it from its source .py script via PyAutoBuild's py_to_notebook and retries once — catching stale notebooks without needing a full generate.py pass. Whole-workspace regeneration stays the responsibility of generate.py; smoke only regenerates the single failing notebook so the recovery is cheap.

Scripts Changed

  • .github/scripts/run_smoke.py — extended with notebook execution loop, temp-dir output (so checked-in notebooks aren't dirtied), and regen-on-failure
  • .github/workflows/smoke_tests.yml — added PyAutoBuild checkout, jupyter/nbconvert/ipynb-py-convert install, and PYTHONPATH=PyAutoBuild/autobuild for the runner step
  • smoke_notebooks.txt (new)overview/overview_1_the_basics.ipynb, searches/mcmc.ipynb

Refs PyAutoLabs/autolens_workspace#110

Test Plan

  • Smoke tests pass for all affected workspaces

🤖 Generated with Claude Code

Extend run_smoke.py to also execute notebooks listed in
smoke_notebooks.txt via jupyter nbconvert. Executed copies are
written to /tmp so the checked-in notebooks/ tree stays clean. On
execution failure the runner regenerates the single failing
notebook from its source .py script via PyAutoBuild's
py_to_notebook and retries once, catching stale notebooks where
the on-disk .ipynb wasn't refreshed by /pre_build's generate.py.

The workflow now also checks out PyAutoBuild and installs jupyter
+ nbconvert + ipynb-py-convert, with PyAutoBuild/autobuild on
PYTHONPATH for the runner step.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Apr 30, 2026
@Jammy2211
Jammy2211 merged commit ec62059 into main Apr 30, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant