Skip to content

Commit

Permalink
Upgrade to jupyterlab 4 (#1236)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
HaudinFlorence and fcollonval authored Oct 24, 2023
1 parent 792f47e commit e77defa
Show file tree
Hide file tree
Showing 130 changed files with 19,447 additions and 19,276 deletions.
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

0 comments on commit e77defa

Please sign in to comment.