Skip to content

feat: add JupyterLite in-browser demo sub-site (spec 049, closes #21)#23

Merged
IanMayo merged 3 commits into
mainfrom
claude/spec-049-implement-nb5f3u
Jul 4, 2026
Merged

feat: add JupyterLite in-browser demo sub-site (spec 049, closes #21)#23
IanMayo merged 3 commits into
mainfrom
claude/spec-049-implement-nb5f3u

Conversation

@IanMayo

@IanMayo IanMayo commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a self-contained JupyterLite demo at /jupyterlite/ alongside the frozen playground, built by an additive jupyter lite build step in CI
  • Ships demo.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)
  • Wires the build additively into deploy.yml and pr-preview.yml, copying _output/ to _site/jupyterlite/ without touching the existing pnpm IDE build, keep_files, or sample-package handling
  • Adds a visible "JupyterLite demo" card to web/index.html
  • Lands the required constitution amendment (v2.1.0 → v2.2.0), README pin rows, and docs/limitations.md entries in the same change per constitution gates 5–6

Files changed

Path Change
jupyterlite/ New demo source directory
jupyterlite/requirements.txt Pinned: jupyterlite-core==0.8.0, jupyterlite-pyodide-kernel==0.8.1
jupyterlite/files/demo.ipynb Example notebook: %pip install matplotlib, load CSV, render 3 figures
jupyterlite/files/data/sample.csv 30-row, 6-column generic dataset (European capitals, 2022)
jupyterlite/jupyter_lite_config.json Build config (output_dir: _output)
jupyterlite/jupyter-lite.json Runtime config (Pyodide kernel, disabled extensions)
jupyterlite/README.md Single documented build command + base-URL parameterisation
.github/workflows/deploy.yml Additive Python setup + jupyter lite build + copy to _site/jupyterlite/
.github/workflows/pr-preview.yml Same additive step (PR-scoped base URL); preview comment lists /jupyterlite/
web/index.html "JupyterLite demo" card added to landing page
.specify/memory/constitution.md Amendment v2.2.0: JupyterLite demo bullet in Technology Constraints
README.md jupyterlite-core, jupyterlite-pyodide-kernel, matplotlib pin rows
docs/limitations.md Online-only, cold-load weight, separate-pin-set entries

Build command

pip install -r jupyterlite/requirements.txt
jupyter lite build \
  --config jupyterlite/jupyter_lite_config.json \
  --output-dir jupyterlite/_output

Verification

  • Build exits 0 and produces a non-empty jupyterlite/_output/ (confirmed locally)
  • demo.ipynb and data/sample.csv appear in _output/files/ (confirmed)
  • Frozen playground pin (PYODIDE_VERSION = '0.27.7' in app/src/pyodide/config.ts) is unchanged
  • T013 (cold-load browser verification) and T022 (quickstart end-to-end) are manual checks remaining for the reviewer

Closes #21


Generated by Claude Code

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
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🧹 PR preview for #23 has been removed now that the PR is closed.

github-actions Bot pushed a commit that referenced this pull request Jul 4, 2026
claude added 2 commits July 4, 2026 17:26
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
github-actions Bot pushed a commit that referenced this pull request Jul 4, 2026
@IanMayo IanMayo merged commit 21649d6 into main Jul 4, 2026
2 checks passed
@IanMayo IanMayo deleted the claude/spec-049-implement-nb5f3u branch July 4, 2026 18:25
github-actions Bot added a commit that referenced this pull request Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a JupyterLite demo page to the Pages site (in-browser matplotlib from tabular data)

2 participants