Skip to content

Commit

Permalink
JupyterLab 4 final (#300)
Browse files Browse the repository at this point in the history
* Switch to JupyterLab 4 final

* add update script

* Switch to copier template

* Fix yarn.lock

* Update reference snapshots

* More reference snapshots update
  • Loading branch information
fcollonval authored May 23, 2023
1 parent 30fffd3 commit 479d1aa
Show file tree
Hide file tree
Showing 44 changed files with 605 additions and 587 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- geojson
- katex
- mathjax2
- vega2
- vega3

steps:
Expand All @@ -29,7 +28,7 @@ jobs:
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

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

- name: Lint the extension
run: |
Expand Down Expand Up @@ -78,7 +77,7 @@ jobs:
- vega3
jupyterlab:
- "3.6"
- 4.0.0b0
- 4.0.0
exclude:
- extension: katex
jupyterlab: "3.6"
Expand Down Expand Up @@ -111,7 +110,7 @@ jobs:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: |
if [[ "${{ matrix.jupyterlab }}" == "3.6" ]]; then
sed -i s/5.0.0-beta.1/4.0.0/ package.json
sed -i s/5.0.0/4.0.0/ package.json
fi
jlpm install
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"watch": "lerna run --parallel watch"
},
"devDependencies": {
"@jupyterlab/buildutils": "^4.0.0-beta.1",
"@jupyterlab/buildutils": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"eslint": "^8.36.0",
Expand Down
19 changes: 19 additions & 0 deletions packages/fasta-extension/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.0.5
_src_path: https://github.com/jupyterlab/extension-template
author_email: [email protected]
author_name: Project Jupyter
data_format: string
file_extension: ''
has_binder: false
has_settings: false
kind: frontend
labextension_name: '@jupyterlab/fasta-extension'
mimetype: ''
mimetype_name: ''
project_short_description: Fasta renderer for JupyterLab
python_name: jupyterlab_fasta
repository: https://github.com/jupyterlab/jupyter-renderers.git
test: true
viewer_name: ''

3 changes: 3 additions & 0 deletions packages/fasta-extension/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
enableImmutableInstalls: false

nodeLinker: node-modules
1 change: 0 additions & 1 deletion packages/fasta-extension/jupyterlab_fasta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ def _jupyter_labextension_paths():
"src": "labextension",
"dest": "@jupyterlab/fasta-extension"
}]

14 changes: 7 additions & 7 deletions packages/fasta-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
],
"scripts": {
"build": "jlpm build:lib && jlpm build:labextension:dev",
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
"build:labextension": "jupyter labextension build .",
"build:labextension:dev": "jupyter labextension build --development True .",
"build:lib": "tsc --sourceMap",
"build:lib:prod": "tsc",
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
"clean": "jlpm clean:lib",
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
"clean:labextension": "rimraf jupyterlab_fasta/labextension jupyterlab_fasta/_version.py",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
"clean:labextension": "rimraf jupyterlab_fasta/labextension jupyterlab_fasta/_version.py",
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
"eslint": "jlpm eslint:check --fix",
"eslint:check": "eslint . --cache --ext .ts,.tsx",
"install:extension": "jlpm build",
Expand All @@ -54,17 +54,17 @@
"stylelint": "jlpm stylelint:check --fix",
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
"watch": "run-p watch:src watch:labextension",
"watch:src": "tsc -w",
"watch:labextension": "jupyter labextension watch ."
"watch:labextension": "jupyter labextension watch .",
"watch:src": "tsc -w"
},
"dependencies": {
"@jlab-contrib/msa": "^1.1.2",
"@jupyterlab/rendermime-interfaces": "^3.0.0 || ^3.8.0-beta.1",
"@jupyterlab/rendermime-interfaces": "^3.0.0 || ^3.8.0",
"@lumino/messaging": "^1.0.0 || ^2.0.0",
"@lumino/widgets": "^1.0.0 || ^2.1.0"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0-beta.1",
"@jupyterlab/builder": "^4.0.0",
"@types/json-schema": "^7.0.11",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/fasta-extension/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0b0,<5", "hatch-nodejs-version"]
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version"]
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -66,7 +66,7 @@ version_cmd = "hatch version"

[tool.jupyter-releaser.hooks]
before-build-npm = [
"python -m pip install 'jupyterlab>=4.0.0b0,<5'",
"python -m pip install 'jupyterlab>=4.0.0,<5'",
"jlpm",
"jlpm build:prod"
]
Expand Down
23 changes: 21 additions & 2 deletions packages/fasta-extension/ui-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ in [jupyter_server_test_config.py](./jupyter_server_test_config.py).

The default configuration will produce video for failing tests and an HTML report.

> There is a new experimental UI mode that you may fall in love with; see [that video](https://www.youtube.com/watch?v=jF0yA-JLQW0).
## Run the tests

> All commands are assumed to be executed from the root directory
Expand Down Expand Up @@ -109,7 +111,14 @@ jlpm playwright install
cd ..
```

3. Execute the [Playwright code generator](https://playwright.dev/docs/codegen):
3. Start the server:

```sh
cd ./ui-tests
jlpm start
```

4. Execute the [Playwright code generator](https://playwright.dev/docs/codegen) in **another terminal**:

```sh
cd ./ui-tests
Expand Down Expand Up @@ -144,5 +153,15 @@ cd ..

```sh
cd ./ui-tests
PWDEBUG=1 jlpm playwright test
jlpm playwright test --debug
```

## Upgrade Playwright and the browsers

To update the web browser versions, you must update the package `@playwright/test`:

```sh
cd ./ui-tests
jlpm up "@playwright/test"
jlpm playwright install
```
2 changes: 1 addition & 1 deletion packages/fasta-extension/ui-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test:update": "jlpm playwright test --update-snapshots"
},
"devDependencies": {
"@jupyterlab/galata": "^5.0.0-beta.1",
"@jupyterlab/galata": "^5.0.0",
"@playwright/test": "^1.31.0"
}
}
19 changes: 19 additions & 0 deletions packages/geojson-extension/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.0.5
_src_path: https://github.com/jupyterlab/extension-template
author_email: [email protected]
author_name: Project Jupyter
data_format: string
file_extension: ''
has_binder: false
has_settings: false
kind: frontend
labextension_name: '@jupyterlab/geojson-extension'
mimetype: ''
mimetype_name: ''
project_short_description: GeoJSON renderer for JupyterLab
python_name: jupyterlab_geojson
repository: https://github.com/jupyterlab/jupyter-renderers.git
test: true
viewer_name: ''

