Skip to content

Commit 043229c

Browse files
authored
Update to JupyterLite 0.7.0 (#26)
* Update to JupyterLite 0.7.0 * fix links * rtd * simplify rtd * fix cmd * dbg * fix * fix * tweaks * update rtd link * simplify lerna.json * fix bump version * fix bump-version * fix * fix * lerna * yarn
1 parent fbda9a7 commit 043229c

File tree

21 files changed

+18820
-12643
lines changed

21 files changed

+18820
-12643
lines changed

.github/workflows/build.yml

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,23 @@ on:
66
pull_request:
77
branches: '*'
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
build:
1115
runs-on: ubuntu-latest
1216

1317
steps:
1418
- name: Checkout
15-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
1620

1721
- name: Base Setup
1822
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
1923

2024
- name: Install dependencies
21-
run: python -m pip install -U jupyterlab~=3.1
25+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
2226

2327
- name: Lint the extension
2428
run: |
@@ -43,25 +47,64 @@ jobs:
4347
pip uninstall -y "jupyterlite_p5_kernel" jupyterlab
4448
4549
- name: Upload extension packages
46-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v4
4751
with:
4852
name: extension-artifacts
4953
path: dist/jupyterlite_p5_kernel*
5054
if-no-files-found: error
5155

56+
build_lite:
57+
runs-on: ubuntu-latest
58+
needs: build
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v4
62+
- name: Setup Python
63+
uses: actions/setup-python@v5
64+
with:
65+
python-version: '3.11'
66+
- uses: actions/download-artifact@v4
67+
with:
68+
name: extension-artifacts
69+
- name: Install the dependencies
70+
run: |
71+
python -m pip install --pre jupyterlite-core jupyterlite_p5_kernel*.whl
72+
- name: Build the JupyterLite site
73+
run: |
74+
jupyter lite build --output-dir dist
75+
- name: Upload artifact
76+
uses: actions/upload-pages-artifact@v3
77+
with:
78+
path: ./dist
79+
80+
deploy_lite:
81+
needs: build_lite
82+
if: github.ref == 'refs/heads/main'
83+
permissions:
84+
pages: write
85+
id-token: write
86+
87+
environment:
88+
name: github-pages
89+
url: ${{ steps.deployment.outputs.page_url }}
90+
91+
runs-on: ubuntu-latest
92+
steps:
93+
- name: Deploy to GitHub Pages
94+
id: deployment
95+
uses: actions/deploy-pages@v4
96+
5297
test_isolated:
5398
needs: build
5499
runs-on: ubuntu-latest
55100

56101
steps:
57-
- name: Checkout
58-
uses: actions/checkout@v3
59102
- name: Install Python
60-
uses: actions/setup-python@v4
103+
uses: actions/setup-python@v5
61104
with:
62-
python-version: '3.9'
105+
python-version: '3.10'
63106
architecture: 'x64'
64-
- uses: actions/download-artifact@v3
107+
- uses: actions/download-artifact@v4
65108
with:
66109
name: extension-artifacts
67110
- name: Install and Test
@@ -71,20 +114,21 @@ jobs:
71114
sudo rm -rf $(which node)
72115
sudo rm -rf $(which node)
73116
74-
pip install "jupyterlab~=3.1" jupyterlite_p5_kernel*.whl
117+
pip install "jupyterlab>=4.0.0,<5" jupyterlite_p5_kernel*.whl
75118
76119
77120
jupyter labextension list
78121
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/p5-kernel.*OK"
79122
123+
# TODO: add JupyterLite browser check
124+
# python -m jupyterlab.browser_check --no-browser-test
125+
80126
81127
check_links:
82128
name: Check Links
83129
runs-on: ubuntu-latest
84130
timeout-minutes: 15
85131
steps:
86-
- uses: actions/checkout@v3
132+
- uses: actions/checkout@v4
87133
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
88134
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
89-
with:
90-
ignore_links: "./lite/lab.*"

.github/workflows/check-release.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@ on:
55
pull_request:
66
branches: ["*"]
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
check_release:
1014
runs-on: ubuntu-latest
1115
steps:
1216
- name: Checkout
13-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1418
- name: Base Setup
1519
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
16-
- name: Install Dependencies
17-
run: |
18-
pip install -e .
1920
- name: Check Release
2021
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
2122
with:
22-
version_spec: 99.9.9
23+
2324
token: ${{ secrets.GITHUB_TOKEN }}
2425

2526
- name: Upload Distributions
26-
uses: actions/upload-artifact@v3
27+
uses: actions/upload-artifact@v4
2728
with:
28-
name: jupyterlite-p5-kernel-releaser-dist-${{ github.run_number }}
29+
name: jupyterlite_p5_kernel-releaser-dist-${{ github.run_number }}
2930
path: .jupyter_releaser_checkout/dist

.github/workflows/prep-release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
post_version_spec:
1313
description: "Post Version Specifier"
1414
required: false
15+
# silent:
16+
# description: "Set a placeholder in the changelog and don't publish the release."
17+
# required: false
18+
# type: boolean
1519
since:
1620
description: "Use PRs with activity since this date or git reference"
1721
required: false
@@ -22,17 +26,19 @@ on:
2226
jobs:
2327
prep_release:
2428
runs-on: ubuntu-latest
29+
permissions:
30+
contents: write
2531
steps:
2632
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
2733

2834
- name: Prep Release
2935
id: prep-release
3036
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
3137
with:
32-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
38+
token: ${{ secrets.GITHUB_TOKEN }}
3339
version_spec: ${{ github.event.inputs.version_spec }}
40+
# silent: ${{ github.event.inputs.silent }}
3441
post_version_spec: ${{ github.event.inputs.post_version_spec }}
35-
target: ${{ github.event.inputs.target }}
3642
branch: ${{ github.event.inputs.branch }}
3743
since: ${{ github.event.inputs.since }}
3844
since_last_stable: ${{ github.event.inputs.since_last_stable }}

.github/workflows/publish-release.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,36 @@ on:
1515
jobs:
1616
publish_release:
1717
runs-on: ubuntu-latest
18+
environment: release
19+
permissions:
20+
id-token: write
1821
steps:
1922
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
23+
with:
24+
node_version: '24'
25+
26+
- uses: actions/create-github-app-token@v1
27+
id: app-token
28+
with:
29+
app-id: ${{ vars.APP_ID }}
30+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
2031

2132
- name: Populate Release
2233
id: populate-release
2334
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
2435
with:
25-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
26-
target: ${{ github.event.inputs.target }}
36+
token: ${{ steps.app-token.outputs.token }}
2737
branch: ${{ github.event.inputs.branch }}
2838
release_url: ${{ github.event.inputs.release_url }}
2939
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
3040

3141
- name: Finalize Release
3242
id: finalize-release
3343
env:
34-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
35-
PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
36-
TWINE_USERNAME: __token__
3744
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
38-
uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2
45+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
3946
with:
40-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
41-
target: ${{ github.event.inputs.target }}
47+
token: ${{ steps.app-token.outputs.token }}
4248
release_url: ${{ steps.populate-release.outputs.release_url }}
4349

4450
- name: "** Next Step **"

.github/workflows/rtd-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ jobs:
2020
issue_number: context.issue.number,
2121
owner: context.repo.owner,
2222
repo: context.repo.repo,
23-
body: `[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://jupyterlite-p5-kernel--${PR_NUMBER}.org.readthedocs.build/en/${PR_NUMBER}/_static/lab/index.html) :point_left: Try it on ReadTheDocs`
23+
body: `[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://jupyterlite-p5-kernel--${PR_NUMBER}.org.readthedocs.build/en/${PR_NUMBER}) :point_left: Try it on ReadTheDocs`
2424
})

