Skip to content

Commit 4a88cf7

Browse files
authored
Bump to Jupyterlab 4 (#15)
* Bump to jupyterlab 4 and switch to extension template * Fix default file browser for lab 4 * lint * Fix repo URL
1 parent 807c7e3 commit 4a88cf7

26 files changed

+15357
-8713
lines changed

.copier-answers.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: v4.2.4
3+
_src_path: https://github.com/jupyterlab/extension-template
4+
author_email: [email protected]
5+
author_name: Jupyter Development Team
6+
data_format: string
7+
file_extension: ''
8+
has_binder: true
9+
has_settings: false
10+
kind: frontend
11+
labextension_name: '@jupyterlite/litegitpuller'
12+
mimetype: ''
13+
mimetype_name: ''
14+
project_short_description: A jupyterlite extension to automate cloning of a github
15+
repository.
16+
python_name: litegitpuller
17+
repository: https://github.com/jupyterlite/litegitpuller
18+
test: true
19+
viewer_name: ''
20+

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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
1919

2020
- name: Install dependencies
21-
run: python -m pip install -U jupyterlab~=3.1
21+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
2222

2323
- name: Lint the extension
2424
run: |
@@ -38,7 +38,6 @@ jobs:
3838
3939
jupyter labextension list
4040
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/litegitpuller.*OK"
41-
npx playwright install chromium
4241
python -m jupyterlab.browser_check
4342
4443
- name: Package the extension
@@ -61,8 +60,6 @@ jobs:
6160
runs-on: ubuntu-latest
6261

6362
steps:
64-
- name: Checkout
65-
uses: actions/checkout@v3
6663
- name: Install Python
6764
uses: actions/setup-python@v4
6865
with:
@@ -78,12 +75,12 @@ jobs:
7875
sudo rm -rf $(which node)
7976
sudo rm -rf $(which node)
8077
81-
pip install "jupyterlab~=3.1" litegitpuller*.whl
78+
pip install "jupyterlab>=4.0.0,<5" litegitpuller*.whl
8279
8380
8481
jupyter labextension list
8582
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/litegitpuller.*OK"
86-
python -m jupyterlab.browser_check --no-chrome-test
83+
python -m jupyterlab.browser_check --no-browser-test
8784
8885
integration-tests:
8986
name: Integration tests
@@ -108,11 +105,12 @@ jobs:
108105
- name: Install the extension
109106
run: |
110107
set -eux
111-
python -m pip install "jupyterlab~=3.1" litegitpuller*.whl
108+
python -m pip install "jupyterlab>=4.0.0,<5" litegitpuller*.whl
112109
113110
- name: Install dependencies
114111
working-directory: ui-tests
115112
env:
113+
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
116114
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
117115
run: jlpm install
118116

.github/workflows/check-release.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ jobs:
1313
uses: actions/checkout@v3
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:
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/publish-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
# PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
4040
# TWINE_USERNAME: __token__
4141
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42-
uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2
42+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
4343
with:
4444
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
4545
release_url: ${{ steps.populate-release.outputs.release_url }}

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,32 @@ permissions:
99
pull-requests: write
1010

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

1816
steps:
17+
- name: React to the triggering comment
18+
run: |
19+
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions --raw-field 'content=+1'
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
1923
- name: Checkout
20-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2125
with:
2226
token: ${{ secrets.GITHUB_TOKEN }}
2327

24-
- name: Configure git to use https
25-
run: git config --global hub.protocol https
26-
2728
- name: Checkout the branch from the PR that triggered the job
28-
run: hub pr checkout ${{ github.event.issue.number }}
29+
run: gh pr checkout ${{ github.event.issue.number }}
2930
env:
3031
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3132

3233
- name: Base Setup
3334
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
3435

3536
- name: Install dependencies
36-
run: python -m pip install -U jupyterlab~=3.1
37+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
3738

3839
- name: Install extension
3940
run: |
@@ -47,4 +48,3 @@ jobs:
4748
# Playwright knows how to start JupyterLab server
4849
start_server_script: 'null'
4950
test_folder: ui-tests
50-

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,6 @@ dmypy.json
120120

121121
# OSX files
122122
.DS_Store
123+
124+
# Yarn cache
125+
.yarn/

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# litegitpuller
22

3-
[![Github Actions Status](https://github.com/jupyterlite/litegitpuller/workflows/Build/badge.svg)](https://github.com/jupyterlite/litegitpuller/actions/workflows/build.yml)
4-
3+
[![Github Actions Status](https://github.com/jupyterlite/litegitpuller/workflows/Build/badge.svg)](https://github.com/jupyterlite/litegitpuller/actions/workflows/build.yml)[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyterlite/litegitpuller/main?urlpath=lab)
54
A jupyterlite extension to automate cloning of a github repository.
65

76
## Docs
@@ -10,7 +9,7 @@ See [https://litegitpuller.readthedocs.io/en/latest/index.html](https://litegitp
109

1110
## Requirements
1211

13-
- JupyterLab >= 3.0
12+
- JupyterLab >= 4.0.0
1413

1514
## Install
1615

@@ -91,7 +90,7 @@ jlpm test
9190

9291
#### Integration tests
9392

94-
This extension uses [Playwright](https://playwright.dev/docs/intro/) for the integration tests (aka user level tests).
93+
This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
9594
More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
9695

9796
More information are provided within the [ui-tests](./ui-tests/README.md) README.

0 commit comments

Comments
 (0)