3 changes: 3 additions & 0 deletions packages/geojson-extension/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
enableImmutableInstalls: false

nodeLinker: node-modules
1 change: 0 additions & 1 deletion packages/geojson-extension/jupyterlab_geojson/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ def _jupyter_labextension_paths():
"src": "labextension",
"dest": "@jupyterlab/geojson-extension"
}]

18 changes: 9 additions & 9 deletions packages/geojson-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
],
"scripts": {
"build": "jlpm build:lib && jlpm build:labextension:dev",
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
"build:labextension": "jupyter labextension build .",
"build:labextension:dev": "jupyter labextension build --development True .",
"build:lib": "tsc --sourceMap",
"build:lib:prod": "tsc",
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
"clean": "jlpm clean:lib",
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
"clean:labextension": "rimraf jupyterlab_geojson/labextension jupyterlab_geojson/_version.py",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
"clean:labextension": "rimraf jupyterlab_geojson/labextension jupyterlab_geojson/_version.py",
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
"eslint": "jlpm eslint:check --fix",
"eslint:check": "eslint . --cache --ext .ts,.tsx",
"install:extension": "jlpm build",
Expand All @@ -55,20 +55,20 @@
"stylelint": "jlpm stylelint:check --fix",
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
"watch": "run-p watch:src watch:labextension",
"watch:src": "tsc -w",
"watch:labextension": "jupyter labextension watch ."
"watch:labextension": "jupyter labextension watch .",
"watch:src": "tsc -w --sourceMap"
},
"dependencies": {
"@jupyterlab/apputils": "^3.0.0 || ^4.0.0-beta.1",
"@jupyterlab/rendermime-interfaces": "^3.0.0 || ^3.8.0-beta.1",
"@jupyterlab/ui-components": "^3.0.0 || ^4.0.0-beta.1",
"@jupyterlab/apputils": "^3.0.0 || ^4.0.0",
"@jupyterlab/rendermime-interfaces": "^3.0.0 || ^3.8.0",
"@jupyterlab/ui-components": "^3.0.0 || ^4.0.0",
"@lumino/algorithm": "^1.0.0 || ^2.1.0",
"@lumino/messaging": "^1.0.0 || ^2.0.0",
"@lumino/widgets": "^1.0.0 || ^2.1.0",
"leaflet": "^1.5.0"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0-beta.1",
"@jupyterlab/builder": "^4.0.0",
"@types/jest": "^29.2.0",
"@types/json-schema": "^7.0.11",
"@types/leaflet": "^1.4.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/geojson-extension/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0b0,<5", "hatch-nodejs-version"]
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version"]
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -66,7 +66,7 @@ version_cmd = "hatch version"

