Skip to content

Commit bbcac55

Browse files
JupyterLab4 compatibility draft: Dependency updates and typescript code changes (#270)
* Lab4 compatibility changes: Dependency updates and typescript code changes. * Removed sourceMap from tsc build. * Updated versions/dependencies based on now-released JupyterLab 4. * Upgrade configuration * Modernize the code * Add integration tests config * Small fixes * Add integration test --------- Co-authored-by: Frederic COLLONVAL <fcollonval@users.noreply.github.com>
1 parent 30f5067 commit bbcac55

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+12365
-16929
lines changed

.copier-answers.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: v4.2.3
3+
_src_path: https://github.com/jupyterlab/extension-template
4+
author_email: ''
5+
author_name: lckr
6+
has_binder: true
7+
has_settings: false
8+
kind: frontend
9+
labextension_name: '@lckr/jupyterlab_variableinspector'
10+
project_short_description: Variable inspector extension for JupyterLab
11+
python_name: lckr_jupyterlab_variableinspector
12+
repository: https://github.com/jupyterlab-contrib/jupyterlab-variableInspector
13+
test: true
14+

.eslintignore

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

.eslintrc.js

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

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ about: Create a report to help us improve
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,10 +24,10 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Your Environment(please complete the following information):**
27-
- OS (**important**): [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version of this extension you are using
3027

28+
- OS (**important**): [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version of this extension you are using
3131

3232
**Additional context**
3333
Add any other context about the problem here.

.github/workflows/binder-on-pr.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Binder Badge
2+
on:
3+
pull_request_target:
4+
types: [opened]
5+
6+
jobs:
7+
binder:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
13+
with:
14+
github_token: ${{ secrets.github_token }}

.github/workflows/build.yml

Lines changed: 126 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,144 @@
11
name: Build
22

33
on:
4+
push:
5+
branches: main
46
pull_request:
57
branches: '*'
68

7-
push:
8-
branches:
9-
- master
10-
119
jobs:
1210
build:
1311
runs-on: ubuntu-latest
12+
1413
steps:
1514
- name: Checkout
16-
uses: actions/checkout@v2
17-
- name: Install node
18-
uses: actions/setup-node@v1
19-
with:
20-
node-version: '14.x'
21-
- name: Install Python
22-
uses: actions/setup-python@v2
23-
with:
24-
python-version: '3.7'
25-
architecture: 'x64'
15+
uses: actions/checkout@v3
16+
17+
- name: Base Setup
18+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
19+
2620
- name: Install dependencies
27-
run: python -m pip install jupyterlab
28-
- name: Build the extension
21+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
22+
23+
- name: Lint the extension
2924
run: |
25+
set -eux
3026
jlpm
31-
jlpm run eslint:check
27+
jlpm run lint:check
28+
29+
- name: Build the extension
30+
run: |
31+
set -eux
3232
python -m pip install .
3333
34+
jupyter labextension list
3435
jupyter labextension list 2>&1 | grep -ie "@lckr/jupyterlab_variableinspector.*OK"
3536
python -m jupyterlab.browser_check
37+
38+
- name: Package the extension
39+
run: |
40+
set -eux
41+
42+
pip install build
43+
python -m build
44+
pip uninstall -y "lckr_jupyterlab_variableinspector" jupyterlab
45+
46+
- name: Upload extension packages
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: extension-artifacts
50+
path: dist/lckr_jupyterlab_variableinspector*
51+
if-no-files-found: error
52+
53+
test_isolated:
54+
needs: build
55+
runs-on: ubuntu-latest
56+
57+
steps:
58+
- name: Install Python
59+
uses: actions/setup-python@v4
60+
with:
61+
python-version: '3.9'
62+
architecture: 'x64'
63+
- uses: actions/download-artifact@v3
64+
with:
65+
name: extension-artifacts
66+
- name: Install and Test
67+
run: |
68+
set -eux
69+
# Remove NodeJS, twice to take care of system and locally installed node versions.
70+
sudo rm -rf $(which node)
71+
sudo rm -rf $(which node)
72+
73+
pip install "jupyterlab>=4.0.0,<5" lckr_jupyterlab_variableinspector*.whl
74+
75+
76+
jupyter labextension list
77+
jupyter labextension list 2>&1 | grep -ie "@lckr/jupyterlab_variableinspector.*OK"
78+
python -m jupyterlab.browser_check --no-browser-test
79+
80+
integration-tests:
81+
name: Integration tests
82+
needs: build
83+
runs-on: ubuntu-latest
84+
85+
env:
86+
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers
87+
88+
steps:
89+
- name: Checkout
90+
uses: actions/checkout@v3
91+
92+
- name: Base Setup
93+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
94+
95+
- name: Download extension package
96+
uses: actions/download-artifact@v3
97+
with:
98+
name: extension-artifacts
99+
100+
- name: Install the extension
101+
run: |
102+
set -eux
103+
python -m pip install "jupyterlab>=4.0.0,<5" lckr_jupyterlab_variableinspector*.whl
104+
105+
- name: Install dependencies
106+
working-directory: ui-tests
107+
env:
108+
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
109+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
110+
run: jlpm install
111+
112+
- name: Set up browser cache
113+
uses: actions/cache@v3
114+
with:
115+
path: |
116+
${{ github.workspace }}/pw-browsers
117+
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}
118+
119+
- name: Install browser
120+
run: jlpm playwright install chromium
121+
working-directory: ui-tests
122+
123+
- name: Execute integration tests
124+
working-directory: ui-tests
125+
run: |
126+
jlpm playwright test
127+
128+
- name: Upload Playwright Test report
129+
if: always()
130+
uses: actions/upload-artifact@v3
131+
with:
132+
name: lckr_jupyterlab_variableinspector-playwright-tests
133+
path: |
134+
ui-tests/test-results
135+
ui-tests/playwright-report
136+
137+
check_links:
138+
name: Check Links
139+
runs-on: ubuntu-latest
140+
timeout-minutes: 15
141+
steps:
142+
- uses: actions/checkout@v3
143+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
144+
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Check Release
2+
on:
3+
push:
4+
branches: ["main"]
5+
pull_request:
6+
branches: ["*"]
7+
8+
jobs:
9+
check_release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Base Setup
15+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
16+
- name: Check Release
17+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
18+
with:
19+
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Upload Distributions
23+
uses: actions/upload-artifact@v3
24+
with:
25+
name: lckr_jupyterlab_variableinspector-releaser-dist-${{ github.run_number }}
26+
path: .jupyter_releaser_checkout/dist
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Enforce PR label
2+
3+
on:
4+
pull_request:
5+
types: [labeled, unlabeled, opened, edited, synchronize]
6+
jobs:
7+
enforce-label:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- name: enforce-triage-label
13+
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1

.github/workflows/manual_publish.yml

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

.github/workflows/prep-release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Step 1: Prep Release"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version_spec:
6+
description: "New Version Specifier"
7+
default: "next"
8+
required: false
9+
branch:
10+
description: "The branch to target"
11+
required: false
12+
post_version_spec:
13+
description: "Post Version Specifier"
14+
required: false
15+
since:
16+
description: "Use PRs with activity since this date or git reference"
17+
required: false
18+
since_last_stable:
19+
description: "Use PRs with activity since the last stable git tag"
20+
required: false
21+
type: boolean
22+
jobs:
23+
prep_release:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
27+
28+
- name: Prep Release
29+
id: prep-release
30+
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
31+
with:
32+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
33+
version_spec: ${{ github.event.inputs.version_spec }}
34+
post_version_spec: ${{ github.event.inputs.post_version_spec }}
35+
branch: ${{ github.event.inputs.branch }}
36+
since: ${{ github.event.inputs.since }}
37+
since_last_stable: ${{ github.event.inputs.since_last_stable }}
38+
39+
- name: "** Next Step **"
40+
run: |
41+
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"

0 commit comments

Comments
 (0)