Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 33 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,43 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.2.2

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
run: uv python install 3.12

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

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check
uv run jlpm
uv run jlpm run lint:check

- name: Build the extension
run: |
set -eux
python -m pip install .
uv pip install .

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/lab-extension.*OK"
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-light.*OK"
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-dark.*OK"
python -m jupyterlab.browser_check
uv run jupyter labextension list
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/lab-extension.*OK"
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-light.*OK"
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-dark.*OK"
# uv run python -m jupyterlab.browser_check

- name: Package the extension
run: |
set -eux

pip install build
python -m build
pip uninstall -y "p5_notebook" jupyterlab
uv pip install build
uv build

- name: Upload extension packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.6.2
with:
name: extension-artifacts
path: dist/p5_notebook*
Expand All @@ -59,12 +61,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- uses: actions/download-artifact@v3
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
run: uv python install 3.12

- uses: actions/[email protected]
with:
name: extension-artifacts
- name: Install and Test
Expand All @@ -74,20 +77,20 @@ jobs:
sudo rm -rf $(which node)
sudo rm -rf $(which node)

pip install "jupyterlab>=4.0,<4.1" p5_notebook*.whl

uv venv
uv pip install "jupyterlab>=4.5.0,<4.6" p5_notebook*.whl

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/lab-extension.*OK"
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-light.*OK"
jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-dark.*OK"
python -m jupyterlab.browser_check --no-browser-test

uv run jupyter labextension list
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/lab-extension.*OK"
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-light.*OK"
uv run jupyter labextension list 2>&1 | grep -ie "@p5-notebook/p5-theme-dark.*OK"
# uv run python -m jupyterlab.browser_check --no-browser-test
check_links:
name: Check Links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.2.2
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ p5_notebook/p5-theme-*
.pnp*

_version.py

# JupyterLite
_output
*.doit.db
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ node_modules
**/node_modules
**/lib
**/package.json
p5_notebook/
p5_notebook/
.venv
_output/
19 changes: 8 additions & 11 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
# small script to deploy to Vercel
set -xeu

# install pixi
export PIXI_VERSION=v0.9.1 && curl -fsSL https://pixi.sh/install.sh | bash

# This started to fail as of February 21st 2024
# See commit log in https://github.com/jtpio/p5-notebook/pull/118
# source ~/.bashrc

# So explicitly pointing to the pixi binary instead
~/.pixi/bin/pixi install
~/.pixi/bin/pixi run build_lite
~/.pixi/bin/pixi run copy_favicon
# install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# install Python and run build commands with uv
~/.local/bin/uv python install 3.12
~/.local/bin/uv sync
~/.local/bin/uv run jupyter lite build
cp ./favicon.ico ./_output/lab/favicon.ico
Loading
Loading