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

Commit 8ed06f0

Browse files
authored
Update to JupyterLab 4 and JupyterLite 0.2.0 (#155)
* Update to JupyterLab 4 and JupyterLite 0.2.0 * Add `jupyterlite_core_alpha` channel * add alpha channel * update yarnrc * update yarn.lock * update jupyterlab dependency * add nodejs * fix addon import * more `setup-micromamba` updates * add `mamba` * Bump to `0.2.0a1` * install lab 4 on CI
1 parent b00d80d commit 8ed06f0

File tree

10 files changed

+6754
-4744
lines changed

10 files changed

+6754
-4744
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
sudo rm -rf $(which node)
6969
sudo rm -rf $(which node)
7070
pip install jupyterlite-xeus-python.tar.gz
71-
pip install "jupyterlab==3"
71+
pip install "jupyterlab==4"
7272
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/xeus-python-kernel.*OK"
7373
7474
# TODO: add JupyterLite browser check
@@ -85,17 +85,14 @@ jobs:
8585
- uses: actions/download-artifact@v2
8686
with:
8787
name: jupyterlite-xeus-python-sdist
88-
88+
8989
- name: Install Conda environment with Micromamba
9090
uses: mamba-org/setup-micromamba@v1
9191
with:
9292
micromamba-version: '1.5.1-0'
9393
environment-file: environment.yml
9494
cache-environment: true
9595

96-
- name: Install mamba
97-
run: conda install -c conda-forge mamba
98-
9996
- name: Make sure the Mamba Python API is available
10097
run: |
10198
mamba install mamba
@@ -119,17 +116,14 @@ jobs:
119116
- uses: actions/download-artifact@v2
120117
with:
121118
name: jupyterlite-xeus-python-sdist
122-
119+
123120
- name: Install Conda environment with Micromamba
124121
uses: mamba-org/setup-micromamba@v1
125122
with:
126123
micromamba-version: '1.5.1-0'
127124
environment-file: environment.yml
128125
cache-environment: true
129126

130-
- name: Install mamba
131-
run: conda install -c conda-forge mamba
132-
133127
- name: Install
134128
run: pip install jupyterlite-xeus-python.tar.gz
135129

@@ -149,12 +143,12 @@ jobs:
149143
with:
150144
name: jupyterlite-xeus-python-sdist
151145

152-
- name: Install mamba
153-
uses: mamba-org/provision-with-micromamba@main
146+
- name: Install Conda environment with Micromamba
147+
uses: mamba-org/setup-micromamba@v1
154148
with:
155-
micromamba-version: '0.22.0'
149+
micromamba-version: '1.5.1-0'
156150
environment-file: environment.yml
157-
environment-name: xeus-python-kernel
151+
cache-environment: true
158152

159153
- name: Install
160154
run: pip install jupyterlite-xeus-python.tar.gz

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,7 @@ share
129129

130130
# venv
131131
.venv
132+
133+
# Yarn 3
134+
.pnp*
135+
.yarn

.yarnrc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
enableImmutableInstalls: false
2+
enableInlineBuilds: false
3+
enableTelemetry: false
4+
httpTimeout: 60000
15
nodeLinker: node-modules

docs/build-environment.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ name: xeus-python-kernel-docs
22

33
channels:
44
- conda-forge
5+
- conda-forge/label/jupyterlite_core_alpha
56

67
dependencies:
78
- python=3.10
89
- pip
10+
- nodejs=20
911
- click
1012
- typer
1113
- linkify-it-py
1214
- myst-parser
1315
- pydata-sphinx-theme
14-
- yarn
15-
- jupyterlab >=3.5.3,<3.6
16-
- jupyterlite-core >=0.1.0,<0.2.0
16+
- jupyterlab >=4.0.5,<5
17+
- jupyterlite-core >=0.2.0a1,<0.3.0
1718
- jupyterlite-sphinx >=0.9.1
1819
- empack >=3.1.0
1920
- pip:

environment.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
name: xeus-python-kernel
22
channels:
33
- conda-forge
4+
- conda-forge/label/jupyterlite_core_alpha
45
dependencies:
56
- python
67
- pip
7-
- jupyterlab >=3.6,<4
8+
- jupyterlab >=4.0,<5
9+
- jupyterlite-core >=0.2.0a1,<0.3.0
810
- traitlets
911
- requests
1012
- typer
1113
- pytest
1214
- empack >=3,<4
13-
- yarn =3
14-
- pip:
15-
- jupyterlite
15+
- nodejs=20
16+
- mamba

jupyterlite_xeus_python/env_build_addon.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
UTF8,
2323
FEDERATED_EXTENSIONS,
2424
)
25-
from jupyterlite_core.addons.federated_extensions import (
26-
FederatedExtensionAddon,
27-
ENV_EXTENSIONS,
28-
)
25+
from jupyterlite_core.addons.federated_extensions import FederatedExtensionAddon
2926

