Repository navigation
feat(ci): add a real-Pyodide dependency-completeness check for JupyterLite - #69
Merged
Merged
Conversation
…rLite Runs the actual Pyodide/WASM runtime under Node.js (the pyodide npm package) against the real, unmodified ensure_installed() from _mvtb_nb_bootstrap.py, so the exact class of bug that shipped in 2.2.0 (a new pyproject.toml dependency added but never added to the Pyodide seed-install list) now fails CI instead of shipping silently. Deliberately scoped to dependency completeness only -- not to whether the real notebook's relative-URL wheel-install path resolves correctly inside a real browser's Pyodide Web Worker, which Node has no equivalent of and can't faithfully test. That question was already answered by testing the real built site in a real browser (see docs/notebooks/ README.md); this check sidesteps it entirely by installing the wheel via Pyodide's own emfs: virtual-filesystem scheme instead of over HTTP. Verified against a deliberately-broken case (tqdm removed from the seed list, reproducing the original 2.2.0 bug) -- fails with a clear diagnostic pointing at the fix, not just a raw traceback. Intended as a template other toolboxes (RTB, bdsim, ...) can copy for their own JupyterLite setups -- see docs/lite/wasm_check/README.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 2 critical 3 high |
🟢 Metrics 0 complexity · 0 duplication
Metric Results Complexity 0 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
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
docs/lite/wasm_check/: a real-Pyodide, real-WASM CI check (Node.js + thepyodidenpm package, not a mock) that_mvtb_nb_bootstrap.py's Pyodide install path actually works — installs every seed package for real, then confirmsimport machinevisiontoolboxsucceeds.tqdmbug that shipped in 2.2.0 (a new dependency added topyproject.tomlbut never added to the Pyodide seed-install list).docs/notebooks/README.md). This check sidesteps the HTTP/URL layer entirely via Pyodide'semfs:virtual-filesystem install scheme.ensure_installed()rather than re-listing seed packages a third time (avoiding exactly the kind of drift this check exists to catch).docs.ymlright after the wheel build, usingactions/setup-nodewith npm caching.Test plan
Running in browser using MVTB v2.2.0 with OpenCV 4.11.0/PASS: Pyodide install check succeeded.tqdmremoved from the seed list, reproducing the original 2.2.0 bug) — fails with a clear diagnostic explaining the likely cause and the fix, not just a raw tracebackpackage-lock.jsoncommitted, pinned to the same Pyodide version (314.0.3) confirmed working in real-browser testing earlier🤖 Generated with Claude Code