feat: add JupyterLite in-browser demo sub-site (spec 049, closes #21)#23
Merged
Conversation
Publishes a self-contained JupyterLite site at /jupyterlite/ alongside the frozen playground. One example notebook (demo.ipynb) loads a light sample CSV of European capital city data and renders three matplotlib figures inline — entirely in the browser via Pyodide, no server or account needed. Changes: - jupyterlite/: new demo source directory with pinned requirements.txt (jupyterlite-core==0.8.0, jupyterlite-pyodide-kernel==0.8.1), build and runtime configs, sample dataset, and example notebook - .github/workflows/deploy.yml: additive JupyterLite build step after the existing IDE copy; publishes to _site/jupyterlite/ - .github/workflows/pr-preview.yml: same additive step with PR-scoped base URL; preview comment now lists /jupyterlite/ URL - web/index.html: visible "JupyterLite demo" card link added - .specify/memory/constitution.md: amendment v2.2.0 — JupyterLite demo bullet added to Technology Constraints (new infrastructural dependency) - README.md: demo pin rows added to Pinned versions table - docs/limitations.md: online-only, cold-load, and separate-pin entries Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011jxCebZyA1CpyG5KL3eh5j
Contributor
|
🧹 PR preview for #23 has been removed now that the PR is closed. |
The previous command ran from the workspace root with --config pointing to jupyterlite/jupyter_lite_config.json. JupyterLite still treated the workspace root as lite_dir and looked for files/ there, finding nothing (logs showed "contents: 0 files"). The fix is to set working-directory to jupyterlite/ so lite_dir defaults to jupyterlite/ and the content in jupyterlite/files/ is picked up correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011jxCebZyA1CpyG5KL3eh5j
jupyterlite-core requires jupyter-server to index and copy custom content files (demo.ipynb, sample.csv) into the build output. Without it the build fails with "jupyter-server is not installed. You cannot add custom content to jupyterlite." Pin added at the version already present in the build environment (2.20.0). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011jxCebZyA1CpyG5KL3eh5j
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
/jupyterlite/alongside the frozen playground, built by an additivejupyter lite buildstep in CIdemo.ipynb— a notebook that loads a 30-row sample CSV of European capital cities and renders three matplotlib figures entirely in-browser via Pyodide (no server, no account)deploy.ymlandpr-preview.yml, copying_output/to_site/jupyterlite/without touching the existing pnpm IDE build,keep_files, or sample-package handlingweb/index.htmldocs/limitations.mdentries in the same change per constitution gates 5–6Files changed
jupyterlite/jupyterlite/requirements.txtjupyterlite-core==0.8.0,jupyterlite-pyodide-kernel==0.8.1jupyterlite/files/demo.ipynb%pip install matplotlib, load CSV, render 3 figuresjupyterlite/files/data/sample.csvjupyterlite/jupyter_lite_config.jsonoutput_dir: _output)jupyterlite/jupyter-lite.jsonjupyterlite/README.md.github/workflows/deploy.ymljupyter lite build+ copy to_site/jupyterlite/.github/workflows/pr-preview.yml/jupyterlite/web/index.html.specify/memory/constitution.mdREADME.mdjupyterlite-core,jupyterlite-pyodide-kernel, matplotlib pin rowsdocs/limitations.mdBuild command
Verification
jupyterlite/_output/(confirmed locally)demo.ipynbanddata/sample.csvappear in_output/files/(confirmed)PYODIDE_VERSION = '0.27.7'inapp/src/pyodide/config.ts) is unchangedCloses #21
Generated by Claude Code