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

Add missing ensured-targets #179

Merged
merged 11 commits into from
Oct 17, 2023
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
66 changes: 39 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,42 +45,44 @@ jobs:
cache-environment: true

- name: Build the extension
run: python -m build
run: |
set -eux
python -m build

- uses: actions/upload-artifact@v2
- name: Upload extension packages
uses: actions/upload-artifact@v3
with:
name: jupyterlite-xeus-python-dist-${{ github.run_number }}
path: ./dist
path: dist
if-no-files-found: error

test_isolated:
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
architecture: 'x64'
- uses: actions/download-artifact@v2
with:
name: jupyterlite-xeus-python-dist-${{ github.run_number }}
path: ./dist
- name: Install and Test
run: |
set -eux
# Remove NodeJS, twice to take care of system and locally installed node versions.
sudo rm -rf $(which node)
sudo rm -rf $(which node)
pip install jupyterlite_xeus_python*.tar.gz
pip install "jupyterlab==4"
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/xeus-python-kernel.*OK"

# TODO: add JupyterLite browser check
# python -m jupyterlab.browser_check --no-chrome-test
working-directory: dist
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
- uses: actions/download-artifact@v3
with:
name: jupyterlite-xeus-python-dist-${{ github.run_number }}
- name: Install and Test
run: |
set -eux
# Remove NodeJS, twice to take care of system and locally installed node versions.
sudo rm -rf $(which node)
sudo rm -rf $(which node)

pip install "jupyterlab>=4.0.0,<5" jupyterlite_xeus_python*.whl

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/xeus-python-kernel.*OK"

python -m jupyterlab.browser_check --no-browser-test


python-tests-mamba-python:
needs: build
Expand Down Expand Up @@ -198,3 +200,13 @@ jobs:
- name: Run tests
run: pytest -rP test_xeus_python_env.py
working-directory: tests


check_links:
name: Check Links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers = [
]
dependencies = [
"traitlets",
"jupyterlite-core>=0.2.0a1,<0.3",
"jupyterlite-core>=0.2.0rc0,<0.3",
"requests",
"empack>=3.1,<4",
"typer",
Expand Down Expand Up @@ -52,6 +52,10 @@ fields = ["description", "authors", "urls"]
artifacts = ["jupyterlite_xeus_python/labextension"]
exclude = [".github"]

[tool.hatch.build.targets.wheel]
artifacts = ["jupyterlite_xeus_python/labextension"]
include = ["jupyterlite_xeus_python/"]

[tool.hatch.build.targets.wheel.shared-data]
"jupyterlite_xeus_python/labextension" = "share/jupyter/labextensions/@jupyterlite/xeus-python-kernel"
"install.json" = "share/jupyter/labextensions/@jupyterlite/xeus-python-kernel/install.json"
Expand All @@ -64,6 +68,9 @@ dependencies = ["hatch-jupyter-builder>=0.5"]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = [
"jupyterlite_xeus_python/labextension/static/style.js",
"jupyterlite_xeus_python/labextension/static/empack_env_meta.json",
"jupyterlite_xeus_python/labextension/static/xpython_wasm.js",
"jupyterlite_xeus_python/labextension/static/xpython_wasm.wasm",
"jupyterlite_xeus_python/labextension/package.json",
]
skip-if-exists = ["jupyterlite_xeus_python/labextension/static/style.js"]
Expand Down
Loading