CI: tests on three OSes, and the demo notebook built for Colab - #8
Merged
Merged
Conversation
- .github/workflows/tests.yml runs the suite on ubuntu / macOS / Windows with Python 3.10 and 3.12, on pushes to main and on pull requests. The SIGINT test is POSIX-only (os.kill with SIGINT terminates a process on Windows). - .github/workflows/demo-notebook.yml converts examples/demo.py (a `# %%` cell file) to a notebook with jupytext. On pull requests it only builds, as a check; on pushes to main it force-pushes the notebook to the orphan `demo` branch, so main never carries generated files and the notebook cannot go stale. - examples/demo.py gets a first cell that pip-installs liveplot on Colab (plain Python, no magics) and is a no-op elsewhere. - README: "Open in Colab" badge pointing at the demo branch, and a tests badge. Verified locally: the converted notebook executes in a kernel end to end (10 cells, 7 live plots, no errors); the workflows parse; the suite passes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G9zs684RFxHvW6cNWqTPSF
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G9zs684RFxHvW6cNWqTPSF
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.
What
tests.yml: the suite on Ubuntu with Python 3.12, on pushes to main and on every PR. Nothing more: the notebook build only ever runs in CI, and what ships to people is the library and the website. (The SIGINT test carries a POSIX-only marker sinceos.kill(pid, SIGINT)would terminate the process on Windows, should anyone run the suite there.)demo-notebook.yml: convertsexamples/demo.py(the# %%cell tour) toexamples/demo.ipynbwith jupytext. On PRs it only builds, as a check. On pushes tomainit force-pushes the notebook to an orphandemobranch, somainnever carries generated files and the notebook can't drift from the.py.examples/demo.pygets a first cell that pip-installs liveplot when running on Colab (plain Python, no magics, so the same file still runs as a script) and does nothing elsewhere.demo/examples/demo.ipynb, and a tests badge.Verified
demobranch and the Colab badge only become live after this merges and the workflow runs onmainonce (the badge 404s until then).After merging
Watch the first run of "demo notebook" on main, then click the Colab badge. If the repository restricts the default
GITHUB_TOKENto read-only, the publish step needs "Workflow permissions: read and write" under Settings → Actions.🤖 Generated with Claude Code
https://claude.ai/code/session_01G9zs684RFxHvW6cNWqTPSF