forked from BulatovicBalsa/vscode-typhoon-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
573 lines (573 loc) · 17.8 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
{
"name": "vscode-typhoon-test",
"displayName": "Typhoon Test",
"description": "Typhoon test extension for VS Code",
"version": "0.1.0",
"engines": {
"vscode": "^1.85.0"
},
"icon": "images/logo.png",
"publisher": "Typhoon-HIL",
"repository": {
"type": "git",
"url": "https://github.com/typhoon-hil/vscode-typhoon-test-extension"
},
"categories": [
"Testing",
"Snippets",
"Other"
],
"license": "LGPL-3.0",
"activationEvents": [
"onLanguage:python"
],
"main": "./dist/extension",
"contributes": {
"submenus": [
{
"id": "typhoon-test-submenu",
"label": "Typhoon Test"
}
],
"keybindings": [
{
"command": "typhoon-test.runTests",
"key": "F7",
"when": "!typhoon-test.isRunning && workspaceFolderCount > 0"
},
{
"command": "typhoon-test.stopTests",
"key": "F8",
"when": "typhoon-test.isRunning"
},
{
"command": "typhoon-test.runTestsFromFile",
"key": "Shift+F7",
"when": "!typhoon-test.isRunning && workspaceFolderCount > 0"
}
],
"configuration": {
"title": "Typhoon Test",
"properties": {
"typhoon-test.lineSpacing": {
"type": "integer",
"default": 2,
"minimum": 1,
"description": "The number of blank lines to insert between top-level functions and classes"
},
"typhoon-test.apiWizardWorkspace": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"required": true
},
"type": {
"type": "string",
"enum": [
"class",
"module"
],
"required": true
},
"alias": {
"type": "string",
"required": true
}
},
"default": {},
"description": "The module and class to display in the API wizard"
}
},
"typhoon-test.testRun.interpreter": {
"type": "string",
"enum": [
"embedded",
"system",
"custom"
],
"default": "embedded",
"enumDescriptions": [
"Use embedded (Python 3) interpreter",
"Use the system Python interpreter",
"Use a custom Python interpreter"
],
"markdownDescription": "The Python interpreter to use for running tests\n\nNote: In order to use the custom interpreter, you need to set the path to the interpreter in the `#typhoon-test.testRun.customInterpreterPath#`",
"scope": "application"
},
"typhoon-test.testRun.customInterpreterPath": {
"type": "string",
"default": "",
"markdownDescription": "The path to the custom Python interpreter to use for running tests. This path will be used if `#typhoon-test.testRun.interpreter#` is set to `custom`.\n\nYou can enter the path manually or [browse for the file](command:typhoon-test.pickInterpreterPath)",
"scope": "application"
},
"typhoon-test.testRun.realTimeLogs": {
"type": "boolean",
"default": true,
"description": "Enable real-time logging of steps in console",
"scope": "application"
},
"typhoon-test.testRun.openReport": {
"type": "boolean",
"default": true,
"description": "Open interactive Allure report after test finishes",
"scope": "application"
},
"typhoon-test.testRun.cleanOldResults": {
"type": "boolean",
"default": true,
"description": "Clean old test results before running new tests",
"scope": "application"
},
"typhoon-test.testRun.pdfReport": {
"type": "boolean",
"default": true,
"description": "Generate PDF report after test finishes",
"scope": "application"
},
"typhoon-test.testRun.selectTestByName": {
"type": "string",
"default": "",
"description": "Select based on name (full or partial match). Equivalent to -k pytest option",
"scope": "application"
},
"typhoon-test.testRun.selectTestByMark": {
"type": "string",
"default": "",
"description": "Select based on marks/tags. Equivalent to -m pytest option",
"scope": "application"
},
"typhoon-test.testRun.additionalOptions": {
"type": "string",
"default": "",
"description": "Pass additional options to pytest",
"scope": "application"
},
"typhoon-test.pdfConfiguration.pdfCoverageTitle": {
"type": "string",
"default": "Typhoon HIL Test Coverage",
"description": "The title of the coverage section in the PDF report"
},
"typhoon-test.pdfConfiguration.organizationalMotto": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"**Test**",
"**_Design_**",
"_Deploy_"
]
},
"typhoon-test.pdfConfiguration.typhoonHilLogo": {
"type": "boolean",
"default": true,
"description": "Set Typhoon HIL logo in the PDF report"
},
"typhoon-test.pdfConfiguration.organizationalLogoFilepath": {
"type": "string",
"default": "",
"markdownDescription": "The path to the organizational logo to include in the PDF report\n\nYou can enter the path manually or [browse for the file](command:typhoon-test.pickOrganizationalLogoFilepath).\n\n Note: The `#typhoon-test.pdfConfiguration.typhoonHilLogo#` setting must be set to `false` in order to use this setting"
},
"typhoon-test.pdfConfiguration.headerColor": {
"type": "string",
"default": "#333333",
"format": "color-hex",
"description": "The color of the header text in the PDF report"
},
"typhoon-test.pdfConfiguration.trace": {
"type": "boolean",
"default": true,
"description": "Include trace in the report."
},
"typhoon-test.pdfConfiguration.steps": {
"type": "boolean",
"default": true,
"description": "Include steps in the report."
},
"typhoon-test.pdfConfiguration.plots": {
"type": "boolean",
"default": true,
"description": "Include plots in the report."
}
}
},
"commands": [
{
"command": "typhoon-test.showDocstringView",
"title": "Show Docstring",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.showArgumentsView",
"title": "Show Arguments View",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.handleTreeViewItemClicked",
"title": "Handle Tree View Item Clicked",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.addPythonEntity",
"title": "Add module to list",
"icon": "$(add)",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.removePythonEntity",
"title": "Remove module from list",
"icon": "$(remove)",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.saveApiWizardWorkspace",
"title": "Save API Wizard Workspace",
"icon": "$(save)",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.openTestRunConfiguration",
"title": "Open Test Run Configuration",
"category": "Typhoon Test",
"icon": "$(gear)"
},
{
"command": "typhoon-test.openPdfConfiguration",
"title": "Open PDF Configuration",
"category": "Typhoon Test",
"icon": "$(gear)"
},
{
"command": "typhoon-test.pickInterpreterPath",
"title": "Select File Path",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.runTests",
"title": "Run Tests",
"icon": "$(debug-start)",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.stopTests",
"title": "Stop Tests",
"icon": "$(debug-stop)",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.runTestsFromFile",
"title": "Run Tests From File",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.runTestsFromTestItem",
"title": "Run Tests From Here",
"category": "Typhoon Test",
"icon": "$(debug-start)"
},
{
"command": "typhoon-test.collectTests",
"title": "Collect Tests",
"category": "Typhoon Test",
"icon": "$(list-flat)"
},
{
"command": "typhoon-test.collectTestsFromTestItem",
"title": "Collect Tests From Here",
"category": "Typhoon Test",
"icon": "$(list-flat)"
},
{
"command": "typhoon-test.pickOrganizationalLogoFilepath",
"title": "Select File Path",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.runTestsFromExplorer",
"title": "Run With Typhoon Test",
"category": "Typhoon Test"
},
{
"command": "typhoon-test.viewTestInCode",
"title": "View Test In Code",
"category": "Typhoon Test"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "api-wizard",
"title": "Typhoon API Wizard",
"icon": "images/api-wizard.svg"
},
{
"id": "pytestMonitor",
"title": "Typhoon Pytest Monitor",
"icon": "images/pytest-monitor.svg"
}
]
},
"views": {
"api-wizard": [
{
"id": "typhoon-test.pythonEntityView",
"name": "Function List"
},
{
"id": "typhoon-test.docstringView",
"name": "Function Documentation",
"type": "webview"
},
{
"id": "typhoon-test.argumentsView",
"name": "Function Arguments",
"type": "webview"
}
],
"pytestMonitor": [
{
"id": "typhoon-test.pytestMonitorView",
"name": "Pytest Monitor"
},
{
"id": "typhoon-test.pdfConfigurationView",
"name": "PDF Configuration",
"type": "webview"
},
{
"id": "typhoon-test.testRunConfigurationView",
"name": "Test Run Configuration",
"type": "webview"
}
]
},
"viewsWelcome": [
{
"view": "typhoon-test.pythonEntityView",
"contents": "Add a module or class to view its methods or functions"
},
{
"view": "typhoon-test.pytestMonitorView",
"contents": "Run pytest tests and monitor the progress. In order to use the Pytest Monitor, please open the tests folder in workspace \n [Run Tests](command:typhoon-test.runTests) \n [Collect Tests](command:typhoon-test.collectTests)",
"enablement": "workspaceFolderCount > 0"
}
],
"menus": {
"view/title": [
{
"command": "typhoon-test.addPythonEntity",
"when": "view == typhoon-test.pythonEntityView",
"group": "navigation"
},
{
"command": "typhoon-test.saveApiWizardWorkspace",
"when": "view == typhoon-test.pythonEntityView",
"group": "navigation"
},
{
"command": "typhoon-test.stopTests",
"when": "view == typhoon-test.pytestMonitorView && typhoon-test.isRunning",
"group": "navigation"
},
{
"command": "typhoon-test.runTests",
"when": "view == typhoon-test.pytestMonitorView && !typhoon-test.isRunning && workspaceFolderCount > 0",
"group": "navigation"
},
{
"command": "typhoon-test.collectTests",
"when": "view == typhoon-test.pytestMonitorView && !typhoon-test.isRunning && workspaceFolderCount > 0",
"group": "navigation"
},
{
"command": "typhoon-test.openTestRunConfiguration",
"when": "view == typhoon-test.testRunConfigurationView",
"group": "navigation"
},
{
"command": "typhoon-test.openPdfConfiguration",
"when": "view == typhoon-test.pdfConfigurationView",
"group": "navigation"
}
],
"view/item/context": [
{
"command": "typhoon-test.removePythonEntity",
"when": "view == typhoon-test.pythonEntityView && (viewItem == class || viewItem == module)",
"group": "inline"
},
{
"command": "typhoon-test.runTestsFromTestItem",
"when": "viewItem == testItem || viewItem == testItem.folder",
"group": "inline"
},
{
"command": "typhoon-test.collectTestsFromTestItem",
"when": "viewItem == testItem || viewItem == testItem.folder",
"group": "inline"
},
{
"command": "typhoon-test.runTestsFromTestItem",
"when": "viewItem == testItem || viewItem == testItem.folder",
"group": "navigation"
},
{
"command": "typhoon-test.collectTestsFromTestItem",
"when": "viewItem == testItem || viewItem == testItem.folder",
"group": "navigation"
},
{
"command": "typhoon-test.viewTestInCode",
"when": "viewItem == testItem",
"group": "navigation"
}
],
"commandPalette": [
{
"command": "typhoon-test.showDocstringView",
"when": "false"
},
{
"command": "typhoon-test.showArgumentsView",
"when": "false"
},
{
"command": "typhoon-test.handleTreeViewItemClicked",
"when": "false"
},
{
"command": "typhoon-test.removePythonEntity",
"when": "false"
},
{
"command": "typhoon-test.addPythonEntity",
"when": "view.typhoon-test.pythonEntityView.visible"
},
{
"command": "typhoon-test.saveApiWizardWorkspace",
"when": "view.typhoon-test.pythonEntityView.visible"
},
{
"command": "typhoon-test.pickOrganizationalLogoFilepath",
"when": "false"
},
{
"command": "typhoon-test.viewTestInCode",
"when": "false"
},
{
"command": "typhoon-test.collectTestsFromTestItem",
"when": "false"
},
{
"command": "typhoon-test.runTestsFromTestItem",
"when": "false"
},
{
"command": "typhoon-test.runTestsFromExplorer",
"when": "false"
},
{
"command": "typhoon-test.pickInterpreterPath",
"when": "false"
},
{
"command": "typhoon-test.stopTests",
"when": "typhoon-test.isRunning"
},
{
"command": "typhoon-test.runTestsFromFile",
"when": "editorLangId == python && workspaceFolderCount > 0 && !typhoon-test.isRunning"
},
{
"command": "typhoon-test.runTests",
"when": "workspaceFolderCount > 0 && !typhoon-test.isRunning"
}
],
"editor/title": [
{
"submenu": "typhoon-test-submenu",
"group": "Typhoon Test",
"when": "editorLangId == python"
}
],
"editor/context": [
{
"submenu": "typhoon-test-submenu",
"group": "Typhoon Test",
"when": "editorLangId == python"
}
],
"explorer/context": [
{
"command": "typhoon-test.runTestsFromExplorer",
"when": "resourceLangId == python || explorerResourceIsFolder || explorerResourceIsRoot",
"group": "typhoon-test-group"
}
],
"typhoon-test-submenu": [
{
"command": "typhoon-test.openTestRunConfiguration"
},
{
"command": "typhoon-test.openPdfConfiguration"
},
{
"command": "typhoon-test.runTests",
"when": "!typhoon-test.isRunning && workspaceFolderCount > 0"
},
{
"command": "typhoon-test.stopTests",
"when": "typhoon-test.isRunning"
},
{
"command": "typhoon-test.runTestsFromFile",
"when": "!typhoon-test.isRunning && workspaceFolderCount > 0"
}
],
"editor/title/run": [
{
"command": "typhoon-test.runTests",
"group": "navigation@1",
"when": "workspaceFolderCount > 0 && !typhoon-test.isRunning"
},
{
"command": "typhoon-test.runTestsFromFile",
"group": "navigation@1",
"when": "editorLangId == python && workspaceFolderCount > 0 && !typhoon-test.isRunning"
}
]
}
},
"scripts": {
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "vscode-test",
"compile": "webpack --mode development",
"watch": "webpack --mode development --watch",
"vscode:prepublish": "npm run package",
"package": "webpack --mode production --devtool hidden-source-map"
},
"devDependencies": {
"@types/mocha": "^10.0.7",
"@types/node": "20.x",
"@types/vscode": "^1.85.0",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.11.0",
"@vscode/test-cli": "^0.0.9",
"@vscode/test-electron": "^2.4.1",
"eslint": "^8.57.0",
"tree-sitter": "^0.21.0",
"tree-sitter-python": "^0.21.0",
"ts-loader": "^9.5.1",
"typescript": "^5.4.5",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"copy-webpack-plugin": "^12.0.2"
}
}