Skip to content

Commit f79dca5

Browse files
update vscode tasks
1 parent 07e8cef commit f79dca5

1 file changed

Lines changed: 160 additions & 77 deletions

File tree

.vscode/tasks.json

Lines changed: 160 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,160 +1,243 @@
1-
{
1+
{
22
// See https://go.microsoft.com/fwlink/?LinkId=733558
33
// for the documentation about the tasks.json format
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"label": "Run Coverage",
8-
"type": "shell",
9-
"command": "cmd",
7+
"label": "🧽 Ruff Formatter",
8+
"command": "${command:python.interpreterPath}",
109
"args": [
11-
"/c",
12-
"run_coverage.bat"
10+
"scripts/run_with_env.py",
11+
"${command:python.interpreterPath}",
12+
"-m",
13+
"ruff",
14+
"format",
1315
],
1416
"options": {
15-
"cwd": "scripts",
16-
"env": {
17-
"UNATTENDED": "1",
18-
"PYTHON": "${env:PPSTACK_PYTHONEXE}"
19-
}
17+
"cwd": "${workspaceFolder}",
18+
"statusbar": {
19+
"hide": true,
20+
},
2021
},
2122
"group": {
2223
"kind": "build",
23-
"isDefault": true
24+
"isDefault": true,
2425
},
2526
"presentation": {
27+
"clear": true,
2628
"echo": true,
27-
"reveal": "always",
2829
"focus": false,
2930
"panel": "dedicated",
31+
"reveal": "always",
3032
"showReuseMessage": true,
31-
"clear": true
32-
}
33+
},
34+
"type": "shell",
3335
},
3436
{
35-
"label": "Run pytest",
36-
"type": "shell",
37-
"command": "cmd",
37+
"label": "🔦 Ruff Linter",
38+
"command": "${command:python.interpreterPath}",
3839
"args": [
39-
"/c",
40-
"run_pytest.bat"
40+
"scripts/run_with_env.py",
41+
"${command:python.interpreterPath}",
42+
"-m",
43+
"ruff",
44+
"check",
45+
"--fix",
4146
],
4247
"options": {
43-
"cwd": "scripts",
44-
"env": {
45-
"UNATTENDED": "1",
46-
"PYTHON": "${env:PPSTACK_PYTHONEXE}"
47-
}
48+
"cwd": "${workspaceFolder}",
49+
"statusbar": {
50+
"hide": true,
51+
},
4852
},
4953
"group": {
5054
"kind": "build",
51-
"isDefault": true
55+
"isDefault": true,
5256
},
5357
"presentation": {
58+
"clear": true,
5459
"echo": true,
55-
"reveal": "always",
5660
"focus": false,
5761
"panel": "dedicated",
62+
"reveal": "always",
5863
"showReuseMessage": true,
59-
"clear": true
60-
}
64+
},
65+
"type": "shell",
6166
},
6267
{
63-
"label": "Take screenshots",
68+
"label": "🧽🔦 Ruff",
69+
"dependsOrder": "sequence",
70+
"dependsOn": [
71+
"🧽 Ruff Formatter",
72+
"🔦 Ruff Linter",
73+
],
74+
"group": {
75+
"kind": "build",
76+
"isDefault": false,
77+
},
78+
"presentation": {
79+
"clear": true,
80+
"echo": true,
81+
"focus": false,
82+
"panel": "dedicated",
83+
"reveal": "always",
84+
"showReuseMessage": true,
85+
},
6486
"type": "shell",
65-
"command": "cmd",
87+
},
88+
{
89+
"label": "🔦 Pylint",
90+
"command": "${command:python.interpreterPath}",
6691
"args": [
67-
"/c",
68-
"take_screenshots.bat"
92+
"scripts/run_with_env.py",
93+
"${command:python.interpreterPath}",
94+
"-m",
95+
"pylint",
96+
"qwt",
97+
// "--disable=R0801,C0103,C0114,C0115,C0116,W0612,W0613",
98+
"--disable=fixme,C,R,W",
6999
],
70100
"options": {
71-
"cwd": "scripts",
72-
"env": {
73-
"UNATTENDED": "1",
74-
"PYTHON": "${env:PPSTACK_PYTHONEXE}"
75-
}
101+
"cwd": "${workspaceFolder}",
76102
},
77103
"group": {
78104
"kind": "build",
79-
"isDefault": true
105+
"isDefault": true,
80106
},
81107
"presentation": {
108+
"clear": true,
82109
"echo": true,
83-
"reveal": "always",
84110
"focus": false,
85111
"panel": "dedicated",
112+
"reveal": "always",
86113
"showReuseMessage": true,
87-
"clear": true
88-
}
114+
},
115+
"type": "shell",
89116
},
90117
{
91-
"label": "Clean Up",
92-
"type": "shell",
93-
"command": "cmd",
118+
"label": "🚀 Pytest",
119+
"command": "${command:python.interpreterPath}",
94120
"args": [
95-
"/c",
96-
"clean_up.bat"
121+
"scripts/run_with_env.py",
122+
"${command:python.interpreterPath}",
123+
"-m",
124+
"pytest",
125+
"--ff",
97126
],
98127
"options": {
99-
"cwd": "scripts"
128+
"cwd": "${workspaceFolder}",
129+
"env": {
130+
"UNATTENDED": "1",
131+
},
100132
},
101133
"group": {
102134
"kind": "build",
103-
"isDefault": true
135+
"isDefault": true,
104136
},
105137
"presentation": {
106138
"echo": true,
107139
"reveal": "always",
108140
"focus": false,
109-
"panel": "shared",
141+
"panel": "dedicated",
110142
"showReuseMessage": true,
111-
"clear": false
112-
}
143+
"clear": true,
144+
},
145+
"type": "shell",
113146
},
114147
{
115-
"label": "Run Pylint",
148+
"label": "🧪 Coverage tests",
116149
"type": "shell",
117-
"command": "cmd",
150+
"command": "${command:python.interpreterPath}",
118151
"args": [
119-
"/c",
120-
"run_pylint.bat",
121-
// "--disable=R0801,C0103,C0114,C0115,C0116,W0612,W0613",
122-
"--disable=fixme,C,R,W",
152+
"scripts/run_with_env.py",
153+
"${command:python.interpreterPath}",
154+
"-m",
155+
"coverage",
156+
"run",
157+
"-m",
158+
"pytest",
159+
"qwt",
123160
],
124161
"options": {
125-
"cwd": "scripts",
162+
"cwd": "${workspaceFolder}",
126163
"env": {
127164
"UNATTENDED": "1",
128-
"PYTHON": "${env:PPSTACK_PYTHONEXE}"
129-
}
165+
},
166+
"statusbar": {
167+
"hide": true,
168+
},
169+
},
170+
"group": {
171+
"kind": "test",
172+
"isDefault": true,
173+
},
174+
"presentation": {
175+
"panel": "dedicated",
176+
},
177+
"problemMatcher": [],
178+
},
179+
{
180+
"label": "📊 Coverage full",
181+
"type": "shell",
182+
"windows": {
183+
"command": "${command:python.interpreterPath} -m coverage combine; if ($?) { ${command:python.interpreterPath} -m coverage html; if ($?) { start htmlcov\\index.html } }",
184+
},
185+
"linux": {
186+
"command": "${command:python.interpreterPath} -m coverage combine && ${command:python.interpreterPath} -m coverage html && xdg-open htmlcov/index.html",
187+
},
188+
"osx": {
189+
"command": "${command:python.interpreterPath} -m coverage combine && ${command:python.interpreterPath} -m coverage html && open htmlcov/index.html",
190+
},
191+
"options": {
192+
"cwd": "${workspaceFolder}",
193+
},
194+
"presentation": {
195+
"panel": "dedicated",
196+
},
197+
"problemMatcher": [],
198+
"dependsOrder": "sequence",
199+
"dependsOn": [
200+
"🧪 Coverage tests",
201+
],
202+
},
203+
{
204+
"label": "Take screenshots",
205+
"type": "shell",
206+
"command": "${command:python.interpreterPath}",
207+
"args": [
208+
"scripts/run_with_env.py",
209+
"${command:python.interpreterPath}",
210+
"scripts/take_screenshots.py",
211+
],
212+
"options": {
213+
"cwd": "${workspaceFolder}",
214+
"env": {
215+
"UNATTENDED": "1",
216+
},
130217
},
131218
"group": {
132219
"kind": "build",
133-
"isDefault": true
220+
"isDefault": true,
134221
},
135222
"presentation": {
136223
"echo": true,
137224
"reveal": "always",
138225
"focus": false,
139226
"panel": "dedicated",
140227
"showReuseMessage": true,
141-
"clear": true
142-
}
228+
"clear": true,
229+
},
143230
},
144231
{
145-
"label": "Run Ruff",
232+
"label": "Clean Up",
146233
"type": "shell",
147234
"command": "cmd",
148235
"args": [
149236
"/c",
150-
"run_ruff.bat",
237+
"clean_up.bat"
151238
],
152239
"options": {
153-
"cwd": "scripts",
154-
"env": {
155-
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
156-
"UNATTENDED": "1"
157-
}
240+
"cwd": "scripts"
158241
},
159242
"group": {
160243
"kind": "build",
@@ -164,9 +247,9 @@
164247
"echo": true,
165248
"reveal": "always",
166249
"focus": false,
167-
"panel": "dedicated",
250+
"panel": "shared",
168251
"showReuseMessage": true,
169-
"clear": true
252+
"clear": false
170253
}
171254
},
172255
{
@@ -176,7 +259,7 @@
176259
"options": {
177260
"cwd": "scripts",
178261
"env": {
179-
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
262+
"PYTHON": "${command:python.interpreterPath}",
180263
"UNATTENDED": "1"
181264
}
182265
},
@@ -205,7 +288,7 @@
205288
"options": {
206289
"cwd": "scripts",
207290
"env": {
208-
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
291+
"PYTHON": "${command:python.interpreterPath}",
209292
"UNATTENDED": "1"
210293
}
211294
},
@@ -238,7 +321,7 @@
238321
"options": {
239322
"cwd": "scripts",
240323
"env": {
241-
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
324+
"PYTHON": "${command:python.interpreterPath}",
242325
"UNATTENDED": "1"
243326
}
244327
},
@@ -261,4 +344,4 @@
261344
},
262345
},
263346
]
264-
}
347+
}

0 commit comments

Comments
 (0)