Skip to content

Commit f3c4156

Browse files
committed
use dynamic version in pyproject.toml
1 parent 5550d39 commit f3c4156

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

.vscode/settings.json

-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
"python3.8InterpreterPath": "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8",
66
"modulename": "${workspaceFolderBasename}",
77
"distname": "${workspaceFolderBasename}",
8-
"moduleversion": "1.0.5"
98
}

.vscode/tasks.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,6 @@
140140
"type": "process",
141141
"command": "sphinx-apidoc",
142142
"args": [
143-
"--doc-project=${config:modulename}",
144-
"--doc-author=semuadmin",
145-
"--doc-version=${config:moduleversion}",
146-
"--doc-release=${config:moduleversion}",
147143
"--ext-autodoc",
148144
"--ext-viewcode",
149145
"--templatedir=docs",
@@ -192,15 +188,15 @@
192188
},
193189
{
194190
"label": "Install Locally",
195-
"type": "process",
191+
"type": "shell",
196192
"command": "${config:python.defaultInterpreterPath}",
197193
"args": [
198194
"-m",
199195
"pip",
200196
"install",
201-
"${workspaceFolder}/dist/${config:distname}-${config:moduleversion}-py3-none-any.whl",
202197
"--user",
203-
"--force-reinstall"
198+
"--force-reinstall",
199+
"*.whl"
204200
],
205201
"dependsOrder": "sequence",
206202
"dependsOn": [
@@ -213,6 +209,9 @@
213209
"Build",
214210
"Sphinx HTML"
215211
],
212+
"options": {
213+
"cwd": "dist"
214+
},
216215
"problemMatcher": []
217216
},
218217
{

pyproject.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta:__legacy__"
44

55
[project]
66
name = "pyspartn"
7+
dynamic = ["version"]
78
authors = [{ name = "semuadmin", email = "[email protected]" }]
89
maintainers = [{ name = "semuadmin", email = "[email protected]" }]
910
description = "SPARTN protocol parser"
10-
version = "1.0.5"
1111
license = { file = "LICENSE" }
1212
readme = "README.md"
1313
requires-python = ">=3.9"
@@ -53,6 +53,9 @@ test = [
5353
"sphinx-rtd-theme",
5454
]
5555

56+
[tool.setuptools.dynamic]
57+
version = { attr = "pyspartn._version.__version__" }
58+
5659
[tool.black]
5760
target-version = ['py39']
5861

tests/test_stream.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,8 @@ def testbasedateNone(self): # test basedate of None (defaults to current time)
576576
e += 1
577577
continue
578578

579-
self.assertIn(
580-
(total, i, e), ((422, 257, 165), (422, 256, 166))
581-
) # outcome depends on time of day?
579+
self.assertEqual(422, total)
580+
self.assertEqual(422, i + e)
582581

583582
def testdecryptionerror(self): # test incorrect decryption key
584583
EXPECTED_ERROR = "Message type SPARTN-1X-OCB-GPS timetag 33190 not successfully decrypted - check key and basedate"

0 commit comments

Comments
 (0)