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

Commit e5d5d48

Browse files
authored
Add missing ensured-targets (#179)
* Add missing `ensured-targets` * bump `jupyterlite-core` * Update build workflow from the template * remove whitespace * fix indent * debug * keep only build step * remove uneeded command * fix upload path * remove comment * Fix wheel include
1 parent 0e648b4 commit e5d5d48

File tree

2 files changed

+47
-28
lines changed

2 files changed

+47
-28
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -45,42 +45,44 @@ jobs:
4545
cache-environment: true
4646

4747
- name: Build the extension
48-
run: python -m build
48+
run: |
49+
set -eux
50+
python -m build
4951
50-
- uses: actions/upload-artifact@v2
52+
- name: Upload extension packages
53+
uses: actions/upload-artifact@v3
5154
with:
5255
name: jupyterlite-xeus-python-dist-${{ github.run_number }}
53-
path: ./dist
56+
path: dist
57+
if-no-files-found: error
5458

5559
test_isolated:
5660
needs: build
5761
runs-on: ubuntu-latest
5862

5963
steps:
60-
- name: Checkout
61-
uses: actions/checkout@v4
62-
- name: Install Python
63-
uses: actions/setup-python@v2
64-
with:
65-
python-version: '3.10'
66-
architecture: 'x64'
67-
- uses: actions/download-artifact@v2
68-
with:
69-
name: jupyterlite-xeus-python-dist-${{ github.run_number }}
70-
path: ./dist
71-
- name: Install and Test
72-
run: |
73-
set -eux
74-
# Remove NodeJS, twice to take care of system and locally installed node versions.
75-
sudo rm -rf $(which node)
76-
sudo rm -rf $(which node)
77-
pip install jupyterlite_xeus_python*.tar.gz
78-
pip install "jupyterlab==4"
79-
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/xeus-python-kernel.*OK"
80-
81-
# TODO: add JupyterLite browser check
82-
# python -m jupyterlab.browser_check --no-chrome-test
83-
working-directory: dist
64+
- name: Install Python
65+
uses: actions/setup-python@v4
66+
with:
67+
python-version: '3.10'
68+
architecture: 'x64'
69+
- uses: actions/download-artifact@v3
70+
with:
71+
name: jupyterlite-xeus-python-dist-${{ github.run_number }}
72+
- name: Install and Test
73+
run: |
74+
set -eux
75+
# Remove NodeJS, twice to take care of system and locally installed node versions.
76+
sudo rm -rf $(which node)
77+
sudo rm -rf $(which node)
78+
79+
pip install "jupyterlab>=4.0.0,<5" jupyterlite_xeus_python*.whl
80+
81+
jupyter labextension list
82+
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/xeus-python-kernel.*OK"
83+
84+
python -m jupyterlab.browser_check --no-browser-test
85+
8486
8587
python-tests-mamba-python:
8688
needs: build
@@ -198,3 +200,13 @@ jobs:
198200
- name: Run tests
199201
run: pytest -rP test_xeus_python_env.py
200202
working-directory: tests
203+
204+
205+
check_links:
206+
name: Check Links
207+
runs-on: ubuntu-latest
208+
timeout-minutes: 15
209+
steps:
210+
- uses: actions/checkout@v3
211+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
212+
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ classifiers = [
2323
]
2424
dependencies = [
2525
"traitlets",
26-
"jupyterlite-core>=0.2.0a1,<0.3",
26+
"jupyterlite-core>=0.2.0rc0,<0.3",
2727
"requests",
2828
"empack>=3.1,<4",
2929
"typer",
@@ -52,6 +52,10 @@ fields = ["description", "authors", "urls"]
5252
artifacts = ["jupyterlite_xeus_python/labextension"]
5353
exclude = [".github"]
5454

55+
[tool.hatch.build.targets.wheel]
56+
artifacts = ["jupyterlite_xeus_python/labextension"]
57+
include = ["jupyterlite_xeus_python/"]
58+
5559
[tool.hatch.build.targets.wheel.shared-data]
5660
"jupyterlite_xeus_python/labextension" = "share/jupyter/labextensions/@jupyterlite/xeus-python-kernel"
5761
"install.json" = "share/jupyter/labextensions/@jupyterlite/xeus-python-kernel/install.json"
@@ -64,6 +68,9 @@ dependencies = ["hatch-jupyter-builder>=0.5"]
6468
build-function = "hatch_jupyter_builder.npm_builder"
6569
ensured-targets = [
6670
"jupyterlite_xeus_python/labextension/static/style.js",
71+
"jupyterlite_xeus_python/labextension/static/empack_env_meta.json",
72+
"jupyterlite_xeus_python/labextension/static/xpython_wasm.js",
73+
"jupyterlite_xeus_python/labextension/static/xpython_wasm.wasm",
6774
"jupyterlite_xeus_python/labextension/package.json",
6875
]
6976
skip-if-exists = ["jupyterlite_xeus_python/labextension/static/style.js"]

0 commit comments

Comments
 (0)