Skip to content

Commit b8b4f14

Browse files
authored
Update to JupyterLab 4 (#55)
* Update to JupyterLab 4 * Update yarn.lock * lint * fix dist upload * try underscores * fix signature * Add toolbar factory * Add uploader * fix file upload * add filename searcher * use pre-release packages in docs * undo tsconfig change * Disable forceRefresh * add jupyterlite-xeus-python to the docs env * Use `DRIVE_NAME` * Remove previous file * Rename to `jupyterlab_filesystem_access` as before * Fix `_jupyter_labextension_paths` * fix shared data
1 parent 4567cd6 commit b8b4f14

22 files changed

+6435
-6768
lines changed

.copier-answers.yml

Lines changed: 14 additions & 0 deletions
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.2
3+
_src_path: https://github.com/jupyterlab/extension-template
4+
author_email: ''
5+
author_name: JupyterLab Contrib Team
6+
has_binder: false
7+
has_settings: false
8+
kind: frontend
9+
labextension_name: jupyterlab-filesystem-access
10+
project_short_description: Mount local files using the Filesystem API
11+
python_name: jupyterlab_filesystem_access
12+
repository: https://github.com/jupyterlab-contrib/jupyterlab-filesystem-access.git
13+
test: false
14+

.eslintignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

.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: |
@@ -41,22 +41,20 @@ jobs:
4141
4242
pip install build
4343
python -m build
44-
pip uninstall -y "jupyterlab_filesystem_access" jupyterlab
44+
pip uninstall -y "jupyterlab-filesystem-access" jupyterlab
4545
4646
- name: Upload extension packages
4747
uses: actions/upload-artifact@v3
4848
with:
4949
name: extension-artifacts
50-
path: dist/jupyterlab_filesystem_access*
50+
path: dist/*
5151
if-no-files-found: error
5252

5353
test_isolated:
5454
needs: build
5555
runs-on: ubuntu-latest
5656

5757
steps:
58-
- name: Checkout
59-
uses: actions/checkout@v3
6058
- name: Install Python
6159
uses: actions/setup-python@v4
6260
with:
@@ -72,12 +70,12 @@ jobs:
7270
sudo rm -rf $(which node)
7371
sudo rm -rf $(which node)
7472
75-
pip install "jupyterlab~=3.1" jupyterlab_filesystem_access*.whl
73+
pip install "jupyterlab>=4.0.0,<5" jupyterlab_filesystem_access*.whl
7674
7775
7876
jupyter labextension list
7977
jupyter labextension list 2>&1 | grep -ie "jupyterlab-filesystem-access.*OK"
80-
python -m jupyterlab.browser_check --no-chrome-test
78+
python -m jupyterlab.browser_check --no-browser-test
8179
8280
8381
check_links:

.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:

.github/workflows/prep-release.yml

Lines changed: 41 additions & 0 deletions
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 }}"
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "Step 2: Publish Release"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
branch:
6+
description: "The target branch"
7+
required: false
8+
release_url:
9+
description: "The URL of the draft GitHub release"
10+
required: false
11+
steps_to_skip:
12+
description: "Comma separated list of steps to skip"
13+
required: false
14+
15+
jobs:
16+
publish_release:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
# This is useful if you want to use PyPI trusted publisher
20+
# and NPM provenance
21+
id-token: write
22+
steps:
23+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
24+
25+
- name: Populate Release
26+
id: populate-release
27+
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
28+
with:
29+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
30+
branch: ${{ github.event.inputs.branch }}
31+
release_url: ${{ github.event.inputs.release_url }}
32+
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
33+
34+
- name: Finalize Release
35+
id: finalize-release
36+
env:
37+
# The following are needed if you use legacy PyPI set up
38+
# PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
39+
# PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
40+
# TWINE_USERNAME: __token__
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
43+
with:
44+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
45+
release_url: ${{ steps.populate-release.outputs.release_url }}
46+
47+
- name: "** Next Step **"
48+
if: ${{ success() }}
49+
run: |
50+
echo "Verify the final release"
51+
echo ${{ steps.finalize-release.outputs.release_url }}
52+
53+
- name: "** Failure Message **"
54+
if: ${{ failure() }}
55+
run: |
56+
echo "Failed to Publish the Draft Release Url:"
57+
echo ${{ steps.populate-release.outputs.release_url }}

.gitignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ jupyterlab_filesystem_access/labextension
1111
# Version file is handled by hatchling
1212
jupyterlab_filesystem_access/_version.py
1313

14-
# Integration tests
15-
ui-tests/test-results/
16-
ui-tests/playwright-report/
17-
1814
# Created by https://www.gitignore.io/api/python
1915
# Edit at https://www.gitignore.io/?templates=python
2016

@@ -120,3 +116,9 @@ dmypy.json
120116

121117
# OSX files
122118
.DS_Store
119+
120+
# Yarn cache
121+
.yarn/
122+
123+
# JupyterLab update script
124+
_temp_extension

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ node_modules
33
**/lib
44
**/package.json
55
!/package.json
6-
jupyterlab_filesystem_access
6+
jupyterlab-filesystem-access

.prettierrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)