-
Notifications
You must be signed in to change notification settings - Fork 275
/
Copy pathpyproject.toml
165 lines (130 loc) · 4.17 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
[project]
name='NanoVNASaver'
description='GUI for the NanoVNA and derivates'
authors = [
{ name = "Rune B. Broberg", email = "NanoVNA-Saver@users.noreply.github.com" }
]
requires-python = ">=3.10"
license = {text = "GPL-3.0-or-later"}
readme = "README.rst"
classifiers =[
'Development Status :: 4 - Beta',
'Topic :: Communications :: Ham Radio' ,
'Intended Audience :: Science/Research',
'Intended Audience :: Science/Research',
'Intended Audience :: Telecommunications Industry',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
]
keywords = ["Communications", "Ham Radio", "nanovna"]
dynamic=['version']
dependencies=[
'pyserial~=3.5',
'pyside6~=6.8',
'numpy~=2.1',
'scipy~=1.14',
]
[dependency-groups]
dev = [
# Static Code Analysis tools
"ruff~=0.9",
"pre-commit~=4.1",
"mypy~=1.14",
"pylint~=3.3",
# Testing
"pytest~=8.3",
"pytest-cov~=6.0",
"tox~=4.23",
"tox-uv~=1.17",
# Build helpers
"setuptools-scm>=8",
"taskipy~=1.14",
"pyinstaller~=6.11.1",
]
[project.urls]
homepage = "https://github.com/NanoVNA-Saver/nanovna-saver"
repository = "https://github.com/NanoVNA-Saver/nanovna-saver"
Issues = "https://github.com/NanoVNA-Saver/nanovna-saver/issues"
[project.scripts]
NanoVNASaver = 'NanoVNASaver.__main__:main'
[project.gui-scripts]
NanoVNASaver-gui = 'NanoVNASaver.__main__:main'
[build-system]
requires = [
"setuptools>=64",
"setuptools-scm>=8"
]
# build-backend = 'setuptools.build_meta'
# in-tree build backend, wrapper around setuptools, just to run ui-compile task
# See also https://setuptools.pypa.io/en/latest/build_meta.html#dynamic-build-dependencies-and-other-build-meta-tweaks
build-backend = "setuptools_wrapper"
backend-path = ["src/tools"]
[tool.setuptools.exclude-package-data]
"*" = ['*.png', '*.ui', '*.qrc' ]
[tool.setuptools.packages.find]
# See https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html for more details
where = ["src"]
[tool.setuptools_scm]
# For smarter version schemes and other configuration options,
# check out https://github.com/pypa/setuptools_scm
root='.'
version_scheme = 'no-guess-dev'
[tool.taskipy.tasks]
test = "pytest ."
test-cov = "pytest --cov=src ."
test-full = "tox"
# TODO enable task lint-mypy when related issues are solved
#lint = "task lint-format || task lint-mypy"
lint = "task lint-format"
lint-format = "pre-commit run --all-files || pre-commit run --all-files"
lint-mypy = "mypy --non-interactive --install-types ."
clean = "python -m tools.project_clean"
ui-compile = "python -m tools.ui_compile"
ui-designer = "pyside6-designer"
build-pkg-win = "pyinstaller --onefile -p src -n nanovna-saver.exe src/NanoVNASaver/__main__.py --recursive-copy-metadata NanoVNASaver --noconsole -i NanoVNASaver_48x48.ico"
build-pkg-linux = "pyinstaller --onefile -p src -n nanovna-saver src/NanoVNASaver/__main__.py --recursive-copy-metadata NanoVNASaver"
build-pkg-macos = "pyinstaller --onedir -p src -n NanoVNASaver src/NanoVNASaver/__main__.py --recursive-copy-metadata NanoVNASaver --window --clean -y -i NanoVNASaver_48x48.icns && tar -C dist -zcf ./dist/NanoVNASaver.app-`uname -m`.tar.gz NanoVNASaver.app"
[tool.pytest.ini_options]
pythonpath = [
'.', 'src',
]
[tool.ruff]
line-length = 80
target-version = 'py311'
fix = true
show-fixes = true
unsafe-fixes = false
# TODO use https://docs.astral.sh/ruff/configuration/#config-file-discovery for test and UI generated files
extend-exclude = ["ui/*.py"]
[tool.ruff.lint]
# https://docs.astral.sh/ruff/rules
select = [
'E', 'W', # pycodestyle (E(rror), W(arning))
'F', # Pyflakes
'B', # flake8-bugbear
'I', # isort
'N', # pep8-naming
'PL', # pylint
'C', # mccabe
'RUF', # Ruff
]
ignore = [
'PLR2004',
'N802',
'N806',
'N813',
# TODO fix module naming
'N999',
# TODO fix classes naming
'N801',
# TODO review related code
'C901',
'PLR0915',
'PLR0911',
'PLR0912'
]
[tool.ruff.lint.mccabe]
max-complexity = 10