Skip to content
This repository was archived by the owner on Feb 14, 2024. It is now read-only.

Commit 4b61f0f

Browse files
committed
Iterate
1 parent 3df7b81 commit 4b61f0f

File tree

2 files changed

+40
-115
lines changed

2 files changed

+40
-115
lines changed

README.md

Lines changed: 4 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,6 @@
11
# jupyterlite-xeus-python
22

3-
> [!WARNING]
4-
> jupyterlite-xeus-python is DEPRECATED
5-
> See [the migration guide](https://xeus-python-kernel.readthedocs.io/en/latest/migration.html)
6-
7-
[![ci-badge]][ci] [![docs-badge]][docs]
8-
9-
[ci-badge]: https://github.com/jupyterlite/xeus-python-kernel/workflows/Build/badge.svg
10-
[ci]: https://github.com/jupyterlite/xeus-python-kernel/actions?query=branch%3Amain
11-
[docs-badge]: https://readthedocs.org/projects/xeus-python-kernel/badge/?version=latest
12-
[docs]: https://xeus-python-kernel.readthedocs.io/en/latest/?badge=latest
13-
14-
The [xeus-python](https://github.com/jupyter-xeus/xeus-python) Python kernel for JupyterLite running in the browser.
15-
16-
![jupyterlite-xeus-python](https://user-images.githubusercontent.com/21197331/167814755-76975633-30f7-4f8e-8fdb-eeec98fa3fd1.gif)
17-
18-
## Install
19-
20-
You can install the kernel with conda/mamba:
21-
22-
```bash
23-
mamba install -c conda-forge jupyterlite-xeus-python
24-
```
25-
26-
Or using pip:
27-
28-
```bash
29-
pip install jupyterlite-xeus-python
30-
```
31-
32-
Then build your JupyterLite site:
33-
34-
```bash
35-
jupyter lite build
36-
```
37-
38-
## Pre-installed packages
39-
40-
xeus-python allows you to pre-install packages in the Python runtime. You can pre-install packages by adding an `environment.yml` file in the JupyterLite build directory, this file will be found automatically by xeus-python which will pre-build the environment when running `jupyter lite build`.
41-
42-
Furthermore, this automatically installs any labextension that it founds, for example installing ipyleaflet will make ipyleaflet work without the need to manually install the jupyter-leaflet labextension.
43-
44-
Say you want to install `NumPy`, `Matplotlib` and `ipycanvas`, it can be done by creating the `environment.yml` file with the following content:
45-
46-
```yml
47-
name: xeus-python-kernel
48-
channels:
49-
- https://repo.mamba.pm/emscripten-forge
50-
- conda-forge
51-
dependencies:
52-
- numpy
53-
- matplotlib
54-
- ipycanvas
55-
```
56-
57-
Then you only need to build JupyterLite:
58-
59-
```bash
60-
jupyter lite build
61-
```
62-
63-
You can also pick another name for that environment file (_e.g._ `custom.yml`), by doing so, you will need to specify that name to xeus-python:
64-
65-
```bash
66-
jupyter lite build --XeusPythonEnv.environment_file=custom.yml
67-
```
68-
69-
## Contributing
70-
71-
### Development install
72-
73-
Note: You will need NodeJS to build the extension package.
74-
75-
The `jlpm` command is JupyterLab's pinned version of
76-
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
77-
`yarn` or `npm` in lieu of `jlpm` below.
78-
79-
```bash
80-
# Clone the repo to your local environment
81-
# Change directory to the jupyterlite-xeus-python directory
82-
# Install package in development mode
83-
python -m pip install -e ".[dev]"
84-
85-
# Link your development version of the extension with JupyterLab
86-
jupyter labextension develop . --overwrite
87-
88-
# Rebuild extension Typescript source after making changes
89-
jlpm run build
90-
```
91-
92-
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
93-
94-
```bash
95-
# Watch the source directory in one terminal, automatically rebuilding when needed
96-
jlpm run watch
97-
# Run JupyterLab in another terminal
98-
jupyter lab
99-
```
100-
101-
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
102-
103-
### Development uninstall
104-
105-
```bash
106-
pip uninstall jupyterlite-xeus-python
107-
```
108-
109-
In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
110-
command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
111-
folder is located. Then you can remove the symlink named `jupyterlite-xeus-python` within that folder.
112-
113-
### Packaging the extension
114-
115-
See [RELEASE](RELEASE.md)
3+
> ⚠️
4+
> jupyterlite-xeus-python is DEPRECATED.
5+
> Please use https://github.com/jupyterlite/xeus.
6+
> See [the migration guide](https://xeus-python-kernel.readthedocs.io/en/latest/migration.html).

docs/index.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,41 @@
22

33
The [xeus-python](https://github.com/jupyter-xeus/xeus-python) kernel compiled to WebAssembly and installable in JupyterLite!
44

5-
> ⚠️
5+
> [!WARNING]
66
> jupyterlite-xeus-python is DEPRECATED.
7-
> You should now use https://github.com/jupyterlite/xeus.
87
> Please see {ref}`migration`.
8+
9+
Features:
10+
11+
- all IPython features included (magics, matplotlib inline `etc`)
12+
- code completion
13+
- code inspection
14+
- interactive widgets (ipywidgets, ipyleaflet, bqplot, ipycanvas `etc`)
15+
- JupyterLite custom file-system mounting
16+
17+
How does it compare to the [Pyodide kernel](https://github.com/jupyterlite/pyodide-kernel) for JupyterLite?
18+
19+
- `from time import sleep` works!
20+
- starts faster!
21+
- it's lighter by default!
22+
- pre-installed packages! No more piplite (see {ref}`configuration` page)
23+
- no more piplite, but we will be working on a mambalite, stay tuned :D
24+
25+
```{eval-rst}
26+
.. replite::
27+
:kernel: xeus-python
28+
:height: 600px
29+
30+
print("Hello from xeus-python!")
31+
```
32+
33+
```{toctree}
34+
:caption: Usage
35+
:maxdepth: 2
36+
37+
installation
38+
deploy
39+
configuration
40+
migration
41+
changelog
42+
```

0 commit comments

Comments
 (0)