From 8d8ff422413850db781d48d85d1d2e589d5002a7 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Tue, 12 Jul 2022 10:44:02 -0500 Subject: [PATCH 1/5] Add JupyterLite badge to readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a189c9be..db5d003b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ ## Tutorial, SciPy 2022 +[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://jupyter-widgets.github.io/tutorial) + # https://github.com/jupyter-widgets/tutorial # Installation From a91f053127a3ebbc457578c4992e43458cd1d513 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Tue, 12 Jul 2022 10:44:41 -0500 Subject: [PATCH 2/5] Separate out the jupyterlite install requirements from the tutorial requirements. --- .github/workflows/deploy.yml | 1 + requirements-jupyterlite.txt | 2 ++ requirements.txt | 10 +++------- 3 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 requirements-jupyterlite.txt diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 99c1cda1..ec0dbbb3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,6 +21,7 @@ jobs: - name: Install the dependencies run: | python -m pip install -r requirements.txt + python -m pip install -r requirements-jupyterlite.txt - name: Build the JupyterLite site run: | jupyter lite build --contents notebooks diff --git a/requirements-jupyterlite.txt b/requirements-jupyterlite.txt new file mode 100644 index 00000000..ac837787 --- /dev/null +++ b/requirements-jupyterlite.txt @@ -0,0 +1,2 @@ +jupyterlite==0.1.0b11 +jupyterlite-xeus-python diff --git a/requirements.txt b/requirements.txt index e4e02d12..8d38ec2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,9 @@ ipyvolume==0.6.0a8 ipyvuetify==1.8.2 ipywidgets==7.7.1 jupyterlab==3.4 +jupyterlab-language-pack-fr-FR +jupyterlab-language-pack-zh-CN +jupyterlab_github mpl-interactions==0.22.0 numpy orjson==3.7.7 @@ -24,10 +27,3 @@ scipy sidecar==0.5.1 voila==0.3.5 vtk==9.1.0 - -jupyterlab-language-pack-fr-FR -jupyterlab-language-pack-zh-CN -jupyterlab_miami_nights -jupyterlite==0.1.0b11 -theme-darcula -jupyterlab_github From 636c139bccf55fe28d5648745e16f04d3f902ffa Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Tue, 12 Jul 2022 11:02:09 -0500 Subject: [PATCH 3/5] Add jupyter_lite_config.json file --- jupyter_lite_config.json | 31 +++++++++++++++++++++++++++++++ repl/jupyter-lite.json | 15 +++++++-------- 2 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 jupyter_lite_config.json diff --git a/jupyter_lite_config.json b/jupyter_lite_config.json new file mode 100644 index 00000000..61ca604e --- /dev/null +++ b/jupyter_lite_config.json @@ -0,0 +1,31 @@ +{ + "LiteBuildConfig": { + "XeusPythonEnv": { + "packages": [ + "bqplot", + "branca", + "ipycanvas", + "ipycytoscape", + "ipydatagrid", + "ipyevents", + "ipygany", + "ipyleaflet", + "ipympl", + "ipytree", + "ipyvolume", + "ipyvuetify", + "ipywidgets", + "mpl-interactions", + "numpy", + "orjson", + "pandas", + "pythreejs", + "pyvista", + "requests", + "scikit-image", + "scipy", + "sidecar" + ] + } + } +} diff --git a/repl/jupyter-lite.json b/repl/jupyter-lite.json index cedcd390..adbaf544 100644 --- a/repl/jupyter-lite.json +++ b/repl/jupyter-lite.json @@ -1,10 +1,9 @@ { - "jupyter-lite-schema-version": 0, - "jupyter-config-data": { - "disabledExtensions": [ - "jupyterlab-kernel-spy", - "@jupyterlite/javascript-kernel-extension" - ] - } + "jupyter-lite-schema-version": 0, + "jupyter-config-data": { + "disabledExtensions": [ + "jupyterlab-kernel-spy", + "@jupyterlite/javascript-kernel-extension" + ] } - \ No newline at end of file +} From baa0123537edae37241f3674b9a666d284740ee8 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Tue, 12 Jul 2022 11:05:39 -0500 Subject: [PATCH 4/5] Move contents option to jupyter_lite_config.json --- .github/workflows/deploy.yml | 2 +- jupyter_lite_config.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ec0dbbb3..e3630159 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,7 +24,7 @@ jobs: python -m pip install -r requirements-jupyterlite.txt - name: Build the JupyterLite site run: | - jupyter lite build --contents notebooks + jupyter lite build - name: Upload (dist) uses: actions/upload-artifact@v2 with: diff --git a/jupyter_lite_config.json b/jupyter_lite_config.json index 61ca604e..1dc9f175 100644 --- a/jupyter_lite_config.json +++ b/jupyter_lite_config.json @@ -1,5 +1,6 @@ { "LiteBuildConfig": { + "contents": ["notebooks"], "XeusPythonEnv": { "packages": [ "bqplot", From f16ca27d1f8d38728c0fbf8bf0980c5eca359eed Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Tue, 12 Jul 2022 11:20:21 -0500 Subject: [PATCH 5/5] Delete packages not available for xeus, apparently: PackagesNotFoundError: The following packages are not available from current channels: - scikit-image - scipy - orjson Current channels: - https://repo.mamba.pm/emscripten-forge/emscripten-32 - https://repo.mamba.pm/emscripten-forge/noarch - https://repo.mamba.pm/conda-forge/emscripten-32 - https://repo.mamba.pm/conda-forge/noarch - https://repo.anaconda.com/pkgs/main/emscripten-32 - https://repo.anaconda.com/pkgs/main/noarch - https://repo.anaconda.com/pkgs/r/emscripten-32 - https://repo.anaconda.com/pkgs/r/noarch --- jupyter_lite_config.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/jupyter_lite_config.json b/jupyter_lite_config.json index 1dc9f175..24682d71 100644 --- a/jupyter_lite_config.json +++ b/jupyter_lite_config.json @@ -18,13 +18,10 @@ "ipywidgets", "mpl-interactions", "numpy", - "orjson", "pandas", "pythreejs", "pyvista", "requests", - "scikit-image", - "scipy", "sidecar" ] }