-
-
Couldn't load subscription status.
- Fork 2.7k
Add back the mime renderer JL extension #5096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 61 commits
5cb5754
e5e2994
583dea9
bed4c45
1cd7c4f
aa13a97
23dad18
74724a5
b8375f3
df3970f
4353bba
ef5add1
14b5a0d
af46e25
5ced43e
847b87c
00a794b
61df8d7
8f32ac5
0ee60e7
4a2f699
18f70ac
ca54548
b827f02
c67cada
e3afcf7
62721e9
3a6f3ee
0859aef
1260612
1db6c81
4bcbd30
b8cc069
cbfddad
5254258
f51b3dc
b4cd36c
5d0aa9c
56433a7
a7cf8e1
54cc73f
afc511a
87c5260
f167e6f
daac60e
024325e
0df9265
e26d9da
ab922bf
a56c55a
f7df6a8
ce27281
f918835
cd26c8f
585cf4a
4fdca55
d7157f6
d10fd16
ce161d9
48c510c
2dbb09c
9e097ec
f3a4278
5baedf3
2e9a296
15ea2d7
a4b0c42
35506f3
ce867a1
8f3227e
3ac4224
60735fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'js/**' | ||
| - 'plotly/labextension/**' | ||
|
|
||
| jobs: | ||
| check-js-build: | ||
| name: Check JS build artifacts | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.x" | ||
|
|
||
| - name: Install Node | ||
| uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: '18' | ||
marthacryan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Copy current files to a temporary directory | ||
| run: | | ||
| cp -R plotly/labextension/ plotly/labextension-tmp/ | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| uv venv | ||
| source .venv/bin/activate | ||
| uv pip install jupyter | ||
| cd js | ||
| npm ci | ||
| npm run build | ||
| - name: Check JupyterLab build artifacts | ||
| run: | | ||
| # 1. Hash contents of all static files, sort by content hash | ||
| find plotly/labextension/static -type f -exec sha256sum {} \; | awk '{print $1}' | sort > new_hashes.txt | ||
| find plotly/labextension-tmp/static -type f -exec sha256sum {} \; | awk '{print $1}' | sort > old_hashes.txt | ||
|
|
||
| # 2. Compare the sorted content hashes | ||
| diff old_hashes.txt new_hashes.txt > content_diff.txt | ||
| cat content_diff.txt | ||
marthacryan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # Remove the "load" line from both package.json files before comparing | ||
| grep -v '"load": "static/' plotly/labextension/package.json > pkg1.json | ||
| grep -v '"load": "static/' plotly/labextension-tmp/package.json > pkg2.json | ||
|
|
||
| # Compare stripped versions | ||
| diff pkg1.json pkg2.json > package_json_diff.txt | ||
|
|
||
| # 5. Final check | ||
| if [ -s content_diff.txt ] || [ -s package_json_diff.txt ]; then | ||
| echo "❌ Build artifacts differ:" | ||
| echo "--- Unexpected diffs ---" | ||
| cat content_diff.txt | ||
| echo "--- Unexpected package.json diffs ---" | ||
| cat package_json_diff.txt | ||
| echo "Please replace the 'plotly/labextension' directory with the artifacts of this CI run." | ||
| exit 1 | ||
| else | ||
| echo "✅ Build artifacts match expected output (ignoring known 'load' hash in package.json)." | ||
| fi | ||
|
|
||
| - name: Store the build artifacts from plotly/labextension | ||
| uses: actions/upload-artifact@v4 | ||
| if: failure() | ||
| with: | ||
| name: labextension | ||
| path: plotly/labextension | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "schemaVersion": 1, | ||
| "name": "jupyterlab-plotly", | ||
| "version": "6.0.1", | ||
| "jupyterlab": { | ||
| "mimeExtension": "lib/mimeExtension.js" | ||
| } | ||
| } | ||
|
|
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.