Skip to content

Commit 479d1aa

Browse files
authored
JupyterLab 4 final (#300)
* Switch to JupyterLab 4 final * add update script * Switch to copier template * Fix yarn.lock * Update reference snapshots * More reference snapshots update
1 parent 30fffd3 commit 479d1aa

File tree

44 files changed

+605
-587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+605
-587
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
- geojson
1818
- katex
1919
- mathjax2
20-
- vega2
2120
- vega3
2221

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

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

3433
- name: Lint the extension
3534
run: |
@@ -78,7 +77,7 @@ jobs:
7877
- vega3
7978
jupyterlab:
8079
- "3.6"
81-
- 4.0.0b0
80+
- 4.0.0
8281
exclude:
8382
- extension: katex
8483
jupyterlab: "3.6"
@@ -111,7 +110,7 @@ jobs:
111110
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
112111
run: |
113112
if [[ "${{ matrix.jupyterlab }}" == "3.6" ]]; then
114-
sed -i s/5.0.0-beta.1/4.0.0/ package.json
113+
sed -i s/5.0.0/4.0.0/ package.json
115114
fi
116115
jlpm install
117116

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"watch": "lerna run --parallel watch"
2323
},
2424
"devDependencies": {
25-
"@jupyterlab/buildutils": "^4.0.0-beta.1",
25+
"@jupyterlab/buildutils": "^4.0.0",
2626
"@typescript-eslint/eslint-plugin": "^5.55.0",
2727
"@typescript-eslint/parser": "^5.55.0",
2828
"eslint": "^8.36.0",
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: v4.0.5
3+
_src_path: https://github.com/jupyterlab/extension-template
4+
author_email: jupyter@googlegroups.com
5+
author_name: Project Jupyter
6+
data_format: string
7+
file_extension: ''
8+
has_binder: false
9+
has_settings: false
10+
kind: frontend
11+
labextension_name: '@jupyterlab/fasta-extension'
12+
mimetype: ''
13+
mimetype_name: ''
14+
project_short_description: Fasta renderer for JupyterLab
15+
python_name: jupyterlab_fasta
16+
repository: https://github.com/jupyterlab/jupyter-renderers.git
17+
test: true
18+
viewer_name: ''
19+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
enableImmutableInstalls: false
2+
3+
nodeLinker: node-modules

packages/fasta-extension/jupyterlab_fasta/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ def _jupyter_labextension_paths():
66
"src": "labextension",
77
"dest": "@jupyterlab/fasta-extension"
88
}]
9-

packages/fasta-extension/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@
3333
],
3434
"scripts": {
3535
"build": "jlpm build:lib && jlpm build:labextension:dev",
36-
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
3736
"build:labextension": "jupyter labextension build .",
3837
"build:labextension:dev": "jupyter labextension build --development True .",
3938
"build:lib": "tsc --sourceMap",
4039
"build:lib:prod": "tsc",
40+
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
4141
"clean": "jlpm clean:lib",
42+
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
43+
"clean:labextension": "rimraf jupyterlab_fasta/labextension jupyterlab_fasta/_version.py",
4244
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
4345
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
44-
"clean:labextension": "rimraf jupyterlab_fasta/labextension jupyterlab_fasta/_version.py",
45-
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
4646
"eslint": "jlpm eslint:check --fix",
4747
"eslint:check": "eslint . --cache --ext .ts,.tsx",
4848
"install:extension": "jlpm build",
@@ -54,17 +54,17 @@
5454
"stylelint": "jlpm stylelint:check --fix",
5555
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
5656
"watch": "run-p watch:src watch:labextension",
57-
"watch:src": "tsc -w",
58-
"watch:labextension": "jupyter labextension watch ."
57+
"watch:labextension": "jupyter labextension watch .",
58+
"watch:src": "tsc -w"
5959
},
6060
"dependencies": {
6161
"@jlab-contrib/msa": "^1.1.2",
62-
"@jupyterlab/rendermime-interfaces": "^3.0.0 || ^3.8.0-beta.1",
62+
"@jupyterlab/rendermime-interfaces": "^3.0.0 || ^3.8.0",
6363
"@lumino/messaging": "^1.0.0 || ^2.0.0",
6464
"@lumino/widgets": "^1.0.0 || ^2.1.0"
6565
},
6666
"devDependencies": {
67-
"@jupyterlab/builder": "^4.0.0-beta.1",
67+
"@jupyterlab/builder": "^4.0.0",
6868
"@types/json-schema": "^7.0.11",
6969
"@typescript-eslint/eslint-plugin": "^5.55.0",
7070
"@typescript-eslint/parser": "^5.55.0",

packages/fasta-extension/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0b0,<5", "hatch-nodejs-version"]
2+
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version"]
33
build-backend = "hatchling.build"
44

55
[project]
@@ -66,7 +66,7 @@ version_cmd = "hatch version"
6666

6767
[tool.jupyter-releaser.hooks]
6868
before-build-npm = [
69-
"python -m pip install 'jupyterlab>=4.0.0b0,<5'",
69+
"python -m pip install 'jupyterlab>=4.0.0,<5'",
7070
"jlpm",
7171
"jlpm build:prod"
7272
]

packages/fasta-extension/ui-tests/README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ in [jupyter_server_test_config.py](./jupyter_server_test_config.py).
1212

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

15+
> 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).
16+
1517
## Run the tests
1618

1719
> All commands are assumed to be executed from the root directory
@@ -109,7 +111,14 @@ jlpm playwright install
109111
cd ..
110112
```
111113

112-
3. Execute the [Playwright code generator](https://playwright.dev/docs/codegen):
114+
3. Start the server:
115+
116+
```sh
117+
cd ./ui-tests
118+
jlpm start
119+
```
120+
121+
4. Execute the [Playwright code generator](https://playwright.dev/docs/codegen) in **another terminal**:
113122

114123
```sh
115124
cd ./ui-tests
@@ -144,5 +153,15 @@ cd ..
144153

145154
```sh
146155
cd ./ui-tests
147-
PWDEBUG=1 jlpm playwright test
156+
jlpm playwright test --debug
157+
```
158+
159+
## Upgrade Playwright and the browsers
160+
161+
To update the web browser versions, you must update the package `@playwright/test`:
162+
163+
```sh
164+
cd ./ui-tests
165+
jlpm up "@playwright/test"
166+
jlpm playwright install
148167
```

packages/fasta-extension/ui-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test:update": "jlpm playwright test --update-snapshots"
1010
},
1111
"devDependencies": {
12-
"@jupyterlab/galata": "^5.0.0-beta.1",
12+
"@jupyterlab/galata": "^5.0.0",
1313
"@playwright/test": "^1.31.0"
1414
}
1515
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: v4.0.5
3+
_src_path: https://github.com/jupyterlab/extension-template
4+
author_email: jupyter@googlegroups.com
5+
author_name: Project Jupyter
6+
data_format: string
7+
file_extension: ''
8+
has_binder: false
9+
has_settings: false
10+
kind: frontend
11+
labextension_name: '@jupyterlab/geojson-extension'
12+
mimetype: ''
13+
mimetype_name: ''
14+
project_short_description: GeoJSON renderer for JupyterLab
15+
python_name: jupyterlab_geojson
16+
repository: https://github.com/jupyterlab/jupyter-renderers.git
17+
test: true
18+
viewer_name: ''
19+

0 commit comments

Comments
 (0)