feature/pyodide package cache - #350
Conversation
|
Caution Review failedFailed to post review comments. GitHub was unavailable or timed out while CodeRabbit was posting the review. Please request a new review later if the pull request still needs one. This happened while posting 2 inline comments. Use ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2026-07-14T00:30:42.344ZApplied to files:
🪛 ast-grep (0.44.1)src/py/mat3ra/notebooks_utils/pyodide/packages/wheel_cache.py[info] 120-120: use jsonify instead of json.dumps for JSON output (use-jsonify) src/py/mat3ra/notebooks_utils/pyodide/packages/install.py[warning] 27-27: Do not make http calls without encryption (requests-http) [info] 30-30: Do not hardcode temporary file or directory names (hardcoded-tmp-file) [info] 306-306: use jsonify instead of json.dumps for JSON output (use-jsonify) 🪛 Ruff (0.15.21)src/py/mat3ra/notebooks_utils/pyodide/packages/install.py[error] 31-31: Probable insecure usage of temporary file or directory: "/tmp/wheel_cache" (S108) [warning] 277-277: Do not catch blind exception: (BLE001) 📝 WalkthroughWalkthroughPyodide package installation now supports persistent IndexedDB wheel caching, requirement-hash tracking, forced reinstalls, and cache toggling. IndexedDB schema version 2 adds wheel stores, while the public installer forwards the new controls. ChangesPyodide wheel caching
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant NotebookInstaller
participant PyodideInstaller
participant IndexedDB
participant micropip
NotebookInstaller->>PyodideInstaller: install_packages_pyodide(force, use_cache)
PyodideInstaller->>IndexedDB: Read manifest and cached wheel
IndexedDB-->>PyodideInstaller: Cached data or cache miss
PyodideInstaller->>micropip: Install cached or downloaded wheel
PyodideInstaller->>IndexedDB: Store wheel and requirement hash
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Bug Fixes