3027
from .build import XEUS_PYTHON_VERSION, build_and_pack_emscripten_env
3128

@@ -74,7 +71,7 @@ def __init__(self, *args, **kwargs):
7471
def post_build(self, manager):
7572
"""yield a doit task to create the emscripten-32 env and grab anything we need from it"""
7673
# Install the jupyterlite-xeus-python ourselves
77-
for pkg_json in self.env_extensions(ENV_EXTENSIONS):
74+
for pkg_json in self.env_extensions(self.labextensions_path):
7875
pkg_data = json.loads(pkg_json.read_text(**UTF8))
7976
if pkg_data.get("name") == JUPYTERLITE_XEUS_PYTHON:
8077
yield from self.safe_copy_extension(pkg_json)

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,26 @@
4242
"eslint": "eslint . --ext .ts,.tsx --fix",
4343
"eslint:check": "eslint . --ext .ts,.tsx",
4444
"install:extension": "jlpm run build",
45-
"lint": "jlpm prettier && yarn eslint",
46-
"lint:check": "jlpm prettier:check && yarn eslint:check",
45+
"lint": "jlpm prettier && jlpm eslint",
46+
"lint:check": "jlpm prettier:check && jlpm eslint:check",
4747
"prettier": "prettier --list-different --write \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md,.yml,.html}\"",
4848
"prettier:check": "prettier --list-different \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md,.yml,.html}\"",
4949
"watch": "run-p watch:src watch:labextension",
5050
"watch:src": "tsc -w",
5151
"watch:labextension": "jupyter labextension watch ."
5252
},
5353
"dependencies": {
54-
"@jupyterlab/coreutils": "^5",
55-
"@jupyterlab/services": "^6",
56-
"@jupyterlite/contents": "^0.1.2",
57-
"@jupyterlite/kernel": "^0.1.2",
58-
"@jupyterlite/server": "^0.1.2",
59-
"@lumino/coreutils": "^1",
60-
"@lumino/signaling": "^1",
54+
"@jupyterlab/coreutils": "^6",
55+
"@jupyterlab/services": "^7",
56+
"@jupyterlite/contents": "^0.2.0-alpha.1",
57+
"@jupyterlite/kernel": "^0.2.0-alpha.1",
58+
"@jupyterlite/server": "^0.2.0-alpha.1",
59+
"@lumino/coreutils": "^2",
60+
"@lumino/signaling": "^2",
6161
"comlink": "^4.3.1"
6262
},
6363
"devDependencies": {
64-
"@jupyterlab/builder": "^3.6.4",
64+
"@jupyterlab/builder": "^4.0.5",
6565
"@typescript-eslint/eslint-plugin": "^4.8.1",
6666
"@typescript-eslint/parser": "^4.8.1",
6767
"copy-webpack-plugin": "^9.0.1",

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.1", "empack>=3,<4"]
2+
requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=4.0", "empack>=3,<4"]
33
build-backend = "jupyter_packaging.build_api"
44

55
[tool.jupyter-packaging.options]
@@ -21,7 +21,7 @@ skip = ["check-links"]
2121

2222
[tool.jupyter-releaser.hooks]
2323
before-build-npm = [
24-
"python -m pip install jupyterlab~=3.1 empack~=3.0 jupyter_packaging~=0.10",
24+
"python -m pip install jupyterlab~=4.0 empack~=3.0 jupyter_packaging~=0.10",
2525
"jlpm",
2626
"jlpm build:prod",
2727
]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
packages=setuptools.find_packages(exclude=["tests"]),
6060
install_requires=[
6161
"traitlets",
62-
"jupyterlite-core>=0.1,<0.2",
62+
"jupyterlite-core>=0.2.0a1,<0.3",
6363
"requests",
6464
"empack>=3.1,<4",
6565
"typer",

0 commit comments

Comments
 (0)