Skip to content

Commit 5513cdc

Browse files
committed
update tasks
1 parent cf9cfc6 commit 5513cdc

File tree

5 files changed

+111
-72
lines changed

5 files changed

+111
-72
lines changed

.vscode/settings.json

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
{
2-
"python.testing.pytestEnabled": false,
3-
"python.testing.unittestEnabled": true,
2+
"python.testing.unittestEnabled": false,
3+
"python.testing.pytestEnabled": true,
4+
"python.terminal.activateEnvironment": true,
45
"editor.formatOnSave": true,
5-
"python3.8InterpreterPath": "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8",
66
"modulename": "${workspaceFolderBasename}",
77
"distname": "${workspaceFolderBasename}",
8+
"venv": "${env:HOME}/pygpsclient",
9+
"python.testing.pytestArgs": [
10+
"tests"
11+
],
12+
"C_Cpp.copilotHover": "disabled",
13+
"chat.agent.enabled": false,
14+
"chat.commandCenter.enabled": false,
15+
"chat.notifyWindowOnConfirmation": false,
16+
"telemetry.feedback.enabled": false,
17+
"python.analysis.addHoverSummaries": false,
18+
"python-envs.defaultEnvManager": "ms-python.python:venv",
19+
"python-envs.pythonProjects": [],
20+
"python.defaultInterpreterPath": "/Users/steve/pygpsclient/bin/python3",
821
}

.vscode/tasks.json

Lines changed: 84 additions & 59 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 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",
@@ -13,7 +55,7 @@
1355
"pip",
1456
"install",
1557
"--group",
16-
"deploy",
58+
"deploy"
1759
],
1860
"problemMatcher": []
1961
},
@@ -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,37 +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": []
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",
@@ -186,31 +228,27 @@
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
{
@@ -222,18 +260,5 @@
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
}

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) 2023, 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.

pyproject.toml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ dynamic = ["version"]
88
authors = [{ name = "Steve Smith", email = "[email protected]" }]
99
maintainers = [{ name = "Steve Smith", email = "[email protected]" }]
1010
description = "SPARTN protocol parser"
11-
license = { file = "LICENSE" }
11+
license = "BSD-3-Clause"
12+
license-files = ["LICENSE"]
1213
readme = "README.md"
1314
requires-python = ">=3.9"
1415
classifiers = [
@@ -28,7 +29,6 @@ classifiers = [
2829
"Programming Language :: Python :: 3.12",
2930
"Programming Language :: Python :: 3.13",
3031
"Programming Language :: Python :: 3.14",
31-
"License :: OSI Approved :: BSD License",
3232
"Topic :: Utilities",
3333
"Topic :: Software Development :: Libraries :: Python Modules",
3434
"Topic :: Scientific/Engineering :: GIS",
@@ -102,12 +102,16 @@ disable = """
102102
minversion = "7.0"
103103
addopts = "--cov --cov-report html --cov-fail-under 94"
104104
pythonpath = ["src"]
105+
testpaths = ["tests"]
105106

106107
[tool.coverage.run]
107108
source = ["src"]
108109

110+
[tool.coverage.paths]
111+
source = ["src"]
112+
109113
[tool.coverage.report]
110-
exclude_also = [
111-
# "if self.authInd > 1:", # no current test data
112-
# "if authInd > 1:", # no current test data
113-
]
114+
fail_under = 94
115+
116+
[tool.coverage.html]
117+
directory = "htmlcov"

0 commit comments

Comments
 (0)