11{
22 // See https://go.microsoft.com/fwlink/?LinkId=733558
33 // for the documentation about the tasks.json format
4- // Use the Install Deploy Dependencies task to install the necessary packages.
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.
516 "version" : " 2.0.0" ,
617 "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+ },
749 {
850 "label" : " Install Deploy Dependencies" ,
951 "type" : " process" ,
1355 " pip" ,
1456 " install" ,
1557 " --group" ,
16- " deploy" ,
58+ " deploy"
1759 ],
1860 "problemMatcher" : []
1961 },
3072 " ${config:modulename}.egg-info" ,
3173 ],
3274 "windows" : {
33- "command" : " Get-ChildItem " ,
75+ "command" : " rm " ,
3476 "args" : [
77+ " -R" ,
3578 " -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+ ]
4883 },
4984 "options" : {
5085 "cwd" : " ${workspaceFolder}"
101136 "problemMatcher" : []
102137 },
103138 {
104- "label" : " Build " ,
139+ "label" : " Test " ,
105140 "type" : " process" ,
106141 "command" : " ${config:python.defaultInterpreterPath}" ,
107142 "args" : [
108143 " -m" ,
109- " build" ,
110- " ." ,
111- " --wheel" ,
112- " --sdist"
144+ " pytest"
113145 ],
114- "problemMatcher" : []
146+ "problemMatcher" : [],
147+ "group" : {
148+ "kind" : " test" ,
149+ "isDefault" : true
150+ }
115151 },
116152 {
117- "label" : " Test " ,
153+ "label" : " Build " ,
118154 "type" : " process" ,
119155 "command" : " ${config:python.defaultInterpreterPath}" ,
120156 "args" : [
121157 " -m" ,
122- " pytest" ,
158+ " build" ,
159+ " ." ,
160+ " --wheel" ,
161+ " --sdist" ,
123162 ],
124- "problemMatcher" : []
125- } ,
126- {
127- "label" : " Test3.8 " ,
128- "type" : " process " ,
129- "command" : " ${config:python3.8InterpreterPath} " ,
130- "args" : [
131- " -m " ,
132- " pytest " ,
163+ "problemMatcher" : [],
164+ "dependsOrder" : " sequence " ,
165+ "dependsOn" : [
166+ " Clean " ,
167+ " Security " ,
168+ " Sort Imports " ,
169+ " Format " ,
170+ " Pylint " ,
171+ " Test " ,
133172 ],
134- "problemMatcher" : []
173+ "group" : {
174+ "kind" : " build" ,
175+ "isDefault" : true
176+ }
135177 },
136178 {
137179 "label" : " Sphinx" ,
186228 },
187229 {
188230 "label" : " Install Locally" ,
189- "type" : " shell " ,
231+ "type" : " process " ,
190232 "command" : " ${config:python.defaultInterpreterPath}" ,
191233 "args" : [
192234 " -m" ,
193235 " pip" ,
194236 " install" ,
195- " --user " ,
237+ " --upgrade " ,
196238 " --force-reinstall" ,
197- " *.whl"
239+ " --find-links=${workspaceFolder}/dist" ,
240+ " ${workspaceFolderBasename}" ,
241+ // "--target",
242+ // "${config:venv}/Lib/site-packages"
198243 ],
244+ "options" : {
245+ "cwd" : " dist"
246+ },
199247 "dependsOrder" : " sequence" ,
200248 "dependsOn" : [
201- " Clean" ,
202- //"InstallCryptography",
203- " Security" ,
204- " Sort Imports" ,
205- " Format" ,
206- " Pylint" ,
207- " Test" ,
208249 " Build" ,
209250 " Sphinx HTML"
210251 ],
211- "options" : {
212- "cwd" : " dist"
213- },
214252 "problemMatcher" : []
215253 },
216254 {
222260 ],
223261 "problemMatcher" : []
224262 },
225- {
226- "label" : " InstallCryptography" ,
227- "type" : " process" ,
228- "command" : " ${config:python.defaultInterpreterPath}" ,
229- "args" : [
230- " -m" ,
231- " pip" ,
232- " install" ,
233- " --upgrade" ,
234- " cryptography"
235- ],
236- "problemMatcher" : []
237- },
238263 ]
239264}
0 commit comments