diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d3216d8..757cf5a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,6 +31,7 @@ jobs: run: | cp README.md content jupyter lite build --contents content --output-dir dist + - name: Upload dist uses: actions/upload-pages-artifact@v3 with: diff --git a/content/notebooks/Intro.ipynb b/content/notebooks/Intro.ipynb index a1279de..87361ba 100755 --- a/content/notebooks/Intro.ipynb +++ b/content/notebooks/Intro.ipynb @@ -97,7 +97,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Pyolite", + "display_name": "Python (Pyodide)", "language": "python", "name": "python" }, diff --git a/content/notebooks/Lorenz.ipynb b/content/notebooks/Lorenz.ipynb index c9d21dc..878e0e6 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, @@ -35,7 +26,7 @@ "from matplotlib import pyplot as plt\n", "from scipy import integrate\n", "\n", - "from ipywidgets import interactive, fixed" + "from ipywidgets import interactive" ] }, { @@ -67,7 +58,7 @@ " ax.set_xlim((-25, 25))\n", " ax.set_ylim((-35, 35))\n", " ax.set_zlim((5, 55))\n", - " \n", + "\n", " def lorenz_deriv(x_y_z, t0, sigma=sigma, beta=beta, rho=rho):\n", " \"\"\"Compute the time-derivative of a Lorenz system.\"\"\"\n", " x, y, z = x_y_z\n", @@ -81,7 +72,7 @@ " t = np.linspace(0, max_time, int(250*max_time))\n", " x_t = np.asarray([integrate.odeint(lorenz_deriv, x0i, t)\n", " for x0i in x0])\n", - " \n", + "\n", " # choose a different color for each trajectory\n", " colors = plt.cm.viridis(np.linspace(0, 1, N))\n", "\n", @@ -236,9 +227,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Pyolite", + "display_name": "Python (XPython)", "language": "python", - "name": "python" + "name": "xpython" }, "language_info": { "codemirror_mode": { diff --git a/environment-python.yml b/environment-python.yml new file mode 100644 index 0000000..9d60e76 --- /dev/null +++ b/environment-python.yml @@ -0,0 +1,12 @@ +name: xeus-python-kernel +channels: + - https://repo.prefix.dev/emscripten-forge-dev + - https://repo.prefix.dev/conda-forge +dependencies: + - xeus-python + - numpy + - matplotlib + - pillow + - ipywidgets>=8.1.6 + - ipyleaflet + - scipy diff --git a/environment.yml b/environment-r.yml similarity index 100% rename from environment.yml rename to environment-r.yml diff --git a/jupyter_lite_config.json b/jupyter_lite_config.json new file mode 100644 index 0000000..05367f8 --- /dev/null +++ b/jupyter_lite_config.json @@ -0,0 +1,8 @@ +{ + "XeusAddon": { + "environment_file": [ + "environment-python.yml", + "environment-r.yml" + ] + } +}