Skip to content

Commit 5254258

Browse files
committed
Add build step to check for js build changes in CI
1 parent cbfddad commit 5254258

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

.circleci/config.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ commands:
1717
check-js-build:
1818
description: Fail if JupyterLab extension build artifacts are out of date
1919
steps:
20+
- run:
21+
name: Build JupyterLab extension
22+
command: |
23+
echo "Building JupyterLab extension..."
24+
curl -LsSf https://astral.sh/uv/install.sh | sh
25+
uv venv
26+
source .venv/bin/activate
27+
uv pip install jupyter
28+
cd js
29+
npm ci
30+
npm run build
2031
- run:
2132
name: Check JupyterLab build artifacts
2233
command: |
@@ -280,6 +291,8 @@ jobs:
280291
- run:
281292
name: PyPI Build
282293
command: |
294+
curl -LsSf https://astral.sh/uv/install.sh | sh
295+
uv venv
283296
source .venv/bin/activate
284297
uv pip install build
285298
python -m build --sdist --wheel -o dist

js/package-lock.json

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plotly/labextension/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "jupyterlab-plotly",
33
"main": "lib/mimeExtension.js",
4+
"version": "6.0.0",
45
"repository": {
56
"type": "git",
67
"url": "https://github.com/plotly/plotly.py"
@@ -31,7 +32,7 @@
3132
"mimeExtension": true,
3233
"outputDir": "../plotly/labextension",
3334
"_build": {
34-
"load": "static/remoteEntry.6da8cafc79c9700a7f84.js",
35+
"load": "static/remoteEntry.ad7567ddab772c2f7bb4.js",
3536
"mimeExtension": "./mimeExtension"
3637
}
3738
}

plotly/labextension/static/remoteEntry.6da8cafc79c9700a7f84.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=61", "jupyter_packaging~=0.10.0", "wheel"]
2+
requires = ["setuptools>=61", "hatch", "jupyter_packaging~=0.10.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project.urls]
@@ -84,16 +84,21 @@ exclude = '''
8484

8585
[tool.jupyter-packaging.builder]
8686
factory = "jupyter_packaging.npm_builder"
87+
auto_data_files = true
8788

8889
[tool.jupyter-packaging.build-args]
8990
build_cmd = "build:prod"
9091
npm = ["jlpm"]
9192

93+
[tool.hatch.build.hooks.jupyter-builder]
94+
editable-frontend = true
95+
9296
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
9397
build_cmd = "build"
9498
npm = ["jlpm"]
9599
source_dir = "js"
96100
build_dir = "plotly/labextension"
101+
skip_symlink = true
97102

98103
[tool.setuptools.data-files]
99104
"share/jupyter/labextensions/jupyterlab-plotly" = [

0 commit comments

Comments
 (0)