|
2 | 2 | "version": "2.0.0",
|
3 | 3 | "tasks": [
|
4 | 4 | {
|
5 |
| - "label": "Lint :: Fix Python Linting Errors", |
| 5 | + "label": "Backend :: Install", |
6 | 6 | "type": "shell",
|
7 |
| - "command": "ruff check --fix", |
| 7 | + "command": "uv", |
| 8 | + "args": [ |
| 9 | + "sync", |
| 10 | + "--extra using-$(echo ${COMPUTE_DEVICE:-cpu})", |
| 11 | + "--extra dev", |
| 12 | + "--extra test", |
| 13 | + "--extra docs" |
| 14 | + ], |
8 | 15 | "group": {
|
9 | 16 | "kind": "build",
|
10 | 17 | "isDefault": false
|
11 | 18 | },
|
12 | 19 | "presentation": {
|
13 |
| - "group": "build", |
14 |
| - "echo": true |
| 20 | + "group": "install" |
15 | 21 | }
|
16 | 22 | },
|
17 | 23 | {
|
18 |
| - "label": "Lint :: Fix TypeScript Linting Errors", |
| 24 | + "label": "Backend :: Linting :: Scan All", |
19 | 25 | "type": "shell",
|
20 |
| - "command": "pnpm fix", |
21 |
| - "options": { |
22 |
| - "cwd": "${workspaceFolder}/invokeai/frontend/web/" |
| 26 | + "command": "ruff check", |
| 27 | + "group": { |
| 28 | + "kind": "build", |
| 29 | + "isDefault": false |
23 | 30 | },
|
| 31 | + "presentation": { |
| 32 | + "group": "backend" |
| 33 | + } |
| 34 | + }, |
| 35 | + { |
| 36 | + "label": "Backend :: Linting :: Fix All", |
| 37 | + "type": "shell", |
| 38 | + "command": "ruff check --fix", |
24 | 39 | "group": {
|
25 | 40 | "kind": "build",
|
26 | 41 | "isDefault": false
|
27 | 42 | },
|
28 | 43 | "presentation": {
|
29 |
| - "group": "build", |
30 |
| - "echo": true |
| 44 | + "group": "backend" |
31 | 45 | }
|
32 | 46 | },
|
33 | 47 | {
|
34 |
| - "label": "Test :: Backend", |
| 48 | + "label": "Backend :: Linting :: Format All", |
| 49 | + "type": "shell", |
| 50 | + "command": "ruff format", |
| 51 | + "group": { |
| 52 | + "kind": "build", |
| 53 | + "isDefault": false |
| 54 | + }, |
| 55 | + "presentation": { |
| 56 | + "group": "backend" |
| 57 | + } |
| 58 | + }, |
| 59 | + { |
| 60 | + "label": "Backend :: Testing :: Unit Tests", |
35 | 61 | "type": "shell",
|
36 | 62 | "command": "pytest",
|
37 | 63 | "args": [],
|
|
43 | 69 | "isDefault": false
|
44 | 70 | },
|
45 | 71 | "presentation": {
|
46 |
| - "echo": true, |
47 | 72 | "reveal": "always",
|
48 | 73 | "focus": true,
|
49 | 74 | "panel": "dedicated",
|
50 | 75 | "showReuseMessage": false,
|
51 | 76 | "clear": false,
|
52 |
| - "group": "test" |
| 77 | + "group": "backend" |
53 | 78 | }
|
54 | 79 | },
|
55 | 80 | {
|
56 |
| - "label": "Test :: Frontend", |
| 81 | + "label": "Frontend :: Install", |
57 | 82 | "type": "shell",
|
58 | 83 | "command": "pnpm",
|
59 |
| - "args": ["test"], |
| 84 | + "args": ["install", "--dir", "invokeai/frontend/web/"], |
| 85 | + "group": { |
| 86 | + "kind": "build", |
| 87 | + "isDefault": false |
| 88 | + }, |
| 89 | + "presentation": { |
| 90 | + "group": "install" |
| 91 | + } |
| 92 | + }, |
| 93 | + { |
| 94 | + "label": "Frontend :: Linting :: Scan All", |
| 95 | + "type": "shell", |
| 96 | + "command": "pnpm lint", |
60 | 97 | "options": {
|
61 | 98 | "cwd": "${workspaceFolder}/invokeai/frontend/web/"
|
62 | 99 | },
|
|
65 | 102 | "isDefault": false
|
66 | 103 | },
|
67 | 104 | "presentation": {
|
68 |
| - "echo": true, |
69 |
| - "reveal": "always", |
70 |
| - "focus": true, |
71 |
| - "panel": "dedicated", |
72 |
| - "showReuseMessage": false, |
73 |
| - "clear": false, |
74 |
| - "group": "test" |
| 105 | + "group": "frontend" |
75 | 106 | }
|
76 | 107 | },
|
77 | 108 | {
|
78 |
| - "label": "Install :: Backend", |
| 109 | + "label": "Frontend :: Linting :: Fix All", |
79 | 110 | "type": "shell",
|
80 |
| - "command": "uv", |
81 |
| - "args": [ |
82 |
| - "sync", |
83 |
| - "--inexact", |
84 |
| - "--all-extras", |
85 |
| - "--no-extra", |
86 |
| - "onnx-directml" |
87 |
| - ], |
| 111 | + "command": "pnpm fix", |
| 112 | + "options": { |
| 113 | + "cwd": "${workspaceFolder}/invokeai/frontend/web/" |
| 114 | + }, |
88 | 115 | "group": {
|
89 | 116 | "kind": "build",
|
90 | 117 | "isDefault": false
|
91 | 118 | },
|
92 | 119 | "presentation": {
|
93 |
| - "group": "install" |
| 120 | + "group": "frontend" |
94 | 121 | }
|
95 | 122 | },
|
96 | 123 | {
|
97 |
| - "label": "Install :: Frontend", |
| 124 | + "label": "Frontend :: Testing :: Unit Tests", |
98 | 125 | "type": "shell",
|
99 | 126 | "command": "pnpm",
|
100 |
| - "args": ["install", "--dir", "invokeai/frontend/web/"], |
| 127 | + "args": ["test"], |
| 128 | + "options": { |
| 129 | + "cwd": "${workspaceFolder}/invokeai/frontend/web/" |
| 130 | + }, |
101 | 131 | "group": {
|
102 | 132 | "kind": "build",
|
103 | 133 | "isDefault": false
|
104 | 134 | },
|
105 | 135 | "presentation": {
|
106 |
| - "group": "install" |
| 136 | + "group": "frontend" |
| 137 | + } |
| 138 | + }, |
| 139 | + { |
| 140 | + "label": "Tooling :: OpenAPI :: Generate Types", |
| 141 | + "dependsOn": ["tools/regenerate-openapi-definitions"], |
| 142 | + "type": "shell", |
| 143 | + "command": "pnpm typegen", |
| 144 | + "options": { |
| 145 | + "cwd": "${workspaceFolder}/invokeai/frontend/web" |
| 146 | + }, |
| 147 | + "group": { |
| 148 | + "kind": "build", |
| 149 | + "isDefault": false |
| 150 | + }, |
| 151 | + "presentation": { |
| 152 | + "group": "frontend" |
| 153 | + } |
| 154 | + }, |
| 155 | + { |
| 156 | + "label": "tools/regenerate-openapi-definitions", |
| 157 | + "type": "shell", |
| 158 | + "command": "python", |
| 159 | + "args": ["../../../scripts/generate_openapi_schema.py"], |
| 160 | + "options": { |
| 161 | + "cwd": "${workspaceFolder}/invokeai/frontend/web" |
| 162 | + }, |
| 163 | + "hide": true |
| 164 | + }, |
| 165 | + { |
| 166 | + "label": "Backend :: Testing :: Run Active File", |
| 167 | + "type": "process", |
| 168 | + "command": "pytest", |
| 169 | + "args": ["${file}"], |
| 170 | + "options": { |
| 171 | + "cwd": "${workspaceFolder}" |
| 172 | + }, |
| 173 | + "problemMatcher": "$python", |
| 174 | + "group": { |
| 175 | + "kind": "test", |
| 176 | + "isDefault": "**/tests/**.py" |
| 177 | + }, |
| 178 | + "presentation": { |
| 179 | + "focus": true, |
| 180 | + "clear": true, |
| 181 | + "panel": "dedicated" |
107 | 182 | }
|
108 | 183 | }
|
109 | 184 | ]
|
|
0 commit comments