Skip to content

Commit

Permalink
docs(jupyter): add more info on extension
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Apr 10, 2024
1 parent b664273 commit 6bbc8bd
Show file tree
Hide file tree
Showing 17 changed files with 703 additions and 1 deletion.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ ignore =
exclude =
# Exclude the examples for now
examples/*
docs/vitepress/guide/jupyter/tests/test.py
33 changes: 32 additions & 1 deletion docs/vitepress/guide/jupyter/extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,38 @@ For __Jupyter Lab v3__, you must use the __"trame-jupyter-extension<2"__, while

You can install the extension by running `pip install trame-jupyter-extension` or via the __conda-forge__ channel.

## Debugging checklist
## Installation & validation steps

### Setup your Jupyter Lab environment

::: code-group
<<< @/guide/jupyter/tests/conda.sh
<<< @/guide/jupyter/tests/py39.sh
<<< @/guide/jupyter/tests/py310.sh
<<< @/guide/jupyter/tests/py311.sh
<<< @/guide/jupyter/tests/py312.sh
:::

### Enable extensions


| ![Enable extensions](./tests/step1.png) | ![What you should see once enabled](./tests/step2.png) |
| :---: | :---: |
| (1) Accept warning | (2) Extension in Installed list |

### Testing code

::: code-group
<<< @/guide/jupyter/tests/test.py
<<< @/guide/jupyter/tests/test.ipynb
:::

The printed output should show that __TRAME_JUPYTER_WWW__ exist and that the __iframe(src=)__ use the same port as the Jupyter Lab server using a path like `/trame-jupyter-server/servers/...`.


![Illustration of validation test](./tests/result.png)

## Advanced Debugging Checklist

While the extension should just work, sometime things are not easy. This section, focus on the various steps needed to ensure that everything is a expected.

Expand Down
127 changes: 127 additions & 0 deletions docs/vitepress/guide/jupyter/tests/conda.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
Package Version
------------------------- --------------
aiohttp 3.9.3
aiosignal 1.3.1
anyio 4.3.0
appnope 0.1.4
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asttokens 2.4.1
async-lru 2.0.4
async-timeout 4.0.3
attrs 23.2.0
Babel 2.14.0
beautifulsoup4 4.12.3
bleach 6.1.0
Brotli 1.1.0
cached-property 1.5.2
certifi 2024.2.2
cffi 1.16.0
charset-normalizer 3.3.2
comm 0.2.2
debugpy 1.8.1
decorator 5.1.1
defusedxml 0.7.1
entrypoints 0.4
exceptiongroup 1.2.0
executing 2.0.1
fastjsonschema 2.19.1
fqdn 1.5.1
frozenlist 1.4.1
h11 0.14.0
h2 4.1.0
hpack 4.0.0
httpcore 1.0.5
httpx 0.27.0
hyperframe 6.0.1
idna 3.6
importlib_metadata 7.1.0
importlib_resources 6.4.0
ipykernel 6.29.3
ipython 8.22.2
isoduration 20.11.0
jedi 0.19.1
Jinja2 3.1.3
json5 0.9.24
jsonpointer 2.4
jsonschema 4.21.1
jsonschema-specifications 2023.12.1
jupyter_client 8.6.1
jupyter_core 5.7.2
jupyter-events 0.10.0
jupyter-lsp 2.2.5
jupyter_server 2.13.0
jupyter_server_terminals 0.5.3
jupyterlab 4.1.6
jupyterlab_pygments 0.3.0
jupyterlab_server 2.26.0
MarkupSafe 2.1.5
matplotlib-inline 0.1.6
mistune 3.0.2
more-itertools 10.2.0
multidict 6.0.5
nbclient 0.10.0
nbconvert 7.16.3
nbformat 5.10.4
nest_asyncio 1.6.0
notebook_shim 0.2.4
overrides 7.7.0
packaging 24.0
pandocfilters 1.5.0
parso 0.8.4
pexpect 4.9.0
pickleshare 0.7.5
pip 24.0
pkgutil_resolve_name 1.3.10
platformdirs 4.2.0
prometheus_client 0.20.0
prompt-toolkit 3.0.42
psutil 5.9.8
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.22
Pygments 2.17.2
pyobjc-core 10.2
pyobjc-framework-Cocoa 10.2
PySocks 1.7.1
python-dateutil 2.9.0
python-json-logger 2.0.7
pytz 2024.1
PyYAML 6.0.1
pyzmq 25.1.2
referencing 0.34.0
requests 2.31.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rpds-py 0.18.0
Send2Trash 1.8.3
setuptools 69.2.0
six 1.16.0
sniffio 1.3.1
soupsieve 2.5
stack-data 0.6.2
terminado 0.18.1
tinycss2 1.2.1
tomli 2.0.1
tornado 6.4
traitlets 5.14.2
trame 3.5.5
trame-client 2.17.1
trame_jupyter_extension 2.0.1
trame-server 2.17.3
trame-vtk 2.8.5
trame-vuetify 2.4.3
types-python-dateutil 2.9.0.20240316
typing_extensions 4.11.0
typing-utils 0.1.0
uri-template 1.3.0
urllib3 2.2.1
wcwidth 0.2.13
webcolors 1.13
webencodings 0.5.1
websocket-client 1.7.0
wheel 0.43.0
wslink 1.12.4
yarl 1.9.4
zipp 3.17.0
7 changes: 7 additions & 0 deletions docs/vitepress/guide/jupyter/tests/conda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Install MiniConda (Linux/Mac)
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh

# Create env
mamba create --name trame-jupyter python=3.10 trame trame-vtk trame-vuetify jupyterlab trame-jupyter-extension
mamba activate trame-jupyter
110 changes: 110 additions & 0 deletions docs/vitepress/guide/jupyter/tests/py310.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
Package Version
------------------------- --------------
aiohttp 3.9.3
aiosignal 1.3.1
anyio 4.3.0
appnope 0.1.4
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asttokens 2.4.1
async-lru 2.0.4
async-timeout 4.0.3
attrs 23.2.0
Babel 2.14.0
beautifulsoup4 4.12.3
bleach 6.1.0
certifi 2024.2.2
cffi 1.16.0
charset-normalizer 3.3.2
comm 0.2.2
debugpy 1.8.1
decorator 5.1.1
defusedxml 0.7.1
exceptiongroup 1.2.0
executing 2.0.1
fastjsonschema 2.19.1
fqdn 1.5.1
frozenlist 1.4.1
h11 0.14.0
httpcore 1.0.5
httpx 0.27.0
idna 3.6
ipykernel 6.29.4
ipython 8.23.0
isoduration 20.11.0
jedi 0.19.1
Jinja2 3.1.3
json5 0.9.24
jsonpointer 2.4
jsonschema 4.21.1
jsonschema-specifications 2023.12.1
jupyter_client 8.6.1
jupyter_core 5.7.2
jupyter-events 0.10.0
jupyter-lsp 2.2.5
jupyter_server 2.13.0
jupyter_server_terminals 0.5.3
jupyterlab 4.1.6
jupyterlab_pygments 0.3.0
jupyterlab_server 2.26.0
MarkupSafe 2.1.5
matplotlib-inline 0.1.6
mistune 3.0.2
more-itertools 10.2.0
multidict 6.0.5
nbclient 0.10.0
nbconvert 7.16.3
nbformat 5.10.4
nest-asyncio 1.6.0
notebook_shim 0.2.4
overrides 7.7.0
packaging 24.0
pandocfilters 1.5.1
parso 0.8.4
pexpect 4.9.0
pip 24.0
platformdirs 4.2.0
prometheus_client 0.20.0
prompt-toolkit 3.0.43
psutil 5.9.8
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.22
Pygments 2.17.2
python-dateutil 2.9.0.post0
python-json-logger 2.0.7
PyYAML 6.0.1
pyzmq 25.1.2
referencing 0.34.0
requests 2.31.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rpds-py 0.18.0
Send2Trash 1.8.3
setuptools 69.2.0
six 1.16.0
sniffio 1.3.1
soupsieve 2.5
stack-data 0.6.3
terminado 0.18.1
tinycss2 1.2.1
tomli 2.0.1
tornado 6.4
traitlets 5.14.2
trame 3.5.5
trame-client 2.17.1
trame_jupyter_extension 2.0.1
trame-server 2.17.3
trame-vtk 2.8.5
trame-vuetify 2.4.3
types-python-dateutil 2.9.0.20240316
typing_extensions 4.11.0
uri-template 1.3.0
urllib3 2.2.1
wcwidth 0.2.13
webcolors 1.13
webencodings 0.5.1
websocket-client 1.7.0
wslink 1.12.4
yarl 1.9.4
5 changes: 5 additions & 0 deletions docs/vitepress/guide/jupyter/tests/py310.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Create env
python3.10 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install trame trame-vtk trame-vuetify jupyterlab trame-jupyter-extension
Loading

0 comments on commit 6bbc8bd

Please sign in to comment.