Skip to content

CI: tests on three OSes, and the demo notebook built for Colab - #8

Merged
davidquarel merged 2 commits into
mainfrom
ci-and-colab
Sep 17, 2026
Merged

davidquarel merged 2 commits into
mainfrom
ci-and-colab

Conversation

@davidquarel

@davidquarel davidquarel commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

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 since os.kill(pid, SIGINT) would terminate the process on Windows, should anyone run the suite there.)
  • demo-notebook.yml: converts examples/demo.py (the # %% cell tour) to examples/demo.ipynb with jupytext. On PRs it only builds, as a check. On pushes to main it force-pushes the notebook to an orphan demo branch, so main never carries generated files and the notebook can't drift from the .py.
  • examples/demo.py gets 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.
  • README: an "Open in Colab" badge pointing at demo/examples/demo.ipynb, and a tests badge.

Verified

  • The converted notebook executes end to end in a real kernel: 10 cells, 7 live plot outputs, no errors.
  • Both workflow files parse; the tests workflow runs on this PR itself.
  • The demo branch and the Colab badge only become live after this merges and the workflow runs on main once (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_TOKEN to read-only, the publish step needs "Workflow permissions: read and write" under Settings → Actions.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G9zs684RFxHvW6cNWqTPSF

davidquarel and others added 2 commits September 17, 2026 12:47
- .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
@davidquarel
davidquarel merged commit f69b689 into main Sep 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant