From 6d42a8e5cc2d917322e33b23b93bae2590c713b9 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Thu, 14 Sep 2023 20:25:13 +0000 Subject: [PATCH 1/9] Use Xeus Python --- content/notebooks/Intro.ipynb | 2 +- content/notebooks/Lorenz.ipynb | 2 +- environment.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/notebooks/Intro.ipynb b/content/notebooks/Intro.ipynb index a175ef9..c76462d 100755 --- a/content/notebooks/Intro.ipynb +++ b/content/notebooks/Intro.ipynb @@ -1,7 +1,7 @@ { "metadata": { "kernelspec": { - "display_name": "Pyolite", + "display_name": "Python (XPython)", "language": "python", "name": "python" }, diff --git a/content/notebooks/Lorenz.ipynb b/content/notebooks/Lorenz.ipynb index c9d21dc..240c3b7 100644 --- a/content/notebooks/Lorenz.ipynb +++ b/content/notebooks/Lorenz.ipynb @@ -236,7 +236,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Pyolite", + "display_name": "Python (XPython)", "language": "python", "name": "python" }, diff --git a/environment.yml b/environment.yml index c93f6c0..bbd94e4 100644 --- a/environment.yml +++ b/environment.yml @@ -19,7 +19,7 @@ dependencies: - jupyterlab-tour - jupyterlab-night - jupyterlite-core=0.1.2 -- jupyterlite-pyodide-kernel=0.1.1 +- jupyterlite-xeus-python=0.9.4 - jupyterlite-sphinx>=0.9.1,<0.10 - plotly>=5,<6 - pip: From c5bcc0a27a961b9ba9cc486d6d6d5a7dd0caeb2d Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 15 Sep 2023 05:15:38 +0000 Subject: [PATCH 2/9] Add build environment --- .github/workflows/deploy.yml | 11 +++++++++-- .readthedocs.yml | 2 +- build-environment.yml | 27 +++++++++++++++++++++++++++ environment.yml | 27 +++------------------------ 4 files changed, 40 insertions(+), 27 deletions(-) create mode 100644 build-environment.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6a0043d..8f50956 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,13 +20,20 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Install Conda environment from environment.yml - uses: mamba-org/provision-with-micromamba@v12 + + - name: Install mamba + uses: mamba-org/setup-micromamba@v1 + with: + micromamba-version: '1.5.1-0' + environment-file: build-environment.yml + cache-environment: true + - name: Build the JupyterLite site shell: bash -l {0} run: | cp README.md content jupyter lite build --contents content --output-dir dist + - name: Upload dist uses: actions/upload-pages-artifact@v1 with: diff --git a/.readthedocs.yml b/.readthedocs.yml index 603fbe5..02f2629 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,7 +6,7 @@ build: python: "mambaforge-4.10" conda: - environment: environment.yml + environment: build-environment.yml sphinx: configuration: conf.py diff --git a/build-environment.yml b/build-environment.yml new file mode 100644 index 0000000..763acd0 --- /dev/null +++ b/build-environment.yml @@ -0,0 +1,27 @@ +name: try-jupyter-build +channels: +- conda-forge +dependencies: +- python=3.10 +- mamba +- pydata-sphinx-theme +- myst-parser +- bqplot +- ipycanvas >=0.9.1 +- ipyleaflet +- ipympl>=0.8.2 +- ipywidgets>=8,<9 +- jupyterlab>=3.5.2,<4 +- jupyterlab-language-pack-fr-FR +- jupyterlab-language-pack-zh-CN +- jupyterlab-fasta>=3,<4 +- jupyterlab-geojson>=3,<4 +- jupyterlab-tour +- jupyterlab-night +- jupyterlite-core=0.1.2 +- jupyterlite-xeus-python=0.9.4 +- jupyterlite-sphinx>=0.9.1,<0.10 +- plotly>=5,<6 +- pip: + - jupyterlite-xeus-sqlite==0.2.1 + - jupyterlab-open-url-parameter diff --git a/environment.yml b/environment.yml index bbd94e4..dca029c 100644 --- a/environment.yml +++ b/environment.yml @@ -1,27 +1,6 @@ name: try-jupyter channels: -- conda-forge + - https://repo.mamba.pm/emscripten-forge + - https://repo.mamba.pm/conda-forge dependencies: -- python=3.10 -- mamba -- pydata-sphinx-theme -- myst-parser -- bqplot -- ipycanvas >=0.9.1 -- ipyleaflet -- ipympl>=0.8.2 -- ipywidgets>=8,<9 -- jupyterlab>=3.5.2,<4 -- jupyterlab-language-pack-fr-FR -- jupyterlab-language-pack-zh-CN -- jupyterlab-fasta>=3,<4 -- jupyterlab-geojson>=3,<4 -- jupyterlab-tour -- jupyterlab-night -- jupyterlite-core=0.1.2 -- jupyterlite-xeus-python=0.9.4 -- jupyterlite-sphinx>=0.9.1,<0.10 -- plotly>=5,<6 -- pip: - - jupyterlite-xeus-sqlite==0.2.1 - - jupyterlab-open-url-parameter + - ipywidgets >=8,<9 From fb4290d3149b1dc965d0f204d85385dcb74017c0 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 15 Sep 2023 05:28:51 +0000 Subject: [PATCH 3/9] Set `defaultKernelName` --- jupyter-lite.json | 1 + 1 file changed, 1 insertion(+) diff --git a/jupyter-lite.json b/jupyter-lite.json index 8eaeedc..7f900eb 100644 --- a/jupyter-lite.json +++ b/jupyter-lite.json @@ -2,6 +2,7 @@ "jupyter-lite-schema-version": 0, "jupyter-config-data": { "appName": "Try Jupyter!", + "defaultKernelName": "python", "disabledExtensions": [ "@jupyterlab/server-proxy", "jupyterlab-server-proxy", From 4282113677eae29c0de0ddb93ecebc43a83c9823 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 15 Sep 2023 05:29:51 +0000 Subject: [PATCH 4/9] remove pip install --- content/notebooks/Lorenz.ipynb | 9 --------- 1 file changed, 9 deletions(-) diff --git a/content/notebooks/Lorenz.ipynb b/content/notebooks/Lorenz.ipynb index 240c3b7..790bc20 100644 --- a/content/notebooks/Lorenz.ipynb +++ b/content/notebooks/Lorenz.ipynb @@ -14,15 +14,6 @@ "Before we start, we import some preliminary libraries." ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "%pip install -q ipywidgets" - ] - }, { "cell_type": "code", "execution_count": null, From ac6881cdbd288ed1903c3d4a4d9ddbe5aa042dcc Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 15 Sep 2023 05:29:56 +0000 Subject: [PATCH 5/9] add matplotlib --- environment.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/environment.yml b/environment.yml index dca029c..7923b73 100644 --- a/environment.yml +++ b/environment.yml @@ -4,3 +4,5 @@ channels: - https://repo.mamba.pm/conda-forge dependencies: - ipywidgets >=8,<9 + - matplotlib + From ef57a3f52ab62de1762369549d13bbffa4889af3 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 15 Sep 2023 05:39:53 +0000 Subject: [PATCH 6/9] Add `scipy` --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 7923b73..bf9597c 100644 --- a/environment.yml +++ b/environment.yml @@ -5,4 +5,5 @@ channels: dependencies: - ipywidgets >=8,<9 - matplotlib + - scipy=1.8 From 5f0a88519d91c588c1d23686aaa2b0ca3e42e684 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 15 Sep 2023 05:47:10 +0000 Subject: [PATCH 7/9] add `numpy` --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index bf9597c..82c3a6b 100644 --- a/environment.yml +++ b/environment.yml @@ -5,5 +5,6 @@ channels: dependencies: - ipywidgets >=8,<9 - matplotlib + - numpy >=1.17.3,<1.25 # for scipy - scipy=1.8 From 2ad3e6e57b6dadd19ccf8e07065faa6af0e10ab2 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 15 Sep 2023 06:25:15 +0000 Subject: [PATCH 8/9] update channel --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 82c3a6b..ef9947b 100644 --- a/environment.yml +++ b/environment.yml @@ -1,7 +1,7 @@ name: try-jupyter channels: - https://repo.mamba.pm/emscripten-forge - - https://repo.mamba.pm/conda-forge + - conda-forge dependencies: - ipywidgets >=8,<9 - matplotlib From e31d04768e5f7bd9a0685be3fb4e91ff7ab4df9c Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 15 Sep 2023 06:26:01 +0000 Subject: [PATCH 9/9] Update ipywidgets --- build-environment.yml | 2 +- environment.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-environment.yml b/build-environment.yml index 763acd0..f3668ee 100644 --- a/build-environment.yml +++ b/build-environment.yml @@ -10,7 +10,7 @@ dependencies: - ipycanvas >=0.9.1 - ipyleaflet - ipympl>=0.8.2 -- ipywidgets>=8,<9 +- ipywidgets>=8.1.1,<9 - jupyterlab>=3.5.2,<4 - jupyterlab-language-pack-fr-FR - jupyterlab-language-pack-zh-CN diff --git a/environment.yml b/environment.yml index ef9947b..b4602ef 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ channels: - https://repo.mamba.pm/emscripten-forge - conda-forge dependencies: - - ipywidgets >=8,<9 + - ipywidgets >=8.1.1,<9 - matplotlib - numpy >=1.17.3,<1.25 # for scipy - scipy=1.8