From 19e05cd1f004cc46317452e0e1f47cf156fca5bd Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 20 Feb 2024 12:02:38 +0100 Subject: [PATCH 1/2] Use jupyterlite-xeus --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6057102..688a03a 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ version="0.2", install_requires=[ "jupyterlite-core[all]", - "jupyterlite-xeus-python", + "jupyterlite-xeus", "jupyter-repo2docker", "yarl", ], From 5e9b2c21b475382dc90b799f1f3b4c2a28f7cced Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 20 Feb 2024 13:04:31 +0100 Subject: [PATCH 2/2] add minimal docs --- README.md | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a3e0cd1..3b869f4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # repo2jupyterlite -Build jupyterlite apps out of repositories +Build JupyterLite apps out of repositories. + +https://github.com/jupyterlite/repo2jupyterlite/assets/591645/3a37564f-1595-4ab6-8bba-89b8429216bf ## Installation @@ -10,7 +12,7 @@ Install from PyPI: pip install repo2jupyterlite ``` -## Build a repo +## Build a repo with `repo2jupyterlite` You can use the `repo2jupyterlite` command to check out any supported repo (Git, Dataverse, Figshare, Local filestore, etc) and builds a jupyterlite @@ -23,11 +25,11 @@ repo2jupyterlite https://github.com/yuvipanda/environment.yml requirements-build You can serve the `requirements-build/` directory now statically, and it should have the contents of the repo be present! -# binderlite +## binderlite -A simple web app to dynamically build and serve jupyterlite instances. +This repository also includes a simple web app to dynamically build and serve jupyterlite instances, similar to BinderHub UI. -## How to run +### How to run 1. Create a new conda env with required dependencies @@ -46,3 +48,25 @@ A simple web app to dynamically build and serve jupyterlite instances. ```bash uvicorn binderlite.run:app ``` + +## Setting up a repo + +`repo2jupyterlite` and `binderlite` use `jupyterlite-xeus` to install dependencies and build the JupyterLite environment. + +Dependencies are specified in a `environment.yml` file. Here is an an example: + +```yaml +name: xeus-python-kernel +channels: + - https://repo.mamba.pm/emscripten-forge + - conda-forge +dependencies: + - xeus-python + - numpy + - matplotlib + - ipycanvas +``` + +This file defines the `xeus-python` kernel, which enables running Python code in a JupyterLite environment. It also includes some popular Python libraries like `numpy`, `matplotlib`, and `ipycanvas`, so they are directly available in the JupyterLite environment when creating a new notebook. + +Check out the documentation for more information: https://jupyterlite-xeus.readthedocs.io/en/latest/environment.html