Skip to content

Commit e77defa

Browse files
Upgrade to jupyterlab 4 (#1236)
* Migrate jupyterlab-git extension to jupyterLab 4. * Migrate mui to version 5. * Post rebase upgrade * Apply the upgrade script * Fix typing except for the diff widgets * Build and lint * Fix accessing the default browser * Self review following application of the template * First working version for diff text file * Update yarn.locks following rebase * Use setting to add clone button in file browser * Remove the logger in favor of the notifications * Improve text diff for merge * Fix lots of styling issues * Fix notebook widget API * Set notification autoClose to get similar behavior * Improve styling * Drop test against 3.7 * Fix tests * Update checkout action * Upload extension only for python 3.10 * Fix integration test utils * Fix integration tests * Update snapshots --------- Co-authored-by: Frédéric Collonval <[email protected]>
1 parent 792f47e commit e77defa

File tree

130 files changed

+19447
-19276
lines changed

Some content is hidden

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

130 files changed

+19447
-19276
lines changed

.copier-answers.yml

+14
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.1
3+
_src_path: https://github.com/jupyterlab/extension-template
4+
author_email: ''
5+
author_name: Jupyter Development Team
6+
has_binder: true
7+
has_settings: true
8+
kind: server
9+
labextension_name: '@jupyterlab/git'
10+
project_short_description: A JupyterLab extension for version control using git
11+
python_name: jupyterlab_git
12+
repository: https://github.com/jupyterlab/jupyterlab-git.git
13+
test: true
14+

.eslintignore

-6
This file was deleted.

.eslintrc.js

-51
This file was deleted.

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

-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,4 @@ jobs:
1111
steps:
1212
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
1313
with:
14-
1514
github_token: ${{ secrets.github_token }}
16-

.github/workflows/build.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@ name: Build
22

33
on:
44
push:
5-
branches: ['main']
5+
branches: main
66
pull_request:
7-
branches: ['*']
7+
branches: '*'
88

99
jobs:
1010
build:
1111
name: Test Python ${{ matrix.python-version }}
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ['3.7', '3.8', '3.9', '3.10']
15+
python-version: ['3.8', '3.9', '3.10']
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919

2020
- name: Base Setup
2121
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
2222
with:
2323
python_version: ${{ matrix.python-version }}
2424

2525
- name: Install dependencies
26-
run: python -m pip install -U jupyterlab~=3.0
26+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
2727

2828
- name: Lint the extension
2929
run: |
3030
set -eux
3131
jlpm
3232
jlpm run lint:check
33-
33+
3434
- name: Test the extension
3535
run: |
3636
set -eux
@@ -62,6 +62,7 @@ jobs:
6262
6363
- name: Upload extension packages
6464
uses: actions/upload-artifact@v3
65+
if: ${{ matrix.python-version == '3.10' }}
6566
with:
6667
name: extension-artifacts
6768
path: dist/jupyterlab_git*
@@ -72,8 +73,6 @@ jobs:
7273
runs-on: ubuntu-latest
7374

7475
steps:
75-
- name: Checkout
76-
uses: actions/checkout@v3
7776
- name: Install Python
7877
uses: actions/setup-python@v4
7978
with:
@@ -89,15 +88,15 @@ jobs:
8988
sudo rm -rf $(which node)
9089
sudo rm -rf $(which node)
9190
92-
pip install "jupyterlab~=3.0" jupyterlab_git*.whl
91+
pip install "jupyterlab>=4.0.0,<5" jupyterlab_git*.whl
9392
9493
9594
jupyter server extension list
9695
jupyter server extension list 2>&1 | grep -ie "jupyterlab_git.*OK"
9796
9897
jupyter labextension list
9998
jupyter labextension list 2>&1 | grep -ie "@jupyterlab/git.*OK"
100-
python -m jupyterlab.browser_check --no-chrome-test
99+
python -m jupyterlab.browser_check --no-browser-test
101100
102101
integration-tests:
103102
name: Integration tests
@@ -109,7 +108,7 @@ jobs:
109108

110109
steps:
111110
- name: Checkout
112-
uses: actions/checkout@v3
111+
uses: actions/checkout@v4
113112

114113
- name: Base Setup
115114
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
@@ -118,15 +117,16 @@ jobs:
118117
uses: actions/download-artifact@v3
119118
with:
120119
name: extension-artifacts
121-
120+
122121
- name: Install the extension
123122
run: |
124123
set -eux
125-
python -m pip install "jupyterlab~=3.0" jupyter-archive jupyterlab_git*.whl
124+
python -m pip install "jupyterlab>=4.0.0,<5" jupyter-archive jupyterlab_git*.whl
126125
127126
- name: Install dependencies
128127
working-directory: ui-tests
129128
env:
129+
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
130130
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
131131
run: jlpm install
132132

@@ -165,6 +165,6 @@ jobs:
165165
runs-on: ubuntu-latest
166166
timeout-minutes: 15
167167
steps:
168-
- uses: actions/checkout@v3
168+
- uses: actions/checkout@v4
169169
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
170170
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

.github/workflows/check-release.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
- name: Base Setup
1515
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
16-
- name: Install Dependencies
17-
run: |
18-
pip install -e .
1916
- name: Check Release
2017
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
2118
with:

.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 }}"

.github/workflows/publish-release.yml

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
publish_release:
1717
runs-on: ubuntu-latest
1818
permissions:
19+
# This is useful if you want to use PyPI trusted publisher
20+
# and NPM provenance
1921
id-token: write
2022
steps:
2123
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

.github/workflows/update-integration-tests.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ permissions:
99
pull-requests: write
1010

1111
jobs:
12-
13-
1412
update-snapshots:
1513
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'please update playwright snapshots') }}
1614
runs-on: ubuntu-latest
1715

1816
steps:
1917
- name: Checkout
20-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
2119
with:
2220
token: ${{ secrets.GITHUB_TOKEN }}
2321

@@ -35,7 +33,7 @@ jobs:
3533
python_version: '3.10'
3634

3735
- name: Install dependencies
38-
run: python -m pip install -U jupyterlab~=3.1 jupyter-archive
36+
run: python -m pip install -U "jupyterlab>=4.0.0,<5" jupyter-archive
3937

4038
- name: Install extension
4139
run: |
@@ -49,4 +47,3 @@ jobs:
4947
# Playwright knows how to start JupyterLab server
5048
start_server_script: 'null'
5149
test_folder: ui-tests
52-

.gitignore

+4-12
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ docs/_build/
8585
# PyBuilder
8686
target/
8787

88-
# Jupyter Notebook
89-
.ipynb_checkpoints
90-
9188
# pyenv
9289
.python-version
9390

@@ -97,14 +94,6 @@ celerybeat-schedule
9794
# SageMath parsed files
9895
*.sage.py
9996

100-
# dotenv
101-
.env
102-
103-
# virtualenv
104-
.venv
105-
venv/
106-
ENV/
107-
10897
# Spyder project settings
10998
.spyderproject
11099
.spyproject
@@ -133,7 +122,10 @@ dmypy.json
133122
# OSX files
134123
.DS_Store
135124

136-
# jetbrains ide stuff
125+
# Yarn cache
126+
.yarn/
127+
128+
# JetBrains IDE stuff
137129
*.iml
138130
.idea/
139131

.prettierrc

-13
This file was deleted.

.stylelintrc

-12
This file was deleted.

.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

0 commit comments

Comments
 (0)