Skip to content

Commit 1d4d743

Browse files
committed
Update extension template
Update integration test ref snapshots
1 parent 0cedb7e commit 1d4d743

Some content is hidden

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

49 files changed

+5583
-2109
lines changed

.eslintrc.js

-39
This file was deleted.

.npmrc

-1
This file was deleted.

.prettierrc

-6
This file was deleted.

.stylelintrc

-12
This file was deleted.

package.json

+10-11
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,17 @@
2323
},
2424
"devDependencies": {
2525
"@jupyterlab/buildutils": "^4.0.0",
26-
"@typescript-eslint/eslint-plugin": "^5.55.0",
27-
"@typescript-eslint/parser": "^5.55.0",
26+
"@typescript-eslint/eslint-plugin": "^6.1.0",
27+
"@typescript-eslint/parser": "^6.1.0",
2828
"eslint": "^8.36.0",
29-
"eslint-config-prettier": "^8.7.0",
30-
"eslint-plugin-prettier": "^4.2.1",
31-
"lerna": "^6.6.0",
32-
"prettier": "^2.8.7",
33-
"rimraf": "^4.4.1",
29+
"eslint-config-prettier": "^8.8.0",
30+
"eslint-plugin-prettier": "^5.0.0",
31+
"lerna": "^7.1.0",
32+
"prettier": "^3.0.0",
33+
"rimraf": "^5.0.1",
3434
"stylelint": "^15.10.1",
35-
"stylelint-config-prettier": "^9.0.4",
36-
"stylelint-config-recommended": "^8.0.0",
37-
"stylelint-config-standard": "^26.0.0",
38-
"stylelint-prettier": "^2.0.0"
35+
"stylelint-config-recommended": "^13.0.0",
36+
"stylelint-config-standard": "^34.0.0",
37+
"stylelint-prettier": "^4.0.0"
3938
}
4039
}

packages/fasta-extension/.copier-answers.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: v4.0.5
2+
_commit: v4.1.0
33
_src_path: https://github.com/jupyterlab/extension-template
44
author_email: [email protected]
55
author_name: Project Jupyter
@@ -13,7 +13,7 @@ mimetype: ''
1313
mimetype_name: ''
1414
project_short_description: Fasta renderer for JupyterLab
1515
python_name: jupyterlab_fasta
16-
repository: https://github.com/jupyterlab/jupyter-renderers.git
16+
repository: https://github.com/jupyterlab/jupyter-renderers
1717
test: true
1818
viewer_name: ''
1919

packages/fasta-extension/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,12 @@ jupyter lab build --minimize=False
8484
```bash
8585
pip uninstall jupyterlab-fasta
8686
```
87+
88+
### Testing the extension
89+
90+
#### Integration tests
91+
92+
This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
93+
More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
94+
95+
More information are provided within the [ui-tests](./ui-tests/README.md) README.

packages/fasta-extension/jupyterlab_fasta/__init__.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
from ._version import __version__
1+
try:
2+
from ._version import __version__
3+
except ImportError:
4+
# Fallback when using the package in dev mode without installing
5+
# in editable mode with pip. It is highly recommended to install
6+
# the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
7+
import warnings
8+
warnings.warn("Importing 'jupyterlab_fasta' outside a proper installation.")
9+
__version__ = "dev"
210

311

412
def _jupyter_labextension_paths():

packages/fasta-extension/package.json

