Skip to content

Commit c7e2f2a

Browse files
Add back initial changes from pandas-devgh-47428
Co-Authored-By: Jeremy Tuloup <[email protected]>
1 parent 1bb264c commit c7e2f2a

File tree

4 files changed

+59
-0
lines changed

4 files changed

+59
-0
lines changed

.github/workflows/docbuild-and-upload.yml

+5
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ jobs:
5959
- name: Build documentation
6060
run: doc/make.py --warnings-are-errors
6161

62+
- name: Build the interactive terminal
63+
run: |
64+
cd web/interactive_terminal
65+
jupyter lite build
66+
6267
- name: Build documentation zip
6368
run: doc/make.py zip_html
6469

web/interactive_terminal/README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# The interactive `pandas` REPL
2+
3+
An interactive REPL to easily try `pandas` in the browser, powered by JupyterLite.
4+
5+
![image](https://user-images.githubusercontent.com/591645/175000291-e8c69f6f-5f2c-48d7-817c-cff05ab2cde9.png)
6+
7+
## Build
8+
9+
The interactive REPL is built with the `jupyter lite` CLI.
10+
11+
First make sure `jupyterlite` and a kernel are installed:
12+
13+
```bash
14+
python -m pip install jupyterlite
15+
```
16+
17+
Then in `web/interactive_terminal`, run the following command:
18+
19+
```bash
20+
jupyter lite build
21+
```
22+
23+
## Configuration
24+
25+
This folder contains configuration files for the interactive terminal powered by JupyterLite:
26+
27+
- `jupyter_lite_config.json`: build time configuration, used when building the assets with the `jupyter lite build` command
28+
- `jupyter-lite.json` run time configuration applied when launching the application in the browser
29+
30+
The interactive `pandas` terminal application enables a couple of optimizations to only include the `repl` app in the generated static assets.
31+
32+
To learn more about it, check out the JupyterLite documentation:
33+
34+
- Optimizations: https://jupyterlite.readthedocs.io/en/latest/howto/configure/advanced/optimizations.html
35+
- JupyterLite schema: https://jupyterlite.readthedocs.io/en/latest/reference/schema-v0.html
36+
- CLI reference: https://jupyterlite.readthedocs.io/en/latest/reference/cli.html
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"jupyter-lite-schema-version": 0,
3+
"jupyter-config-data": {
4+
"appName": "Pandas REPL",
5+
"appUrl": "./repl",
6+
"disabledExtensions": ["@jupyter-widgets/jupyterlab-manager"],
7+
"enableMemoryStorage": true,
8+
"settingsStorageDrivers": ["memoryStorageDriver"],
9+
"contentsStorageDrivers": ["memoryStorageDriver"]
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"LiteBuildConfig": {
3+
"apps": ["repl"],
4+
"no_unused_shared_packages": true,
5+
"output_dir": "../build/lite"
6+
}
7+
}

0 commit comments

Comments
 (0)