.gitignore

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
*.bundle.*
22
lib/
33
node_modules/
4+
*.log
5+
.eslintcache
6+
.stylelintcache
47
*.egg-info/
58
.ipynb_checkpoints
69
*.tsbuildinfo
710
jupyterlite_p5_kernel/labextension
11+
# Version file is handled by hatchling
812
jupyterlite_p5_kernel/_version.py
913

1014
# Created by https://www.gitignore.io/api/python
@@ -57,6 +61,7 @@ htmlcov/
5761
.coverage.*
5862
.cache
5963
nosetests.xml
64+
coverage/
6065
coverage.xml
6166
*.cover
6267
.hypothesis/
@@ -111,8 +116,13 @@ dmypy.json
111116

112117
# OSX files
113118
.DS_Store
114-
.vscode
119+
120+
# Yarn cache
121+
.yarn/
122+
123+
# Jupyter Notebook
124+
[Uu]ntitled*
115125

116126
# JupyterLite
117-
*.doit*
118-
_output
127+
.jupyterlite.doit.db
128+
_output/

.readthedocs.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
version: 2
22

33
build:
4-
os: "ubuntu-20.04"
4+
os: ubuntu-22.04
55
tools:
6-
python: "mambaforge-4.10"
7-
8-
conda:
9-
environment: docs/environment.yml
10-
11-
sphinx:
12-
configuration: docs/conf.py
6+
python: mambaforge-latest
7+
commands:
8+
- mamba env update --name base --file docs/environment.yml
9+
- python -m pip install .
10+
- jupyter lite build --output-dir dist
11+
- mkdir -p $READTHEDOCS_OUTPUT/html
12+
- cp -r dist/* $READTHEDOCS_OUTPUT/html/

.yarnrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
enableImmutableInstalls: false
2+
nodeLinker: node-modules

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ python -m webbrowser http://localhost:8000/
7676
- Processing > ProcessingJS > p5.js
7777
https://en.wikipedia.org/wiki/Processing#p5.js
7878
- https://github.com/processing/p5.js
79-
- https://p5js.org/learn/
79+
- https://p5js.org/tutorials/
8080
- https://p5js.org/reference/ API docs
8181
- https://p5js.org/examples/
82-
- https://p5js.org/examples/math-additive-wave.html
83-
- https://p5js.org/examples/interaction-wavemaker.html
84-
- https://p5js.org/examples/objects-objects.html
82+
- https://p5js.org/examples/angles-and-motion-sine-cosine/
83+
- https://p5js.org/examples/animation-and-variables-animation-with-events/
84+
- https://p5js.org/examples/classes-and-objects-snowflakes/
8585
- https://github.com/processing/p5.js/wiki/Beyond-the-canvas#creating-html-images
8686
- https://github.com/processing/p5.js/wiki/Getting-started-with-WebGL-in-p5#introducing-webgl-in-p5js
8787
- Summer of Code

docs/conf.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)