Skip to content
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

DOC: Add an interactive shell powered by JupyterLite to the website #47428

Merged
merged 21 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update instructions in the README
  • Loading branch information
jtpio committed Jun 22, 2022
commit 05f73dcbccdd421e4d493f597ab9ded83f92c90c
26 changes: 24 additions & 2 deletions web/interactive_terminal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,34 @@

An interactive terminal to easily try `pandas` in the browser, powered by JupyterLite.

![image](https://user-images.githubusercontent.com/591645/175000291-e8c69f6f-5f2c-48d7-817c-cff05ab2cde9.png)

## Build

The interactive terminal is built with the `jupyterlite` CLI.

In `web/interactive_terminal`, run:
First make sure `jupyterlite` is installed:

```bash
python -m pip install jupyterlite
```

Then in `web/interactive_terminal`, run the following command:

```bash
jupyter lite build --lite-dir web/interactive_terminal --output-dir web/build/lite
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

The interactive `pandas` terminal application enables a couple of optimizations to only include the `repl` app in the generated static assets.
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
4 changes: 3 additions & 1 deletion web/interactive_terminal/jupyter_lite_config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"LiteBuildConfig": {
"apps": ["repl"],
"no_unused_shared_packages": true
"contents": ["content"],
"no_unused_shared_packages": true,
"output_dir": "../build/lite"
}
}