Add interactive Python REPL playground to docs#51
Draft
chrizzFTD wants to merge 2 commits into
Draft
Conversation
Integrate sphinx-pyrepl-web with a new Playground page that embeds a Pyodide REPL preloading grill-usd-core, grill-names, and grill. The replay session walks through the end-to-end cook workflow from the documentation examples. Also bump documented version to 0.19.1 and pin sphinx>=9 for the new extension dependency. Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #51 +/- ##
========================================
Coverage 89.37% 89.37%
========================================
Files 13 13
Lines 3088 3088
========================================
Hits 2760 2760
Misses 328 328 🚀 New features to boost your workflow:
|
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
Adds a Playground documentation page with an embedded Pyodide REPL via
sphinx-pyrepl-web. The REPL preloadsgrill-usd-core(WASMpxr),grill-names, andgrill, then replays the end-to-end cook workflow from the docs examples.This replaces the Rerun web-viewer approach from draft PR #46 with an interactive Python session starting at
from grill import cook, names.Changes
sphinx-pyrepl-web>=0.2.0andsphinx>=9,<10to the[docs]extra insetup.cfgsphinx_pyrepl_webindocs/source/conf.pydocs/source/playground.rstwith a.. py-repl::replay directiveplaygroundto the toctree (after End to End Example)docs/source/_static/custom.css0.19.1Validation
python3 docs/source/build_docs.py)playground.htmlemits<py-repl>with pinned packages andreplay-src_static/pyrepl/playground-1.pypyrepl.jsincluded on playground pageNotes
The REPL is marked experimental in the docs. Asset creation uses a temporary in-browser filesystem that is lost on refresh. First load may be slow while Pyodide installs packages.