diff --git a/.flake8 b/.flake8 index f16a4984..26a4b9a8 100644 --- a/.flake8 +++ b/.flake8 @@ -7,3 +7,4 @@ ignore = exclude = # Exclude the examples for now examples/* + docs/vitepress/guide/jupyter/tests/test.py diff --git a/docs/vitepress/guide/jupyter/extension.md b/docs/vitepress/guide/jupyter/extension.md index 23dc064b..72b5cada 100644 --- a/docs/vitepress/guide/jupyter/extension.md +++ b/docs/vitepress/guide/jupyter/extension.md @@ -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. diff --git a/docs/vitepress/guide/jupyter/tests/conda.out b/docs/vitepress/guide/jupyter/tests/conda.out new file mode 100644 index 00000000..0b018c68 --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/conda.out @@ -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 diff --git a/docs/vitepress/guide/jupyter/tests/conda.sh b/docs/vitepress/guide/jupyter/tests/conda.sh new file mode 100644 index 00000000..8dcd1d7b --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/conda.sh @@ -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 diff --git a/docs/vitepress/guide/jupyter/tests/py310.out b/docs/vitepress/guide/jupyter/tests/py310.out new file mode 100644 index 00000000..a05bc0b5 --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/py310.out @@ -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 diff --git a/docs/vitepress/guide/jupyter/tests/py310.sh b/docs/vitepress/guide/jupyter/tests/py310.sh new file mode 100644 index 00000000..de6d22c7 --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/py310.sh @@ -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 diff --git a/docs/vitepress/guide/jupyter/tests/py311.out b/docs/vitepress/guide/jupyter/tests/py311.out new file mode 100644 index 00000000..772751da --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/py311.out @@ -0,0 +1,107 @@ +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 +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 +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 +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 diff --git a/docs/vitepress/guide/jupyter/tests/py311.sh b/docs/vitepress/guide/jupyter/tests/py311.sh new file mode 100644 index 00000000..b60d00e5 --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/py311.sh @@ -0,0 +1,5 @@ +# Create env +python3.11 -m venv .venv +source .venv/bin/activate +pip install -U pip +pip install trame trame-vtk trame-vuetify jupyterlab trame-jupyter-extension diff --git a/docs/vitepress/guide/jupyter/tests/py312.out b/docs/vitepress/guide/jupyter/tests/py312.out new file mode 100644 index 00000000..5fb18e6a --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/py312.out @@ -0,0 +1,105 @@ +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 +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 +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 +six 1.16.0 +sniffio 1.3.1 +soupsieve 2.5 +stack-data 0.6.3 +terminado 0.18.1 +tinycss2 1.2.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 +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 diff --git a/docs/vitepress/guide/jupyter/tests/py312.sh b/docs/vitepress/guide/jupyter/tests/py312.sh new file mode 100644 index 00000000..feac901e --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/py312.sh @@ -0,0 +1,5 @@ +# Create env +python3.12 -m venv .venv +source .venv/bin/activate +pip install -U pip +pip install trame trame-vtk trame-vuetify jupyterlab trame-jupyter-extension setuptools diff --git a/docs/vitepress/guide/jupyter/tests/py39.out b/docs/vitepress/guide/jupyter/tests/py39.out new file mode 100644 index 00000000..e4d04b11 --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/py39.out @@ -0,0 +1,112 @@ +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 +importlib_metadata 7.1.0 +ipykernel 6.29.4 +ipython 8.18.1 +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 +zipp 3.18.1 diff --git a/docs/vitepress/guide/jupyter/tests/py39.sh b/docs/vitepress/guide/jupyter/tests/py39.sh new file mode 100644 index 00000000..5cec389c --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/py39.sh @@ -0,0 +1,5 @@ +# Create env +python3.9 -m venv .venv +source .venv/bin/activate +pip install -U pip +pip install trame trame-vtk trame-vuetify jupyterlab trame-jupyter-extension diff --git a/docs/vitepress/guide/jupyter/tests/result.png b/docs/vitepress/guide/jupyter/tests/result.png new file mode 100644 index 00000000..deba1345 Binary files /dev/null and b/docs/vitepress/guide/jupyter/tests/result.png differ diff --git a/docs/vitepress/guide/jupyter/tests/step1.png b/docs/vitepress/guide/jupyter/tests/step1.png new file mode 100644 index 00000000..ce3e2da7 Binary files /dev/null and b/docs/vitepress/guide/jupyter/tests/step1.png differ diff --git a/docs/vitepress/guide/jupyter/tests/step2.png b/docs/vitepress/guide/jupyter/tests/step2.png new file mode 100644 index 00000000..279bafe2 Binary files /dev/null and b/docs/vitepress/guide/jupyter/tests/step2.png differ diff --git a/docs/vitepress/guide/jupyter/tests/test.ipynb b/docs/vitepress/guide/jupyter/tests/test.ipynb new file mode 100644 index 00000000..3c275e57 --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/test.ipynb @@ -0,0 +1,71 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "d5724592-b1fe-4209-825d-ddfd302cfd41", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/var/folders/p_/hxjn_q0j2kg_16rfcdlc259hs_3p6n/T/tmpo5v2c2bh\n", + "\n" + ] + }, + { + "data": { + "text/html": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import os\n", + "from trame.app.demo import Cone\n", + "\n", + "print(os.environ.get(\"TRAME_JUPYTER_WWW\"))\n", + "\n", + "app = Cone()\n", + "await app.ui.ready\n", + "\n", + "print(app.ui._jupyter_content())\n", + "\n", + "app.ui" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3b4c1232-7388-4025-9810-8c9f8b6ebb03", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.19" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/docs/vitepress/guide/jupyter/tests/test.py b/docs/vitepress/guide/jupyter/tests/test.py new file mode 100644 index 00000000..a250603e --- /dev/null +++ b/docs/vitepress/guide/jupyter/tests/test.py @@ -0,0 +1,11 @@ +import os +from trame.app.demo import Cone + +print(os.environ.get("TRAME_JUPYTER_WWW")) + +app = Cone() +await app.ui.ready + +print(app.ui._jupyter_content()) + +app.ui