Skip to content

New action: Colab compatibility check for lecture notebooks #185

Open

Description

@quantecon-services

Why

Readers open the lectures in Google Colab through the theme's launch links, so a lecture that fails in Colab's environment fails for them. The idea was recorded in docs/FUTURE-DEVELOPMENT.md, which #178 removed (source).

What runs today

Four repositories run a Colab check (the survey on #194, 2026-11-15):

Repository When it runs Reports by
lecture-python.myst weekly a new issue per failure, titled with its run ID
lecture-jax every pull request an artifact only
lecture-python-intro every pull request nothing; it also deploys a Netlify preview from the Colab build
lecture-stats every pull request nothing; it also deploys a Netlify preview

None of them tests what a reader runs. Each restores cache.yml's _build, .jupyter_cache included, and builds the MyST sources with jb build and execute_notebooks: cache. So only the lectures changed since the last cache build execute in Colab, and what executes is the MyST source, not the sphinx-tojupyter notebook the launch button opens. The failures that could be traced came from the workflows themselves, not Colab's runtime: tool pins drifting from environment.yml, fatal under -W, and stale redirect warnings in the restored _build.

Proposal

A shared check adds something only if it runs the built notebooks in Colab's image, as readers do:

  • run the sphinx-tojupyter notebooks inside us-docker.pkg.dev/colab-images/public/runtime, pinned for each run to the digest latest has at that moment, without the conda-built cache;
  • take the build tools from environment.yml, so that the check's own pins can't drift;
  • on failure, compare the image digest and the source SHA with the last passing run, so that a Colab runtime change and a lecture change are told apart;
  • file one deduplicated issue per cause, and never make it a required pull-request check.

Blocked by #2

That is #2's standalone execution check of built notebooks, with Colab's image as one target. Nothing is built here until #2 has a design, and #2 is low-priority and exploratory (docs/dev/PLAN.md), so this issue waits with it.

Settled

Activity

  1. added
    infrastructure
    on Sep 24, 2026
  2. quantecon-services commented on Sep 24, 2026

    @quantecon-services
    CollaboratorAuthor

    Blocked by: #194, the decision on whether link checking and Colab checks move from per-repo workflows into shared actions. That reopens PLAN.md's settled "collab.yml remains standalone". The native dependency still needs adding; the tools used for this triage can't create one.


    Generated by Claude Code

  3. mmcky commented on Nov 15, 2026

    @mmcky
    Contributor

    Body rewritten after the decision on #194 (2026-11-16). It said only lecture-python.myst runs a Colab check: four repositories do. And all four build the MyST sources with the conda-built cache, so a shared action adds something only if it runs the built notebooks in Colab's image. That is #2's notebook executor, so this issue stays open, blocked on #2. The "Needs deciding first" section is gone: #194 settled PLAN's standalone-workflow rule, and the survey answered the questions about demand and the unpinned image. The new body records both.

    Claude Code (on behalf of mmcky)

  4. added a commit that references this issue on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructure

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions