Skip to content

Commit 5f71108

Browse files
authored
Update deps (#121)
* Update deps * bump pixi * bumps * fixes * lock * prettier * disable browser check for now * more fixes * sync * fix * fix
1 parent a4e2a95 commit 5f71108

File tree

8 files changed

+1665
-3375
lines changed

8 files changed

+1665
-3375
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,43 @@ jobs:
1414

1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4.2.2
1818

19-
- name: Base Setup
20-
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v5
21+
22+
- name: Set up Python
23+
run: uv python install 3.12
2124

2225
- name: Install dependencies
23-
run: python -m pip install -U "jupyterlab>=4.0,<4.1"
26+
run: uv sync
2427

2528
- name: Lint the extension
2629
run: |
2730
set -eux
28-
jlpm
29-
jlpm run lint:check
31+
uv run jlpm
32+
uv run jlpm run lint:check
3033
3134
- name: Build the extension
3235
run: |
3336
set -eux
34-
python -m pip install .
37+
uv pip install .
3538
36-
jupyter labextension list
37-
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/lab-extension.*OK"
38-
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-light.*OK"
39-
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-dark.*OK"
40-
python -m jupyterlab.browser_check
39+
uv run jupyter labextension list
40+
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/lab-extension.*OK"
41+
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-light.*OK"
42+
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-dark.*OK"
43+
# uv run python -m jupyterlab.browser_check
4144
4245
- name: Package the extension
4346
run: |
4447
set -eux
4548
46-
pip install build
47-
python -m build
48-
pip uninstall -y "p5_notebook" jupyterlab
49+
uv pip install build
50+
uv build
4951
5052
- name: Upload extension packages
51-
uses: actions/upload-artifact@v3
53+
uses: actions/upload-artifact@v4.6.2
5254
with:
5355
name: extension-artifacts
5456
path: dist/p5_notebook*
@@ -59,12 +61,13 @@ jobs:
5961
runs-on: ubuntu-latest
6062

6163
steps:
62-
- name: Install Python
63-
uses: actions/setup-python@v4
64-
with:
65-
python-version: '3.9'
66-
architecture: 'x64'
67-
- uses: actions/download-artifact@v3
64+
- name: Install uv
65+
uses: astral-sh/setup-uv@v5
66+
67+
- name: Set up Python
68+
run: uv python install 3.12
69+
70+
- uses: actions/[email protected]
6871
with:
6972
name: extension-artifacts
7073
- name: Install and Test
@@ -74,20 +77,20 @@ jobs:
7477
sudo rm -rf $(which node)
7578
sudo rm -rf $(which node)
7679
77-
pip install "jupyterlab>=4.0,<4.1" p5_notebook*.whl
78-
80+
uv venv
81+
uv pip install "jupyterlab>=4.5.0,<4.6" p5_notebook*.whl
7982
80-
jupyter labextension list
81-
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/lab-extension.*OK"
82-
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-light.*OK"
83-
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-dark.*OK"
84-
python -m jupyterlab.browser_check --no-browser-test
8583
84+
uv run jupyter labextension list
85+
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/lab-extension.*OK"
86+
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-light.*OK"
87+
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-dark.*OK"
88+
# uv run python -m jupyterlab.browser_check --no-browser-test
8689
check_links:
8790
name: Check Links
8891
runs-on: ubuntu-latest
8992
timeout-minutes: 15
9093
steps:
91-
- uses: actions/checkout@v3
94+
- uses: actions/checkout@v4.2.2
9295
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
9396
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,7 @@ p5_notebook/p5-theme-*
5353
.pnp*
5454

5555
_version.py
56+
57+
# JupyterLite
58+
_output
59+
*.doit.db

.prettierignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ node_modules
22
**/node_modules
33
**/lib
44
**/package.json
5-
p5_notebook/
5+
p5_notebook/
6+
.venv
7+
_output/

deploy.sh

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33
# small script to deploy to Vercel
44
set -xeu
55

6-
# install pixi
7-
export PIXI_VERSION=v0.9.1 && curl -fsSL https://pixi.sh/install.sh | bash
8-
9-
# This started to fail as of February 21st 2024
10-
# See commit log in https://github.com/jtpio/p5-notebook/pull/118
11-
# source ~/.bashrc
12-
13-
# So explicitly pointing to the pixi binary instead
14-
~/.pixi/bin/pixi install
15-
~/.pixi/bin/pixi run build_lite
16-
~/.pixi/bin/pixi run copy_favicon
6+
# install uv
7+
curl -LsSf https://astral.sh/uv/install.sh | sh
8+
9+
# install Python and run build commands with uv
10+
~/.local/bin/uv python install 3.12
11+
~/.local/bin/uv sync
12+
~/.local/bin/uv run jupyter lite build
13+
cp ./favicon.ico ./_output/lab/favicon.ico

0 commit comments

Comments
 (0)