+103-11
Original file line numberDiff line numberDiff line change
@@ -66,28 +66,120 @@
6666
"devDependencies": {
6767
"@jupyterlab/builder": "^4.0.0",
6868
"@types/json-schema": "^7.0.11",
69-
"@typescript-eslint/eslint-plugin": "^5.55.0",
70-
"@typescript-eslint/parser": "^5.55.0",
69+
"@typescript-eslint/eslint-plugin": "^6.1.0",
70+
"@typescript-eslint/parser": "^6.1.0",
7171
"css-loader": "^6.7.1",
7272
"eslint": "^8.36.0",
73-
"eslint-config-prettier": "^8.7.0",
74-
"eslint-plugin-prettier": "^4.2.1",
73+
"eslint-config-prettier": "^8.8.0",
74+
"eslint-plugin-prettier": "^5.0.0",
7575
"npm-run-all": "^4.1.5",
76-
"prettier": "^2.8.7",
77-
"rimraf": "^4.4.1",
76+
"prettier": "^3.0.0",
77+
"rimraf": "^5.0.1",
7878
"source-map-loader": "^1.0.2",
7979
"style-loader": "^3.3.1",
8080
"stylelint": "^15.10.1",
81-
"stylelint-config-prettier": "^9.0.4",
82-
"stylelint-config-recommended": "^8.0.0",
83-
"stylelint-config-standard": "^26.0.0",
84-
"stylelint-prettier": "^2.0.0",
81+
"stylelint-config-recommended": "^13.0.0",
82+
"stylelint-config-standard": "^34.0.0",
83+
"stylelint-prettier": "^4.0.0",
8584
"typescript": "~5.0.2",
8685
"yjs": "^13.5.40"
8786
},
8887
"jupyterlab": {
8988
"mimeExtension": true,
9089
"outputDir": "jupyterlab_fasta/labextension"
9190
},
92-
"styleModule": "style/index.js"
91+
"sideEffects": [
92+
"style/*.css",
93+
"style/index.js"
94+
],
95+
"styleModule": "style/index.js",
96+
"eslintIgnore": [
97+
"node_modules",
98+
"dist",
99+
"coverage",
100+
"**/*.d.ts",
101+
"tests",
102+
"**/__tests__",
103+
"ui-tests"
104+
],
105+
"eslintConfig": {
106+
"extends": [
107+
"eslint:recommended",
108+
"plugin:@typescript-eslint/eslint-recommended",
109+
"plugin:@typescript-eslint/recommended",
110+
"plugin:prettier/recommended"
111+
],
112+
"parser": "@typescript-eslint/parser",
113+
"parserOptions": {
114+
"project": "tsconfig.eslint.json",
115+
"sourceType": "module"
116+
},
117+
"plugins": [
118+
"@typescript-eslint"
119+
],
120+
"rules": {
121+
"@typescript-eslint/naming-convention": [
122+
"error",
123+
{
124+
"selector": "interface",
125+
"format": [
126+
"PascalCase"
127+
],
128+
"custom": {
129+
"regex": "^I[A-Z]",
130+
"match": true
131+
}
132+
}
133+
],
134+
"@typescript-eslint/no-unused-vars": [
135+
"warn",
136+
{
137+
"args": "none"
138+
}
139+
],
140+
"@typescript-eslint/no-explicit-any": "off",
141+
"@typescript-eslint/no-namespace": "off",
142+
"@typescript-eslint/no-use-before-define": "off",
143+
"@typescript-eslint/quotes": [
144+
"error",
145+
"single",
146+
{
147+
"avoidEscape": true,
148+
"allowTemplateLiterals": false
149+
}
150+
],
151+
"curly": [
152+
"error",
153+
"all"
154+
],
155+
"eqeqeq": "error",
156+
"prefer-arrow-callback": "error"
157+
}
158+
},
159+
"prettier": {
160+
"singleQuote": true,
161+
"trailingComma": "none",
162+
"arrowParens": "avoid",
163+
"endOfLine": "auto",
164+
"overrides": [
165+
{
166+
"files": "package.json",
167+
"options": {
168+
"tabWidth": 4
169+
}
170+
}
171+
]
172+
},
173+
"stylelint": {
174+
"extends": [
175+
"stylelint-config-recommended",
176+
"stylelint-config-standard",
177+
"stylelint-prettier/recommended"
178+
],
179+
"rules": {
180+
"property-no-vendor-prefix": null,
181+
"selector-no-vendor-prefix": null,
182+
"value-no-vendor-prefix": null
183+
}
184+
}
93185
}

packages/fasta-extension/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('setuptools').setup()
1+
__import__("setuptools").setup()

packages/fasta-extension/style/base.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Distributed under the terms of the Modified BSD License.
44
*/
55

6-
@import 'msa.css';
6+
@import url('msa.css');
77

88
/* Add CSS variables to :root */
99
:root {

packages/fasta-extension/style/index.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
Distributed under the terms of the Modified BSD License.
44
*/
55

6-
@import 'base.css';
6+
@import url('base.css');

packages/fasta-extension/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"rootDir": "src",
1818
"strict": true,
1919
"strictNullChecks": true,
20-
"target": "ES2018",
21-
"types": ["jest"]
20+
"target": "ES2018"
2221
},
2322
"include": ["src/*"]
2423
}

packages/geojson-extension/.copier-answers.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: v4.0.5
2+
_commit: v4.1.0
33
_src_path: https://github.com/jupyterlab/extension-template
44
author_email: [email protected]
55
author_name: Project Jupyter
@@ -13,7 +13,7 @@ mimetype: ''
1313
mimetype_name: ''
1414
project_short_description: GeoJSON renderer for JupyterLab
1515
python_name: jupyterlab_geojson
16-
repository: https://github.com/jupyterlab/jupyter-renderers.git
16+
repository: https://github.com/jupyterlab/jupyter-renderers
1717
test: true
1818
viewer_name: ''
1919

packages/geojson-extension/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,16 @@ jupyter lab build --minimize=False
114114
```bash
115115
pip uninstall jupyterlab-geojson
116116
```
117+
118+
In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
119+
command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
120+
folder is located. Then you can remove the symlink named `@jupyterlab/geojson-extension` within that folder.
121+
122+
### Testing the extension
123+
124+
#### Integration tests
125+
126+
This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
127+
More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
128+
129+
More information are provided within the [ui-tests](./ui-tests/README.md) README.

packages/geojson-extension/jupyterlab_geojson/__init__.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
from ._version import __version__
1+
try:
2+
from ._version import __version__
3+
except ImportError:
4+
# Fallback when using the package in dev mode without installing
5+
# in editable mode with pip. It is highly recommended to install
6+
# the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
7+
import warnings
8+
warnings.warn("Importing 'jupyterlab_geojson' outside a proper installation.")
9+
__version__ = "dev"
210

311

412
def _jupyter_labextension_paths():

0 commit comments

Comments
 (0)