Skip to content

Commit 4ebc6b4

Browse files
committed
update tasks
1 parent 65ec525 commit 4ebc6b4

File tree

4 files changed

+89
-40
lines changed

4 files changed

+89
-40
lines changed

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2+
"python.testing.unittestEnabled": false,
23
"python.testing.pytestEnabled": true,
34
"python.terminal.activateEnvironment": true,
45
"editor.formatOnSave": true,
56
"modulename": "${workspaceFolderBasename}",
67
"distname": "${workspaceFolderBasename}",
7-
//"venv": "${env:UserProfile}/pygpsclient",
88
"venv": "${env:HOME}/pygpsclient",
99
"python.testing.pytestArgs": [
1010
"tests"
@@ -15,4 +15,7 @@
1515
"chat.notifyWindowOnConfirmation": false,
1616
"telemetry.feedback.enabled": false,
1717
"python.analysis.addHoverSummaries": false,
18+
"python-envs.defaultEnvManager": "ms-python.python:venv",
19+
"python-envs.pythonProjects": [],
20+
"python.defaultInterpreterPath": "/Users/steve/pygpsclient/bin/python3",
1821
}

.vscode/tasks.json

Lines changed: 84 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,51 @@
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 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.
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",
@@ -30,21 +72,14 @@
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}"
@@ -101,27 +136,44 @@
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": []
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+
}
125177
},
126178
{
127179
"label": "Sphinx",
@@ -176,30 +228,27 @@
176228
},
177229
{
178230
"label": "Install Locally",
179-
"type": "shell",
231+
"type": "process",
180232
"command": "${config:python.defaultInterpreterPath}",
181233
"args": [
182234
"-m",
183235
"pip",
184236
"install",
185-
"--user",
237+
"--upgrade",
186238
"--force-reinstall",
187-
"*.whl"
239+
"--find-links=${workspaceFolder}/dist",
240+
"${workspaceFolderBasename}",
241+
// "--target",
242+
// "${config:venv}/Lib/site-packages"
188243
],
244+
"options": {
245+
"cwd": "dist"
246+
},
189247
"dependsOrder": "sequence",
190248
"dependsOn": [
191-
"Clean",
192-
"Security",
193-
"Sort Imports",
194-
"Format",
195-
"Pylint",
196-
"Test",
197249
"Build",
198250
"Sphinx HTML"
199251
],
200-
"options": {
201-
"cwd": "dist"
202-
},
203252
"problemMatcher": []
204253
},
205254
{

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License ("BSD License 2.0", "Revised BSD License", "New BSD License", or "Modified BSD License")
22

3-
Copyright (c) 2022, SEMU Consulting
3+
Copyright (c) 2020, semuadmin (Steve Smith)
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

MANIFEST.in

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)