[tool.jupyter-releaser.hooks]
before-build-npm = [
"python -m pip install 'jupyterlab>=4.0.0b0,<5'",
"python -m pip install 'jupyterlab>=4.0.0,<5'",
"jlpm",
"jlpm build:prod"
]
Expand Down
23 changes: 21 additions & 2 deletions packages/geojson-extension/ui-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ in [jupyter_server_test_config.py](./jupyter_server_test_config.py).

The default configuration will produce video for failing tests and an HTML report.

> There is a new experimental UI mode that you may fall in love with; see [that video](https://www.youtube.com/watch?v=jF0yA-JLQW0).
## Run the tests

> All commands are assumed to be executed from the root directory
Expand Down Expand Up @@ -109,7 +111,14 @@ jlpm playwright install
cd ..
```

3. Execute the [Playwright code generator](https://playwright.dev/docs/codegen):
3. Start the server:

```sh
cd ./ui-tests
jlpm start
```

4. Execute the [Playwright code generator](https://playwright.dev/docs/codegen) in **another terminal**:

```sh
cd ./ui-tests
Expand Down Expand Up @@ -144,5 +153,15 @@ cd ..

```sh
cd ./ui-tests
PWDEBUG=1 jlpm playwright test
jlpm playwright test --debug
```

## Upgrade Playwright and the browsers

To update the web browser versions, you must update the package `@playwright/test`:

```sh
cd ./ui-tests
jlpm up "@playwright/test"
jlpm playwright install
```
2 changes: 1 addition & 1 deletion packages/geojson-extension/ui-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test:update": "jlpm playwright test --update-snapshots"
},
"devDependencies": {
"@jupyterlab/galata": "^5.0.0-beta.1",
"@jupyterlab/galata": "^5.0.0",
"@playwright/test": "^1.31.0"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions packages/katex-extension/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.0.5
_src_path: https://github.com/jupyterlab/extension-template
author_email: [email protected]
author_name: Project Jupyter
data_format: string
file_extension: ''
has_binder: false
has_settings: true
kind: frontend
labextension_name: '@jupyterlab/katex-extension'
mimetype: ''
mimetype_name: ''
project_short_description: KaTeX math renderer for JupyterLab
python_name: jupyterlab_katex
repository: https://github.com/jupyterlab/jupyter-renderers.git
test: true
viewer_name: ''

3 changes: 3 additions & 0 deletions packages/katex-extension/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
enableImmutableInstalls: false

nodeLinker: node-modules
1 change: 0 additions & 1 deletion packages/katex-extension/jupyterlab_katex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ def _jupyter_labextension_paths():
"src": "labextension",
"dest": "@jupyterlab/katex-extension"
}]

20 changes: 10 additions & 10 deletions packages/katex-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
],
"scripts": {
"build": "jlpm build:lib && jlpm build:labextension:dev",
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
"build:labextension": "jupyter labextension build .",
"build:labextension:dev": "jupyter labextension build --development True .",
"build:lib": "tsc --sourceMap",
"build:lib:prod": "tsc",
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
"clean": "jlpm clean:lib",
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
"clean:labextension": "rimraf jupyterlab_katex/labextension jupyterlab_katex/_version.py",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
"clean:labextension": "rimraf jupyterlab_katex/labextension jupyterlab_katex/_version.py",
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
"eslint": "jlpm eslint:check --fix",
"eslint:check": "eslint . --cache --ext .ts,.tsx",
"install:extension": "jlpm build",
Expand All @@ -56,18 +56,18 @@
"stylelint": "jlpm stylelint:check --fix",
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
"watch": "run-p watch:src watch:labextension",
"watch:src": "tsc -w",
"watch:labextension": "jupyter labextension watch ."
"watch:labextension": "jupyter labextension watch .",
"watch:src": "tsc -w --sourceMap"
},
"dependencies": {
"@jupyterlab/application": "^3.0.0 || ^4.0.0-beta.1",
"@jupyterlab/rendermime": "^3.0.0 || ^4.0.0-beta.1",
"@jupyterlab/rendermime-interfaces": "^3.0.0 || ^3.8.0-beta.1",
"@jupyterlab/settingregistry": "^3.0.0 || ^4.0.0-beta.1",
"@jupyterlab/application": "^3.0.0 || ^4.0.0",
"@jupyterlab/rendermime": "^3.0.0 || ^4.0.0",
"@jupyterlab/rendermime-interfaces": "^3.0.0 || ^3.8.0",
"@jupyterlab/settingregistry": "^3.0.0 || ^4.0.0",
"katex": "^0.12.0"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0-beta.1",
"@jupyterlab/builder": "^4.0.0",
"@types/json-schema": "^7.0.11",
"@types/katex": "^0.11.0",
"@typescript-eslint/eslint-plugin": "^5.55.0",
Expand Down
Loading

0 comments on commit 479d1aa

Please sign in to comment.