Skip to content
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

Upgrade to jupyterlab 4 #1236

Merged
merged 24 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
48eb328
Migrate jupyterlab-git extension to jupyterLab 4.
HaudinFlorence Apr 18, 2023
b1bc873
Migrate mui to version 5.
HaudinFlorence Apr 20, 2023
4151575
Post rebase upgrade
fcollonval Sep 19, 2023
685c717
Apply the upgrade script
fcollonval Sep 19, 2023
02e7a60
Fix typing except for the diff widgets
fcollonval Sep 19, 2023
ab55c12
Build and lint
fcollonval Sep 19, 2023
dfd1de3
Fix accessing the default browser
fcollonval Sep 19, 2023
3d96fc2
Self review following application of the template
fcollonval Sep 21, 2023
cf67007
First working version for diff text file
fcollonval Sep 21, 2023
542af57
Update yarn.locks following rebase
fcollonval Oct 5, 2023
b5ebb67
Use setting to add clone button in file browser
fcollonval Oct 5, 2023
db8b4f1
Remove the logger in favor of the notifications
fcollonval Oct 6, 2023
0636ea2
Improve text diff for merge
fcollonval Oct 6, 2023
b1c0afc
Fix lots of styling issues
fcollonval Oct 9, 2023
6241ad2
Fix notebook widget API
fcollonval Oct 9, 2023
49650ac
Set notification autoClose to get similar behavior
fcollonval Oct 9, 2023
8e3c493
Improve styling
fcollonval Oct 17, 2023
638ecb1
Drop test against 3.7
fcollonval Oct 17, 2023
2ddbf65
Fix tests
fcollonval Oct 18, 2023
97ba7f1
Update checkout action
fcollonval Oct 23, 2023
4577c58
Upload extension only for python 3.10
fcollonval Oct 23, 2023
c383552
Fix integration test utils
fcollonval Oct 23, 2023
cd8f265
Fix integration tests
fcollonval Oct 24, 2023
a695040
Update snapshots
fcollonval Oct 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.2.1
_src_path: https://github.com/jupyterlab/extension-template
author_email: ''
author_name: Jupyter Development Team
has_binder: true
has_settings: true
kind: server
labextension_name: '@jupyterlab/git'
project_short_description: A JupyterLab extension for version control using git
python_name: jupyterlab_git
repository: https://github.com/jupyterlab/jupyterlab-git.git
test: true

6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

51 changes: 0 additions & 51 deletions .eslintrc.js

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/binder-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ jobs:
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
with:

github_token: ${{ secrets.github_token }}

28 changes: 14 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@ name: Build

on:
push:
branches: ['main']
branches: main
pull_request:
branches: ['*']
branches: '*'

jobs:
build:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10']
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

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

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check

- name: Test the extension
run: |
set -eux
Expand Down Expand Up @@ -62,6 +62,7 @@ jobs:

- name: Upload extension packages
uses: actions/upload-artifact@v3
if: ${{ matrix.python-version == '3.10' }}
with:
name: extension-artifacts
path: dist/jupyterlab_git*
Expand All @@ -72,8 +73,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
Expand All @@ -89,15 +88,15 @@ jobs:
sudo rm -rf $(which node)
sudo rm -rf $(which node)

pip install "jupyterlab~=3.0" jupyterlab_git*.whl
pip install "jupyterlab>=4.0.0,<5" jupyterlab_git*.whl


jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyterlab_git.*OK"

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyterlab/git.*OK"
python -m jupyterlab.browser_check --no-chrome-test
python -m jupyterlab.browser_check --no-browser-test

integration-tests:
name: Integration tests
Expand All @@ -109,7 +108,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
Expand All @@ -118,15 +117,16 @@ jobs:
uses: actions/download-artifact@v3
with:
name: extension-artifacts

- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab~=3.0" jupyter-archive jupyterlab_git*.whl
python -m pip install "jupyterlab>=4.0.0,<5" jupyter-archive jupyterlab_git*.whl

- name: Install dependencies
working-directory: ui-tests
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: jlpm install

Expand Down Expand Up @@ -165,6 +165,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
5 changes: 1 addition & 4 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install Dependencies
run: |
pip install -e .
- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/enforce-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Enforce PR label

on:
pull_request:
types: [labeled, unlabeled, opened, edited, synchronize]
jobs:
enforce-label:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: enforce-triage-label
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1
41 changes: 41 additions & 0 deletions .github/workflows/prep-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Step 1: Prep Release"
on:
workflow_dispatch:
inputs:
version_spec:
description: "New Version Specifier"
default: "next"
required: false
branch:
description: "The branch to target"
required: false
post_version_spec:
description: "Post Version Specifier"
required: false
since:
description: "Use PRs with activity since this date or git reference"
required: false
since_last_stable:
description: "Use PRs with activity since the last stable git tag"
required: false
type: boolean
jobs:
prep_release:
runs-on: ubuntu-latest
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Prep Release
id: prep-release
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
version_spec: ${{ github.event.inputs.version_spec }}
post_version_spec: ${{ github.event.inputs.post_version_spec }}
branch: ${{ github.event.inputs.branch }}
since: ${{ github.event.inputs.since }}
since_last_stable: ${{ github.event.inputs.since_last_stable }}

- name: "** Next Step **"
run: |
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"
2 changes: 2 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
publish_release:
runs-on: ubuntu-latest
permissions:
# This is useful if you want to use PyPI trusted publisher
# and NPM provenance
id-token: write
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/update-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ permissions:
pull-requests: write

jobs:


update-snapshots:
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'please update playwright snapshots') }}
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -35,7 +33,7 @@ jobs:
python_version: '3.10'

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

- name: Install extension
run: |
Expand All @@ -49,4 +47,3 @@ jobs:
# Playwright knows how to start JupyterLab server
start_server_script: 'null'
test_folder: ui-tests

16 changes: 4 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ docs/_build/
# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

Expand All @@ -97,14 +94,6 @@ celerybeat-schedule
# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject
Expand Down Expand Up @@ -133,7 +122,10 @@ dmypy.json
# OSX files
.DS_Store

# jetbrains ide stuff
# Yarn cache
.yarn/

# JetBrains IDE stuff
*.iml
.idea/

Expand Down
13 changes: 0 additions & 13 deletions .prettierrc

This file was deleted.

12 changes: 0 additions & 12 deletions .stylelintrc

This file was deleted.

1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
Loading