From d06bed7c904809f0377a34fe64194c15cb885afc Mon Sep 17 00:00:00 2001 From: martinRenou Date: Mon, 10 Feb 2025 08:48:54 +0100 Subject: [PATCH] Update README to make it less xeus-python focused (#49) --- README.md | 57 +++++++++++++++++++++++++++++-------------------- environment.yml | 4 ++-- 2 files changed, 36 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 06192a7..31796a1 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,27 @@ -# xeus-python + JupyterLite demo +# xeus kernels + JupyterLite demo [![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://jupyterlite.github.io/xeus-python-demo/notebooks/?path=demo.ipynb) -xeus-python + JupyterLite deployed as a static site to GitHub Pages, for demo purposes. +xeus kernels + JupyterLite deployed as a static site to GitHub Pages, for demo purposes. ## ✨ Try it in your browser ✨ https://jupyterlite.github.io/xeus-python-demo/notebooks/?path=demo.ipynb -## ≠ How does it compare to the Pyodide kernel? - -#### Pyodide kernel: - -- Is based on [Pyodide](https://github.com/pyodide/pyodide) -- Uses [IPython](https://github.com/ipython/ipython) for the code execution (access to IPython magics, support for the inline Matplotlib backend, *etc*) -- Provides a way to dynamically install packages with ``piplite`` (**e.g.** ``await piplite.install("ipywidgets")``) -- **Does not support** sleeping with ``from time import sleep`` -- **Does not support** pre-installing packages - -#### jupyterlite-xeus-python: - -- Is based on [xeus-python](https://github.com/jupyter-xeus/xeus-python) -- Uses [IPython](https://github.com/ipython/ipython) for the code execution (access to IPython magics, support for the inline Matplotlib backend, *etc*) -- **Does not provide** a way to dynamically install packages (yet. We are working on building a ``mamba`` package manager for WASM) -- **Supports** sleeping with ``from time import sleep`` -- **Supports** pre-installing packages from ``emscripten-forge`` and ``conda-forge``, by providing an ``environment.yml`` file defining the runtime environment - ## 💡 How to make your own deployment ![Deploy your own](deploy.gif) Then your site will be published under https://{USERNAME}.github.io/{DEMO_REPO_NAME} -## 📦 How to install extra packages +## 📦 How to install kernels and packages -You can pre-install extra packages for xeus-python by adding them to the ``environment.yml`` file. +You can install a specific kernels and extra packages by adding them to the ``environment.yml`` file. For example, if you want to create a JupyterLite deployment with NumPy and Matplotlib pre-installed, you would need to edit the ``environment.yml`` file as following: ```yml -name: xeus-python-kernel +name: xeus-kernel channels: - https://repo.mamba.pm/emscripten-forge - conda-forge @@ -49,7 +31,36 @@ dependencies: - matplotlib ``` +Instead, if you'd like to use the R kernel and the coursekata package pre-installed, you can edit the ``environment.yml`` as following: + +```yml +name: xeus-kernel +channels: + - https://repo.mamba.pm/emscripten-forge + - conda-forge +dependencies: + - xeus-r + - r-coursekata +``` + Only ``no-arch`` packages from ``conda-forge`` and packages from ``emscripten-forge`` can be installed. - **How do I know if a package is ``no-arch`` on ``conda-forge``?** ``no-arch`` means that the package is OS-independent, usually pure-python packages are ``no-arch``. To check if your package is ``no-arch`` on ``conda-forge``, check if the "Platform" entry is "no-arch" in the https://beta.mamba.pm/channels/conda-forge?tab=packages page. If your package is not ``no-arch`` but is a pure Python package, then you should probably update the feedstock to turn your package into a ``no-arch`` one. ![](noarch.png) - **How do I know if my package is on ``emscripten-forge``?** You can see the list of packages pubished on ``emscripten-forge`` [here](https://beta.mamba.pm/channels/emscripten-forge?tab=packages). In case your package is missing, or it's not up-to-date, feel free to open an issue or a PR on https://github.com/emscripten-forge/recipes. + +## ≠ How does xeus-python lite compare to the Pyodide kernel? + +#### Pyodide kernel: + +- Is based on [Pyodide](https://github.com/pyodide/pyodide) +- Provides a way to dynamically install packages with ``piplite`` (**e.g.** ``await piplite.install("ipywidgets")``) +- **Does not support** sleeping with ``from time import sleep`` +- **Does not support** pre-installing packages + +#### xeus-python lite: + +- Is based on [xeus-python](https://github.com/jupyter-xeus/xeus-python) +- **Does not provide** a way to dynamically install packages (yet. We are working on building a ``mamba`` package manager for WASM) +- **Supports** sleeping with ``from time import sleep`` +- **Supports** pre-installing packages from ``emscripten-forge`` and ``conda-forge``, by providing an ``environment.yml`` file defining the runtime environment + diff --git a/environment.yml b/environment.yml index 043c079..3c4a851 100644 --- a/environment.yml +++ b/environment.yml @@ -1,8 +1,8 @@ -name: xeus-python-kernel +name: xeus-kernel channels: - https://repo.mamba.pm/emscripten-forge - conda-forge dependencies: - - python=3.11 + - python - xeus-python - ipycanvas