8000 Align compilation with upstream tooling · swan-cern/sparkmonitor@b9146f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit b9146f9

Browse files
diocasetejedor
authored andcommitted
Align compilation with upstream tooling
1 parent 7e1da95 commit b9146f9

File tree

11 files changed

+617
-401
lines changed

11 files changed

+617
-401
lines changed

.bumpversion.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ tag = True
55
tag_name = v{new_version}
66
message = v{new_version}
77

8-
[bumpversion:file:sparkmonitor/_version.py]
9-
108
[bumpversion:file:package.json]
9+
search = "version": "{current_version}"
10+
replace = "version": "{new_version}"

.eslintrc.js

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

.gitignore

Lines changed: 118 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,126 @@
11
.vscode/settings.json
2-
*.pyc
2+
*.bundle.*
3+
lib/
4+
node_modules/
35
*.log
4-
**/.ipynb_checkpoints/
6+
.eslintcache
7+
.stylelintcache
8+
*.egg-info/
9+
.ipynb_checkpoints
10+
*.tsbuildinfo
511
sparkmonitor/labextension
< E7EE /code>
12+
sparkmonitor/static
613
scalalistener/project/
714
scalalistener/target/
815
sparkmonitor/*.jar
9-
*.egg-info/
10-
dist/
16+
# Version file is handled by hatchling
17+
sparkmonitor/_version.py
18+
19+
# Created by https://www.gitignore.io/api/python
20+
# Edit at https://www.gitignore.io/?templates=python
21+
22+
### Python ###
23+
# Byte-compiled / optimized / DLL files
24+
__pycache__/
25+
*.py[cod]
26+
*$py.class
27+
28+
# C extensions
29+
*.so
30+
31+
# Distribution / packaging
32+
.Python
1133
build/
12-
node_modules/
13-
sparkmonitor/static/
14-
docs/
34+
develop-eggs/
35+
dist/
36+
downloads/
37+
eggs/
38+
.eggs/
1539
lib/
16-
venv
17-
.tox
18-
.metals
19-
*.tsbuildinfo
20-
scalalistener/.bsp
21-
.yarn
40+
lib64/
41+
parts/
42+
sdist/
43+
var/
44+
wheels/
45+
pip-wheel-metadata/
46+
share/python-wheels/
47+
.installed.cfg
48+
*.egg
49+
MANIFEST
50+
51+
# PyInstaller
52+
# Usually these files are written by a python script from a template
53+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
54+
*.manifest
55+
*.spec
56+
57+
# Installer logs
58+
pip-log.txt
59+
pip-delete-this-directory.txt
60+
61+
# Unit test / coverage reports
62+
htmlcov/
63+
.tox/
64+
.nox/
65+
.coverage
66+
.coverage.*
67+
.cache
68+
nosetests.xml
69+
coverage/
70+
coverage.xml
71+
*.cover
72+
.hypothesis/
73+
.pytest_cache/
74+
75+
# Translations
76+
*.mo
77+
*.pot
78+
79+
# Scrapy stuff:
80+
.scrapy
81+
82+
# Sphinx documentation
83+
docs/_build/
84+
85+
# PyBuilder
86+
target/
87+
88+
# pyenv
89+
.python-version
90+
91+
# celery beat schedule file
92+
celerybeat-schedule
93+
94+
# SageMath parsed files
95+
*.sage.py
96+
97+
# Spyder project settings
98+
.spyderproject
99+
.spyproject
100+
101+
# Rope project settings
102+
.ropeproject
103+
104+
# Mr Developer
105+
.mr.developer.cfg
106+
.project
107+
.pydevproject
108+
109+
# mkdocs documentation
110+
/site
111+
112+
# mypy
113+
.mypy_cache/
114+
.dmypy.json
115+
dmypy.json
116+
117+
# Pyre type checker
118+
.pyre/
119+
120+
# End of https://www.gitignore.io/api/python
121+
122+
# OSX files
123+
.DS_Store
124+
125+
# Yarn cache
126+
.yarn/

.yarnrc.yml

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

install.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"packageManager": "python",
3-
"packageName": "sparkmonitor",
4-
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package sparkmonitor"
2+
"packageManager": "python",
3+
"packageName": "sparkmonitor",
4+
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package sparkmonitor"
55
}

package.json

Lines changed: 131 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,48 @@
3030
},
3131
"homepage": "https://github.com/swan-cern/sparkmonitor#readme",
3232
"scripts": {
33-
"build:prod": "jlpm run build:lib && jlpm run build:labextension && jlpm run build:nbextension && jlpm run build:scalalistener",
34-
"build": "jlpm run build:lib && jlpm run build:labextension",
35-
"build:lib": "tsc -p tsconfig.lab.json",
33+
"build": "jlpm run build:lib && jlpm run build:labextension:dev",
34+
"build:prod": "jlpm clean && jlpm run build:lib:prod && jlpm run build:labextension && jlpm run build:nbextension && jlpm run build:scalalistener",
3635
"build:labextension": "jupyter labextension build .",
3736
"build:labextension:dev": "jupyter labextension build --development True .",
37+
"build:lib": "tsc -p tsconfig.lab.json --sourceMap",
38+
"build:lib:prod": "tsc -p tsconfig.lab.json",
39+
"build:nbextension": "webpack --config src/notebook-extension/webpack.config.js",
3840
"build:scalalistener": "cd scalalistener && sbt +assembly",
39-
"clean": "rimraf lib jupyterlab_sparkmonior:labextension",
40-
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
41+
"clean": "jlpm clean:lib",
42+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
43+
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
44+
"clean:labextension": "rimraf sparkmonitor/labextension sparkmonitor/_version.py",
45+
"clean:nbextension": "rimraf sparkmonitor/static",
46+
"clean:scalalistener": "rimraf sparkmonitor/*.jar",
47+
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:nbextension && jlpm clean:scalalistener && jlpm clean:lintcache",
48+
"eslint": "jlpm eslint:check --fix",
49+
"eslint:check": "eslint . --cache --ext .ts,.tsx",
50+
"install:extension": "jlpm build",
51+
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
52+
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
53+
"prettier": "jlpm prettier:base --write --list-different",
54+
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
55+
"prettier:check": "jlpm prettier:base --check",
56+
"stylelint": "jlpm stylelint:check --fix",
57+
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
4158
"watch": "run-p watch:src watch:labextension",
42-
"watch:src": "tsc -w -p tsconfig.lab.json",
59+
"watch:src": "tsc -w -p tsconfig.lab.json --sourceMap",
4360
"watch:labextension": "jupyter labextension watch .",
44-
"build:nbextension": "webpack --config src/notebook-extension/webpack.config.js",
4561
"watch:nbextension": "webpack --config src/notebook-extension/webpack.config.js --mode development --watch",
46-
"check:all": "jlpm run check:eslint && jlpm run check:nbextension && jlpm run check:labextension",
47-
"check:eslint": "eslint .",
48-
"check:nbextension": "tsc -p tsconfig.notebook.json",
49-
"check:labextension": "tsc -p tsconfig.lab.json --noEmit"
62+
"check:all": "jlpm run lint:check && jlpm run check:nbextension && jlpm run check:labextension",
63+
"check:labextension": "tsc -p tsconfig.lab.json --noEmit",
64+
"check:nbextension": "tsc -p tsconfig.notebook.json"
5065
},
5166
"dependencies": {
52-
"@jupyterlab/application": "^4.0.9",
53-
"@jupyterlab/apputils": "^4.1.9",
54-
"@jupyterlab/cells": "^4.0.9",
55-
"@jupyterlab/mainmenu": "^4.0.9",
56-
"@jupyterlab/notebook": "^4.0.9",
57-
"@jupyterlab/services": "^7.0.9",
58-
"@lumino/coreutils": "^2.1.2",
59-
"@lumino/widgets": "^2.3.1",
67+
"@jupyterlab/application": "^4.0.10",
68+
"@jupyterlab/apputils": "^4.1.10",
69+
"@jupyterlab/cells": "^4.0.10",
70+
"@jupyterlab/mainmenu": "^4.0.10",
71+
"@jupyterlab/notebook": "^4.0.10",
72+
"@jupyterlab/services": "^7.0.10",
73+
"@lumino/coreutils": "^2.0.0",
74+
"@lumino/widgets": "^2.0.1",
6075
"hammerjs": "^2.0.8",
6176
"keycharm": "^0.4.0",
6277
"mobx": "^6.12.0",
@@ -84,6 +99,7 @@
8499
"@types/plotly.js-basic-dist": "^1.54.4",
85100
"@types/react": "^18.0.26",
86101
"@types/react-addons-linked-state-mixin": "^0.14.22",
102+
"@types/react-dom": "^18.2.18",
87103
"@types/react-plotly.js": "^2.6.3",
88104
"@types/react-timeago": "^4.1.6",
89105
"@typescript-eslint/eslint-plugin": "^6.1.0",
@@ -107,7 +123,7 @@
107123
"stylelint-prettier": "^4.0.0",
108124
"typescript": "~5.0.2",
109125
"webpack": "^5.89.0",
110-
"yjs": "^13.5.0"
126+
"yjs": "^13.5.40"
111127
},
112128
"jupyterlab": {
113129
"extension": "lib/lab-extension/index",
@@ -116,6 +132,99 @@
116132
"style": "style/lab.css",
117133
"files": [
118134
"lib/*",
119-
"src/*"
120-
]
135+
"src/*",
136+
"style/lab.js"
137+
],
138+
"eslintConfig": {
139+
"extends": [
140+
"eslint:recommended",
141+
"plugin:@typescript-eslint/eslint-recommended",
142+
"plugin:@typescript-eslint/recommended",
143+
"plugin:prettier/recommended"
144+
],
145+
"parser": "@typescript-eslint/parser",
146+
"parserOptions": {
147+
"project": "tsconfig.json",
148+
"sourceType": "module"
149+
},
150+
"plugins": [
151+
"@typescript-eslint"
152+
],
153+
"rules": {
154+
"@typescript-eslint/naming-convention": [
155+
"error",
156+
{
157+
"selector": "interface",
158+
"format": [
159+
"PascalCase"
160+
],
161+
"custom": {
162+
"regex": "^I[A-Z]",
163+
"match": true
164+
}
165+
}
166+
],
167+
"@typescript-eslint/no-unused-vars": [
168+
"warn",
169+
{
170+
"args": "none"
171+
}
172+
],
173+
"@typescript-eslint/no-explicit-any": "off",
174+
"@typescript-eslint/no-namespace": "off",
175+
"@typescript-eslint/no-use-before-define": "off",
176+
"@typescript-eslint/quotes": [
177+
"error",
178+
"single",
179+
{
180+
"avoidEscape": true,
181+
"allowTemplateLiterals": false
182+
}
183+
],
184+
"curly": [
185+
"error",
186+
"all"
187+
],
188+
"eqeqeq": "error",
189+
"prefer-arrow-callback": "error"
190+
}
191+
},
192+
"eslintIgnore": [
193+
"node_modules",
194+
"dist",
195+
"coverage",
196+
"**/*.d.ts"
197+
],
198+
"prettier": {
199+
"singleQuote": true,
200+
"trailingComma": "none",
201+
"arrowParens": "avoid",
202+
"endOfLine": "auto",
203+
"overrides": [
204+
{
205+
"files": "package.json",
206+
"options": {
207+
"tabWidth": 4
208+
}
209+
}
210+
]
211+
},
212+
"stylelint": {
213+
"extends": [
214+
"stylelint-config-recommended",
215+
"stylelint-config-standard",
216+
"stylelint-prettier/recommended"
217+
],
218+
"plugins": [
219+
"stylelint-csstree-validator"
220+
],
221+
"rules": {
222+
"csstree/validator": true,
223+
"property-no-vendor-prefix": null,
224+
"selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$",
225+
"selector-no-vendor-prefix": null,
226+
"value-no-vendor-prefix": null
227+
}
228+
},
229+
"styleModule": "style/lab.js"
121230
}

0 commit comments

Comments
 (0)
0