|
1 | 1 | { |
2 | 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 |
3 | 3 | // for the documentation about the tasks.json format |
4 | | - // Use the Install Deploy Dependencies tasks to install the necessary toolchain. |
| 4 | + // |
| 5 | + // This VSCode development workflow is intended to work on |
| 6 | + // MacOS, Linux and Windows (with Powershell>=5.1). |
| 7 | + // |
| 8 | + // Use the Install Deploy Dependencies tasks to install the necessary |
| 9 | + // build and test packages into the system environment. |
| 10 | + // |
| 11 | + // Use the Create Venv task to create a virtual environment in the |
| 12 | + // designated directory. Select this environment using Select |
| 13 | + // Interpreter to auto-activate it via New Terminal. |
| 14 | + // |
| 15 | + // Remember to include any global Python bin (Scripts on Windows) in PATH. |
5 | 16 | "version": "2.0.0", |
6 | 17 | "tasks": [ |
| 18 | + { |
| 19 | + "label": "Create Venv", |
| 20 | + "type": "process", |
| 21 | + "command": "${config:python.defaultInterpreterPath}", |
| 22 | + "args": [ |
| 23 | + "-m", |
| 24 | + "venv", |
| 25 | + "${config:venv}", |
| 26 | + //"--system-site-packages" |
| 27 | + ], |
| 28 | + "problemMatcher": [] |
| 29 | + }, |
| 30 | + { |
| 31 | + "label": "Run Local Version", |
| 32 | + "type": "process", |
| 33 | + "command": "${config:python.defaultInterpreterPath}", |
| 34 | + "args": [ |
| 35 | + "-m", |
| 36 | + "pygpsclient", |
| 37 | + "--ntripcasteruser", |
| 38 | + "semuadmin", |
| 39 | + "--ntripcasterpassword", |
| 40 | + "testpassword", |
| 41 | + "--verbosity", |
| 42 | + "3" |
| 43 | + ], |
| 44 | + "options": { |
| 45 | + "cwd": "src" |
| 46 | + }, |
| 47 | + "problemMatcher": [] |
| 48 | + }, |
7 | 49 | { |
8 | 50 | "label": "Install Deploy Dependencies", |
9 | 51 | "type": "process", |
|
30 | 72 | "${config:modulename}.egg-info", |
31 | 73 | ], |
32 | 74 | "windows": { |
33 | | - "command": "Get-ChildItem", |
| 75 | + "command": "rm", |
34 | 76 | "args": [ |
| 77 | + "-R", |
35 | 78 | "-Path", |
36 | | - "build\\,", |
37 | | - "dist\\,", |
38 | | - "htmlcov\\,", |
39 | | - "docs\\_build,", |
40 | | - "${config:modulename}.egg-info", |
41 | | - "-Recurse", |
42 | | - "|", |
43 | | - "Remove-Item", |
44 | | - "-Recurse", |
45 | | - "-Confirm:$false", |
46 | | - "-Force", |
47 | | - ], |
| 79 | + "'src/${config:modulename}.egg-info','build','dist','htmlcov','docs/_build'", |
| 80 | + "-ErrorAction", |
| 81 | + "SilentlyContinue" // doesn't work! - stops on exit code 1 anyway |
| 82 | + ] |
48 | 83 | }, |
49 | 84 | "options": { |
50 | 85 | "cwd": "${workspaceFolder}" |
|
101 | 136 | "problemMatcher": [] |
102 | 137 | }, |
103 | 138 | { |
104 | | - "label": "Build", |
| 139 | + "label": "Test", |
105 | 140 | "type": "process", |
106 | 141 | "command": "${config:python.defaultInterpreterPath}", |
107 | 142 | "args": [ |
108 | 143 | "-m", |
109 | | - "build", |
110 | | - ".", |
111 | | - "--wheel", |
112 | | - "--sdist", |
| 144 | + "pytest" |
113 | 145 | ], |
114 | | - "problemMatcher": [] |
| 146 | + "problemMatcher": [], |
| 147 | + "group": { |
| 148 | + "kind": "test", |
| 149 | + "isDefault": true |
| 150 | + } |
115 | 151 | }, |
116 | 152 | { |
117 | | - "label": "Test", |
| 153 | + "label": "Build", |
118 | 154 | "type": "process", |
119 | 155 | "command": "${config:python.defaultInterpreterPath}", |
120 | 156 | "args": [ |
121 | 157 | "-m", |
122 | | - "pytest", |
| 158 | + "build", |
| 159 | + ".", |
| 160 | + "--wheel", |
| 161 | + "--sdist", |
123 | 162 | ], |
124 | | - "problemMatcher": [] |
| 163 | + "problemMatcher": [], |
| 164 | + "dependsOrder": "sequence", |
| 165 | + "dependsOn": [ |
| 166 | + "Clean", |
| 167 | + "Security", |
| 168 | + "Sort Imports", |
| 169 | + "Format", |
| 170 | + "Pylint", |
| 171 | + "Test", |
| 172 | + ], |
| 173 | + "group": { |
| 174 | + "kind": "build", |
| 175 | + "isDefault": true |
| 176 | + } |
125 | 177 | }, |
126 | 178 | { |
127 | 179 | "label": "Sphinx", |
|
176 | 228 | }, |
177 | 229 | { |
178 | 230 | "label": "Install Locally", |
179 | | - "type": "shell", |
| 231 | + "type": "process", |
180 | 232 | "command": "${config:python.defaultInterpreterPath}", |
181 | 233 | "args": [ |
182 | 234 | "-m", |
183 | 235 | "pip", |
184 | 236 | "install", |
185 | | - "--user", |
| 237 | + "--upgrade", |
186 | 238 | "--force-reinstall", |
187 | | - "*.whl" |
| 239 | + "--find-links=${workspaceFolder}/dist", |
| 240 | + "${workspaceFolderBasename}", |
| 241 | + // "--target", |
| 242 | + // "${config:venv}/Lib/site-packages" |
188 | 243 | ], |
| 244 | + "options": { |
| 245 | + "cwd": "dist" |
| 246 | + }, |
189 | 247 | "dependsOrder": "sequence", |
190 | 248 | "dependsOn": [ |
191 | | - "Clean", |
192 | | - "Security", |
193 | | - "Sort Imports", |
194 | | - "Format", |
195 | | - "Pylint", |
196 | | - "Test", |
197 | 249 | "Build", |
198 | 250 | "Sphinx HTML" |
199 | 251 | ], |
200 | | - "options": { |
201 | | - "cwd": "dist" |
202 | | - }, |
203 | 252 | "problemMatcher": [] |
204 | 253 | }, |
205 | 254 | { |
|
0 commit comments