-
Notifications
You must be signed in to change notification settings - Fork 178
/
pyproject.toml
233 lines (212 loc) · 5.71 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
[build-system]
# Minimum requirements for the build system to execute.
requires = [
"setuptools>=47.2.0",
"wheel",
"setuptools_scm[toml]",
]
build-backend = "setuptools.build_meta"
[project]
name = "labgrid"
authors = [
{ name="Rouven Czerwinski", email="[email protected]" },
{ name="Jan Luebbe", email="[email protected]" },
]
description = "embedded systems control library for development, testing and installation"
readme = "README.rst"
license = { file="LICENSE" }
requires-python = ">=3.9"
classifiers = [
"Intended Audience :: Developers",
"Development Status :: 5 - Production/Stable",
"Operating System :: POSIX :: Linux",
"Topic :: Software Development :: Testing",
"Framework :: Pytest",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
]
dependencies = [
"ansicolors>=1.1.8",
"attrs>=21.4.0",
"grpcio>=1.64.1, <2.0.0",
"grpcio-reflection>=1.64.1, <2.0.0",
"protobuf>=5.27.0",
"jinja2>=3.0.2",
"pexpect>=4.8.0",
"pyserial-labgrid>=3.4.0.1",
"pytest>=7.0.0",
"pyudev>=0.22.0",
"pyusb>=1.2.1",
"PyYAML>=6.0.1",
"requests>=2.26.0",
"xmodem>=0.4.6",
]
dynamic = ["version"] # via setuptools_scm
[project.urls]
"Homepage" = "https://github.com/labgrid-project/labgrid"
"Bug Tracker" = "https://github.com/labgrid-project/labgrid/issues"
[project.optional-dependencies]
doc = [
"sphinx_rtd_theme>=1.0.0",
"Sphinx>=2.0.0",
]
docker = ["docker>=5.0.2"]
graph = ["graphviz>=0.17.0"]
kasa = ["python-kasa>=0.4.0"]
modbus = ["pyModbusTCP>=0.2.0"]
modbusrtu = ["minimalmodbus>=1.0.2"]
mqtt = ["paho-mqtt>=2.0.0"]
onewire = ["onewire>=0.2"]
pyvisa = [
"pyvisa>=1.11.3",
"PyVISA-py>=0.5.2",
]
snmp = [
"pysnmp>=4.4.12, <6",
"pyasn1<0.6.1",
]
vxi11 = ["python-vxi11>=0.9"]
xena = ["xenavalkyrie>=3.0.1"]
deb = ["labgrid[modbus,onewire,snmp]"]
dev = [
"labgrid[doc,docker,graph,kasa,modbus,modbusrtu,mqtt,onewire,pyvisa,snmp,vxi11]",
# additional dev dependencies
"psutil>=5.8.0",
"pytest-benchmark>=4.0.0",
"pytest-cov>=3.0.0",
"pytest-dependency>=0.5.1",
"pytest-isort>=2.0.0",
"pytest-mock>=3.6.1",
"pylint>=3.0.0",
"ruff>=0.5.7",
# GRPC Channelz support
"grpcio-channelz>=1.64.1, <2.0.0",
]
[project.scripts]
labgrid-autoinstall = "labgrid.autoinstall.main:main"
labgrid-client = "labgrid.remote.client:main"
labgrid-exporter = "labgrid.remote.exporter:main"
labgrid-suggest = "labgrid.resource.suggest:main"
labgrid-coordinator = "labgrid.remote.coordinator:main"
# the following makes a plugin available to pytest
[project.entry-points.pytest11]
labgrid = "labgrid.pytestplugin"
[tool.setuptools]
packages = [
"labgrid",
"labgrid.autoinstall",
"labgrid.driver",
"labgrid.driver.power",
"labgrid.driver.usbtmc",
"labgrid.protocol",
"labgrid.pytestplugin",
"labgrid.remote",
"labgrid.remote.generated",
"labgrid.resource",
"labgrid.strategy",
"labgrid.util",
"labgrid.util.agents",
]
[tool.setuptools_scm]
local_scheme = "no-local-version"
version_file = "labgrid/_version.py"
[tool.pytest.ini_options]
testpaths = [
"tests",
"labgrid",
]
addopts = "-p no:labgrid"
[tool.pylint.imports]
ignored-modules = ["gi"]
[tool.pylint."messages control"]
# disable all, then enable explicitly
disable = ["all"]
enable = [
"F", # all checks from fatal category
"E", # all checks from error category
# warning checks (sorted alphabetically)
'deprecated-argument',
'deprecated-class',
'deprecated-decorator',
'deprecated-method',
'deprecated-module',
'duplicate-key',
'expression-not-assigned',
'f-string-without-interpolation',
'import-self',
'keyword-arg-before-vararg',
'logging-format-interpolation',
'logging-fstring-interpolation',
'logging-not-lazy',
'pointless-statement',
'pointless-string-statement',
'redefined-builtin',
'redefined-outer-name',
'reimported',
'unknown-option-value',
'unnecessary-semicolon',
'unreachable',
'unused-import',
'unused-variable',
'useless-else-on-loop',
'using-constant-test',
'wildcard-import',
# convention checks (sorted alphabetically)
"wrong-import-order",
# refactor checks (sorted alphabetically)
"redefined-argument-from-local",
]
[tool.pylint.typecheck]
generated-members = [
"labgrid.driver.*",
"labgrid.strategy.*",
"labgrid_coordinator_pb2",
]
signature-mutators = ["labgrid.step.step"]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py39, py310, py311, py312, py313
isolated_build = true
[testenv]
extras = dev
passenv = TERM
commands =
pytest tests {posargs} \
--cov={envsitepackagesdir}/labgrid \
--cov-report=html:htmlcov
[testenv:lint]
extras = dev
commands = pylint -f colorized labgrid
"""
[tool.ruff]
line-length = 119
extend-exclude = [
".pybuild",
"debian",
"env",
"envs",
"labgrid/remote/generated",
]
include = [
"**/pyproject.toml",
"examples/**/*.py",
"labgrid/driver/httpvideodriver.py",
"labgrid/driver/manualswitchdriver.py",
"labgrid/driver/power/gude8031.py",
"labgrid/driver/rawnetworkinterfacedriver.py",
"labgrid/protocol/**/*.py",
"labgrid/remote/**/*.py",
"labgrid/resource/httpvideostream.py",
"labgrid/resource/provider.py",
"labgrid/util/agents/network_interface.py",
"labgrid/util/agents/usb_hid_relay.py",
"labgrid/util/exceptions.py",
]
[tool.ruff.lint]
select = ["B", "E", "F", "I", "SIM", "UP"]