Skip to content

Commit 00f347a

Browse files
authored
Merge pull request #90 from jtpio/lab4
Update to JupyterLab 4
2 parents ab5a646 + 1e2c47a commit 00f347a

33 files changed

+7487
-5010
lines changed

.copier-answers.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: v4.1.0
3+
_src_path: https://github.com/jupyterlab/extension-template
4+
author_email: <author_email>
5+
author_name: Vidar Tonaas Fauske
6+
has_binder: true
7+
has_settings: false
8+
kind: frontend
9+
labextension_name: jupyterlab-kernelspy
10+
project_short_description: A Jupyter Lab extension for inspecting messages to/from
11+
a kernel
12+
python_name: jupyterlab_kernelspy
13+
repository: https://github.com/jupyterlab-contrib/jupyterlab-kernelspy.git
14+
test: false
15+

.eslintignore

-5
This file was deleted.

.eslintrc.js

-38
This file was deleted.

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

-29
This file was deleted.

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

+14
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

+70-78
Original file line numberDiff line numberDiff line change
@@ -9,88 +9,80 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
1213
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
- name: Install node
16-
uses: actions/setup-node@v1
17-
with:
18-
node-version: '14.x'
19-
- name: Install Python
20-
uses: actions/setup-python@v2
21-
with:
22-
python-version: '3.9'
23-
architecture: 'x64'
24-
25-
- name: Setup pip cache
26-
uses: actions/cache@v2
27-
with:
28-
path: ~/.cache/pip
29-
key: pip-3.8-${{ hashFiles('package.json') }}
30-
restore-keys: |
31-
pip-3.8-
32-
pip-
33-
34-
- name: Get yarn cache directory path
35-
id: yarn-cache-dir-path
36-
run: echo "::set-output name=dir::$(yarn cache dir)"
37-
- name: Setup yarn cache
38-
uses: actions/cache@v2
39-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
40-
with:
41-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
42-
key: yarn-${{ hashFiles('**/yarn.lock') }}
43-
restore-keys: |
44-
yarn-
45-
- name: Install dependencies
46-
run: python -m pip install jupyterlab~=3.0 check-manifest
47-
- name: Build the extension
48-
run: |
49-
jlpm
50-
jlpm run eslint:check
51-
python -m pip install .
52-
53-
jupyter labextension list 2>&1 | grep -ie "jupyterlab-kernelspy.*OK"
54-
python -m jupyterlab.browser_check
55-
56-
- name: Build package
57-
run: |
58-
set -eux
59-
check-manifest -v
60-
61-
pip install build
62-
python -m build --sdist
63-
cp dist/*.tar.gz myextension.tar.gz
64-
pip uninstall -y myextension jupyterlab
65-
rm -rf myextension
66-
67-
- uses: actions/upload-artifact@v2
68-
with:
69-
name: myextension-sdist
70-
path: myextension.tar.gz
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Base Setup
18+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
19+
20+
- name: Install dependencies
21+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
22+
23+
- name: Lint the extension
24+
run: |
25+
set -eux
26+
jlpm
27+
jlpm run lint:check
28+
29+
- name: Build the extension
30+
run: |
31+
set -eux
32+
python -m pip install .[test]
33+
34+
jupyter labextension list
35+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-kernelspy.*OK"
36+
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 "jupyterlab_kernelspy" jupyterlab
45+
46+
- name: Upload extension packages
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: extension-artifacts
50+
path: dist/jupyterlab_kernelspy*
51+
if-no-files-found: error
7152

7253
test_isolated:
7354
needs: build
7455
runs-on: ubuntu-latest
7556

7657
steps:
77-
- name: Checkout
78-
uses: actions/checkout@v2
79-
- name: Install Python
80-
uses: actions/setup-python@v2
81-
with:
82-
python-version: '3.8'
83-
architecture: 'x64'
84-
- uses: actions/download-artifact@v2
85-
with:
86-
name: myextension-sdist
87-
- name: Install and Test
88-
run: |
89-
set -eux
90-
# Remove NodeJS, twice to take care of system and locally installed node versions.
91-
sudo rm -rf $(which node)
92-
sudo rm -rf $(which node)
93-
pip install myextension.tar.gz
94-
pip install jupyterlab
95-
jupyter labextension list 2>&1 | grep -ie "jupyterlab-kernelspy.*OK"
96-
python -m jupyterlab.browser_check --no-chrome-test
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" jupyterlab_kernelspy*.whl
74+
75+
76+
jupyter labextension list
77+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-kernelspy.*OK"
78+
python -m jupyterlab.browser_check --no-browser-test
79+
80+
81+
check_links:
82+
name: Check Links
83+
runs-on: ubuntu-latest
84+
timeout-minutes: 15
85+
steps:
86+
- uses: actions/checkout@v3
87+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
88+
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

.github/workflows/check-release.yml

+29
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+
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: Install Dependencies
17+
run: |
18+
pip install -e .
19+
- name: Check Release
20+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
21+
with:
22+
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Upload Distributions
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: jupyterlab_kernelspy-releaser-dist-${{ github.run_number }}
29+
path: .jupyter_releaser_checkout/dist

.github/workflows/enforce-label.yml

+13
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

+41
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)