Colab-first dependencies, vendored plotting helpers, Colab smoke tests - #10
Merged
Merged
Conversation
Dependencies: - pyproject.toml documents why Colab-preinstalled packages are unconstrained and where reproducibility comes from (uv.lock locally). - colab_bootstrap.sh installs requirements-colab.txt with --no-deps: only what Colab lacks, never touching preinstalled (already imported) packages, so no runtime restart. Also no more PEP 517 build just to read a dependency list. - Runtime deps now list what the notebooks import; jupyter moved to dev. - Dropped jupyterlab~=3.6, ipympl, jupyter_nbextensions_configurator and the jupyter-server<2 pin they forced. Dev frontend is now notebook 7. - No [build-system]; [tool.uv] package = false. Vendoring: - freshfig, nRowCol and is_notebook (was mpl_tools.is_notebook_or_qt) were the only things used from mpl-tools; rewritten in tools/plotting.py using only stable, public matplotlib/IPython API. mpl-tools kept breaking on Colab's matplotlib upgrades via its use of internals. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Run inside Google's published Colab runtime image: bootstrap, check that no preinstalled package changed (the restart hazard), execute both notebooks. Monthly cron catches Colab's upgrades; also on PRs/pushes touching Colab files. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`minires~=0.3.0` replaces the git-commit pin, in `pyproject.toml`, `requirements-colab.txt` and the lockfile. minires is 0.x, so a minor bump may break the API; the pin therefore advances deliberately, with the notebooks checked against the new version. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
nbclient's asyncio loop intermittently misses the execute-reply of cells that emit a burst of ipywidgets comm messages (our interact/toggle_items cells), stalling for the full per-cell timeout ~50% of the time. Seen with nbclient 0.11, jupyter_client 8.10, pyzmq 25-27, ipykernel 6 and 7. The blocking client polls synchronously and is unaffected (8/8 fast). Also: -v prints each cell with its duration; timeouts are failures. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Summary
mpl-toolshelpers actually used (freshfig,nRowCol,is_notebook) intotools/plotting.py, using only stable API; dropmpl-tools.pyproject.toml: Colab-preinstalled packages unconstrained,uv.lockfor local reproducibility,requirements-colab.txt+pip install --no-depson Colab so nothing already imported gets reinstalled (no runtime restart), and no PEP 517 build just to read a dependency list.jupyterlab~=3.6,ipympl,jupyter_nbextensions_configuratorand thejupyter-server<2pin; dev frontend is notebook 7.tests/colab/running inside Google's published Colab runtime image (bootstrap, freeze diff, execute both notebooks), via thecolab-compatworkflow: monthly, on PRs, and on pushes to master touching Colab files.Test plan
tests/colab/run_nb.py).colab-compatworkflow passes on this PR.🤖 Generated with Claude Code