-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: Add JupyterLite-powered shell for the website (reprise of #47428) #60758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rhshadrach
merged 26 commits into
pandas-dev:main
from
agriyakhetarpal:feat/add-back-jupyterlite-repl
Mar 4, 2025
Merged
Changes from 21 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
c7e2f2a
Add back initial changes from gh-47428
agriyakhetarpal f8c94e6
Add requirements and compatibility notes
agriyakhetarpal 2e2da17
Disable source maps for a smaller build
agriyakhetarpal c3a8092
Note Pyodide kernel installation in README
agriyakhetarpal c1bd25f
Add terminal back, with "Experimental" heading
agriyakhetarpal 9c9023d
Fix minimum pin for `jupyterlite-core`
agriyakhetarpal a1d1886
Add note about disabling of source maps
agriyakhetarpal 3ce9723
Use `working-directory:` instead of `cd`
agriyakhetarpal 4d56cea
Properly generate dev requirements file
agriyakhetarpal 63a075d
Disable REPL code auto-execution
agriyakhetarpal b7d27da
Display DataFrame with starter code, fix encoding
agriyakhetarpal 0ceedca
Add note about bandwidth usage, embolden
agriyakhetarpal 9674bfc
Fix pre-commit failure
agriyakhetarpal c9b3d61
Reword "Try pandas" title and message
agriyakhetarpal 02d7ae3
Don't set a fixed width, autoscale, add border
agriyakhetarpal 54470b7
Fix broken auto-scaling for YouTube video
agriyakhetarpal 27aac16
Fix another pre-commit failure
agriyakhetarpal 59f3e16
Don't disable `jupyterlab-manager` widget
agriyakhetarpal 582deb0
Mention time taken to initialise shell
agriyakhetarpal 391ce1e
Unpin jupyterlite-pyodide-kernel and JupyterLite
agriyakhetarpal 96eb3db
Merge branch 'main' into feat/add-back-jupyterlite-repl
agriyakhetarpal 9470bf4
Suggestions from Jeremy
agriyakhetarpal 75aeb9e
Merge branch 'main' into feat/add-back-jupyterlite-repl
agriyakhetarpal 2a8acae
Mention approximate amount of bandwidth consumed
agriyakhetarpal 3d9e65c
Move the shell to `try.html`
agriyakhetarpal 186ddbb
Re-enable "Try pandas online" button, move it down
agriyakhetarpal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# The interactive `pandas` REPL | ||
|
||
An interactive REPL to easily try `pandas` in the browser, powered by JupyterLite. | ||
|
||
 | ||
|
||
## Build | ||
|
||
The interactive REPL is built with the `jupyter lite` CLI. | ||
|
||
First make sure `jupyterlite` and a kernel are installed: | ||
|
||
```bash | ||
python -m pip install jupyterlite | ||
python -m pip install jupyterlite-pyodide-kernel | ||
``` | ||
|
||
Then in `web/interactive_terminal`, run the following command: | ||
|
||
```bash | ||
jupyter lite build | ||
``` | ||
|
||
## Configuration | ||
|
||
This folder contains configuration files for the interactive terminal powered by JupyterLite: | ||
|
||
- `jupyter_lite_config.json`: build time configuration, used when building the assets with the `jupyter lite build` command | ||
- `jupyter-lite.json` run time configuration applied when launching the application in the browser | ||
|
||
This interactive `pandas` JupyterLite deployment enables a couple of optimizations to only include the `repl` app in the generated static assets, and disables source maps, which can make the assets smaller and faster to load, at the cost of | ||
debugging capabilities. | ||
|
||
To learn more about it, check out the JupyterLite documentation: | ||
|
||
- Optimizations: https://jupyterlite.readthedocs.io/en/latest/howto/configure/advanced/optimizations.html | ||
- JupyterLite schema: https://jupyterlite.readthedocs.io/en/latest/reference/schema-v0.html | ||
- CLI reference: https://jupyterlite.readthedocs.io/en/latest/reference/cli.html |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"jupyter-lite-schema-version": 0, | ||
"jupyter-config-data": { | ||
"appName": "Pandas REPL", | ||
"appUrl": "./repl", | ||
"enableMemoryStorage": true, | ||
"settingsStorageDrivers": ["memoryStorageDriver"], | ||
"contentsStorageDrivers": ["memoryStorageDriver"] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"LiteBuildConfig": { | ||
"apps": ["repl"], | ||
"no_unused_shared_packages": true, | ||
"output_dir": "../build/lite", | ||
"no_sourcemaps": true | ||
} | ||
} |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.