Skip to content

Commit 20e4d55

Browse files
Don't build the interactive terminal separately
1 parent ebcb57c commit 20e4d55

File tree

3 files changed

+15
-23
lines changed

3 files changed

+15
-23
lines changed

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

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

62-
- name: Build the interactive terminal
63-
working-directory: web/interactive_terminal
64-
run: jupyter lite build
65-
6662
- name: Build documentation zip
6763
run: doc/make.py zip_html
6864

web/interactive_terminal/README.md

+9-18
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,24 @@ An interactive REPL to easily try `pandas` in the browser, powered by JupyterLit
66

77
## Build
88

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-core
15-
python -m pip install jupyterlite-pyodide-kernel
16-
```
17-
18-
Then in `web/interactive_terminal`, run the following command:
19-
20-
```bash
21-
jupyter lite build
22-
```
9+
The interactive REPL can be as a part of the documentation build process
10+
with Sphinx using the `jupyterlite-sphinx` extension. Please refer to the
11+
`doc/make.py` file and the [pandas docs development workflow](https://pandas.pydata.org/docs/development/contributing_documentation.html#how-to-build-the-pandas-documentation) for more information.
2312

2413
## Configuration
2514

26-
This folder contains configuration files for the interactive terminal powered by JupyterLite:
15+
The `doc/source/` folder contains shared configuration files for the interactive terminal powered by JupyterLite:
2716

2817
- `jupyter_lite_config.json`: build time configuration, used when building the assets with the `jupyter lite build` command
2918
- `jupyter-lite.json` run time configuration applied when launching the application in the browser
3019

31-
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
32-
debugging capabilities.
20+
This interactive `pandas` JupyterLite deployment enables optimizations by removing unused shared packages
21+
and disabling source maps, which can make the assets smaller and faster to load, at the cost of debugging
22+
capabilities.
3323

3424
To learn more about it, check out the JupyterLite documentation:
3525

3626
- Optimizations: https://jupyterlite.readthedocs.io/en/latest/howto/configure/advanced/optimizations.html
3727
- JupyterLite schema: https://jupyterlite.readthedocs.io/en/latest/reference/schema-v0.html
38-
- CLI reference: https://jupyterlite.readthedocs.io/en/latest/reference/cli.html
28+
- `jupyterlite-sphinx` extension: https://jupyterlite-sphinx.readthedocs.io/en/stable/
29+
- `jupyter lite` CLI reference: https://jupyterlite.readthedocs.io/en/latest/reference/cli.html

web/pandas/try.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ Try our experimental [JupyterLite](https://jupyterlite.readthedocs.io/en/stable/
66

77
**Running it requires a reasonable amount of bandwidth and resources (>70 MiB on the first load), so it may not work properly on all devices or networks.**
88

9+
<!-- This JupyterLite deployment is reused from the one built using the `jupyterlite-sphinx` Sphinx extension
10+
as a part of the interactive docs utilities in the pandas documentation.
11+
12+
To debug locally, replace the URL substring below with "../doc/build/html/lite/<...>", as appropriate. -->
13+
914
<iframe
10-
src="./lite/repl/index.html?toolbar=1&kernel=python&execute=0&code=import%20pandas%20as%20pd%0Adf%20%3D%20pd.DataFrame%28%7B%22num_legs%22%3A%20%5B2%2C%204%5D%2C%20%22num_wings%22%3A%20%5B2%2C%200%5D%7D%2C%20index%3D%5B%22falcon%22%2C%20%22dog%22%5D%29%0Adf"
15+
src="./docs/lite/repl/index.html?toolbar=1&kernel=python&execute=0&code=import%20pandas%20as%20pd%0Adf%20%3D%20pd.DataFrame%28%7B%22num_legs%22%3A%20%5B2%2C%204%5D%2C%20%22num_wings%22%3A%20%5B2%2C%200%5D%7D%2C%20index%3D%5B%22falcon%22%2C%20%22dog%22%5D%29%0Adf"
1116
style="width: 100%; max-width: 650px; height: 600px; border: 1px solid #130753;"
1217
></iframe>

0 commit comments

Comments
 (0)