Skip to content

Commit e6488b0

Browse files
authored
Update to JupyterLab 4 (#48)
* Run upgrade script * fix for lab 4 * async fixes * Open as modal with Accel-Shift-P * Enable Jupyter Notebook 7 compat * Update README * lint * update yarn.lock * fix link * renaming * iterate * cleanups * cleanups * debug * fix init * ignore binder links for now * fix missing import * ack
1 parent dd12b63 commit e6488b0

34 files changed

+6618
-17197
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.3.5
3+
_src_path: https://github.com/jupyterlab/extension-template
4+
author_email: [email protected]
5+
author_name: Peter Parente
6+
has_binder: true
7+
has_settings: true
8+
kind: server
9+
labextension_name: 'jupyterlab-quickopen'
10+
project_short_description: Quickly open a file in JupyterLab by part of its name
11+
python_name: jupyterlab_quickopen
12+
repository: https://github.com/jupyterlab-contrib/jupyterlab-quickopen.git
13+
test: false
14+

.eslintignore

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

.eslintrc.js

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

.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: 86 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,99 @@ name: Build
22

33
on:
44
push:
5-
branches: master
5+
branches: main
66
pull_request:
77
branches: '*'
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
build:
1115
runs-on: ubuntu-latest
16+
1217
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
- name: Install node
16-
uses: actions/setup-node@v1
17-
with:
18-
node-version: '12.x'
19-
- name: Install Python
20-
uses: actions/setup-python@v2
21-
with:
22-
python-version: '3.9'
23-
architecture: 'x64'
24-
- name: Install dev dependencies
25-
run: |
26-
pip install -r requirements-dev.txt
27-
npm install
28-
- name: Build the extension
29-
run: make build
30-
- name: Lint the extension
31-
run: make eslint
32-
- name: Test extension install
33-
run: |
34-
python -m pip install .
35-
make check
36-
37-
package:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Base Setup
22+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
23+
24+
- name: Install dependencies
25+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
26+
27+
- name: Lint the extension
28+
run: |
29+
set -eux
30+
jlpm
31+
jlpm run lint:check
32+
33+
- name: Build the extension
34+
run: |
35+
set -eux
36+
python -m pip install . -vv
37+
38+
jupyter server extension list
39+
jupyter server extension list 2>&1 | grep -ie "jupyterlab_quickopen.*OK"
40+
41+
jupyter labextension list
42+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-quickopen.*OK"
43+
python -m jupyterlab.browser_check
44+
45+
- name: Package the extension
46+
run: |
47+
set -eux
48+
49+
pip install build
50+
python -m build
51+
pip uninstall -y "jupyterlab_quickopen" jupyterlab
52+
53+
- name: Upload extension packages
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: extension-artifacts
57+
path: dist/jupyterlab_quickopen*
58+
if-no-files-found: error
59+
60+
test_isolated:
61+
needs: build
3862
runs-on: ubuntu-latest
63+
3964
steps:
40-
- name: Checkout
41-
uses: actions/checkout@v2
42-
- name: Install node
43-
uses: actions/setup-node@v1
44-
with:
45-
node-version: '12.x'
46-
- name: Install Python
47-
uses: actions/setup-python@v2
65+
- name: Install Python
66+
uses: actions/setup-python@v5
67+
with:
68+
python-version: '3.9'
69+
architecture: 'x64'
70+
- uses: actions/download-artifact@v4
71+
with:
72+
name: extension-artifacts
73+
- name: Install and Test
74+
run: |
75+
set -eux
76+
# Remove NodeJS, twice to take care of system and locally installed node versions.
77+
sudo rm -rf $(which node)
78+
sudo rm -rf $(which node)
79+
80+
pip install "jupyterlab>=4.0.0,<5" jupyterlab_quickopen*.whl
81+
82+
83+
jupyter server extension list
84+
jupyter server extension list 2>&1 | grep -ie "jupyterlab_quickopen.*OK"
85+
86+
jupyter labextension list
87+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-quickopen.*OK"
88+
python -m jupyterlab.browser_check --no-browser-test
89+
90+
91+
check_links:
92+
name: Check Links
93+
runs-on: ubuntu-latest
94+
timeout-minutes: 15
95+
steps:
96+
- uses: actions/checkout@v4
97+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
98+
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
4899
with:
49-
python-version: '3.9'
50-
architecture: 'x64'
51-
- name: Install packaging dependencies
52-
run: |
53-
pip install -r requirements-dev.txt
54-
npm install
55-
- name: Package the extension
56-
run: make packages
57-
- name: Test extension install
58-
run: |
59-
python -m pip install ./dist/jupyterlab_quickopen*.whl
60-
make check
100+
ignore_links: https://mybinder.org/*

.github/workflows/check-release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check Release
2+
on:
3+
push:
4+
branches: ["main"]
5+
pull_request:
6+
branches: ["*"]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
check_release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Base Setup
19+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
20+
- name: Check Release
21+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
22+
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Upload Distributions
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: jupyterlab-quickopen-releaser-dist-${{ github.run_number }}
29+
path: .jupyter_releaser_checkout/dist

.github/workflows/enforce-label.yml

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/prep-release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
# silent:
16+
# description: "Set a placeholder in the changelog and don't publish the release."
17+
# required: false
18+
# type: boolean
19+
since:
20+
description: "Use PRs with activity since this date or git reference"
21+
required: false
22+
since_last_stable:
23+
description: "Use PRs with activity since the last stable git tag"
24+
required: false
25+
type: boolean
26+
jobs:
27+
prep_release:
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: write
31+
steps:
32+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
33+
34+
- name: Prep Release
35+
id: prep-release
36+
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
version_spec: ${{ github.event.inputs.version_spec }}
40+
# silent: ${{ github.event.inputs.silent }}
41+
post_version_spec: ${{ github.event.inputs.post_version_spec }}
42+
branch: ${{ github.event.inputs.branch }}
43+
since: ${{ github.event.inputs.since }}
44+
since_last_stable: ${{ github.event.inputs.since_last_stable }}
45+
46+
- name: "** Next Step **"
47+
run: |
48+
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"

.github/workflows/publish-release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "Step 2: Publish Release"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
branch:
6+
description: "The target branch"
7+
required: false
8+
release_url:
9+
description: "The URL of the draft GitHub release"
10+
required: false
11+
steps_to_skip:
12+
description: "Comma separated list of steps to skip"
13+
required: false
14+
15+
jobs:
16+
publish_release:
17+
runs-on: ubuntu-latest
18+
environment: release
19+
permissions:
20+
id-token: write
21+
steps:
22+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
23+
24+
- uses: actions/create-github-app-token@v1
25+
id: app-token
26+
with:
27+
app-id: ${{ vars.APP_ID }}
28+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
29+
30+
- name: Populate Release
31+
id: populate-release
32+
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
33+
with:
34+
token: ${{ steps.app-token.outputs.token }}
35+
branch: ${{ github.event.inputs.branch }}
36+
release_url: ${{ github.event.inputs.release_url }}
37+
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
38+
39+
- name: Finalize Release
40+
id: finalize-release
41+
env:
42+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
43+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
44+
with:
45+
token: ${{ steps.app-token.outputs.token }}
46+
release_url: ${{ steps.populate-release.outputs.release_url }}
47+
48+
- name: "** Next Step **"
49+
if: ${{ success() }}
50+
run: |
51+
echo "Verify the final release"
52+
echo ${{ steps.finalize-release.outputs.release_url }}
53+
54+
- name: "** Failure Message **"
55+
if: ${{ failure() }}
56+
run: |
57+
echo "Failed to Publish the Draft Release Url:"
58+
echo ${{ steps.populate-release.outputs.release_url }}

0 commit comments

Comments
 (0)