-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
242 lines (223 loc) · 9.75 KB
/
Copy pathpyproject.toml
File metadata and controls
242 lines (223 loc) · 9.75 KB
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
234
235
236
237
238
239
240
241
242
[build-system]
requires = ["setuptools>=47.2.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "labgrid-plugins"
version = "0.1.0"
description = "labgrid plugin package for Analog Devices, Inc. (ADI) specific plugins."
readme = "README.md"
requires-python = ">=3.10"
authors = [
{name = "Analog Devices, Inc."},
]
dependencies = [
"labgrid>=25.0",
"pyvesync>=1.1.5,<3.0.0",
"tqdm",
"pysnmp",
"pylibiio",
"requests",
"click",
"rich",
"fastmcp",
"usbsdmux",
"pylibiio",
]
[project.optional-dependencies]
dev = [
"ruff>=0.8.0",
"ty",
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pylibiio",
"python-kasa>=0.7",
]
## Installed on hosts that actually need to unpack Kuiper disk images.
## Requires a C toolchain (pytsk3 ships only as an sdist).
kuiper = [
"pytsk3",
]
## Installed on hosts that drive TP-Link Kasa smart plugs / power strips.
kasa = [
"python-kasa>=0.7",
]
docs = [
"sphinx>=7.0.0",
"furo>=2024.0.0",
"sphinx-copybutton>=0.5.0",
"sphinx-design>=0.5.0",
"sphinxcontrib-mermaid",
]
[tool.setuptools.packages.find]
where = ["."]
include = ["adi_lg_plugins", "adi_lg_plugins.*"]
exclude = ["test*"]
namespaces = true
[tool.setuptools.package-data]
# Recovery initramfs templates (init script + udhcpc hook) are loaded via
# importlib.resources at runtime — must ship with the wheel.
"adi_lg_plugins.recovery.templates" = ["init", "udhcpc-default.script"]
# HW-CI v2 per-strategy env-yaml templates (loaded via importlib.resources).
"adi_lg_plugins.hw_ci.templates" = ["*.yaml"]
# Onboarding copy-paste templates (read via importlib.resources by `adi-lg-hw-ci init`).
"adi_lg_plugins.hw_ci.onboarding_templates" = ["*.yml", "*.yaml", "*.py", "*.md"]
[project.urls]
Homepage = "https://github.com/analogdevicesinc/labgrid-plugins"
Documentation = "https://labgrid-plugins.readthedocs.io/"
Repository = "https://github.com/analogdevicesinc/labgrid-plugins"
# Add entry point scripts for tools
# kuiperdl
[project.scripts]
kuiperdl = "adi_lg_plugins.tools.kuiperdl:main"
cloudsmithdl = "adi_lg_plugins.tools.cloudsmithdl:main"
adi-lg = "adi_lg_plugins.tools.cli:cli"
adi-lg-mcp = "adi_lg_plugins.tools.mcp:main"
adi-lg-hw-ci = "adi_lg_plugins.hw_ci.cli:main"
adi-lg-prism-upload = "adi_lg_plugins.hw_ci.prism_upload.upload_run:main"
# Entry points for plugin discovery
# Labgrid automatically discovers and registers these components
[project.entry-points."labgrid.drivers"]
apcpowerdriver = "adi_lg_plugins.drivers.apcpowerdriver:APCDriver"
APCDriver = "adi_lg_plugins.drivers.apcpowerdriver:APCDriver"
vesyncpowerdriver = "adi_lg_plugins.drivers.vesyncdriver:VesyncPowerDriver"
VesyncPowerDriver = "adi_lg_plugins.drivers.vesyncdriver:VesyncPowerDriver"
massstoragedriver = "adi_lg_plugins.drivers.massstoragedriver:MassStorageDriver"
MassStorageDriver = "adi_lg_plugins.drivers.massstoragedriver:MassStorageDriver"
adishelldriver = "adi_lg_plugins.drivers.shelldriver:ADIShellDriver"
ADIShellDriver = "adi_lg_plugins.drivers.shelldriver:ADIShellDriver"
kuiperdldriver = "adi_lg_plugins.drivers.kuiperdldriver:KuiperDLDriver"
KuiperDLDriver = "adi_lg_plugins.drivers.kuiperdldriver:KuiperDLDriver"
cloudsmithdldriver = "adi_lg_plugins.drivers.cloudsmithdldriver:CloudsmithDLDriver"
CloudsmithDLDriver = "adi_lg_plugins.drivers.cloudsmithdldriver:CloudsmithDLDriver"
cyberpowerdriver = "adi_lg_plugins.drivers.cyberpowerdriver:CyberPowerDriver"
CyberPowerDriver = "adi_lg_plugins.drivers.cyberpowerdriver:CyberPowerDriver"
xilinxjtagdriver = "adi_lg_plugins.drivers.xilinxjtagdriver:XilinxJTAGDriver"
XilinxJTAGDriver = "adi_lg_plugins.drivers.xilinxjtagdriver:XilinxJTAGDriver"
tftpserverdriver = "adi_lg_plugins.drivers.tftpserverdriver:TFTPServerDriver"
TFTPServerDriver = "adi_lg_plugins.drivers.tftpserverdriver:TFTPServerDriver"
softwareinstaller = "adi_lg_plugins.drivers.softwareinstaller:SoftwareInstallerDriver"
SoftwareInstallerDriver = "adi_lg_plugins.drivers.softwareinstaller:SoftwareInstallerDriver"
homeassistantdriver = "adi_lg_plugins.drivers.homeassistantdriver:HomeAssistantPowerDriver"
HomeAssistantPowerDriver = "adi_lg_plugins.drivers.homeassistantdriver:HomeAssistantPowerDriver"
tickfpgamanagerdriver = "adi_lg_plugins.drivers.tickfpgamanagerdriver:TickFpgaManagerDriver"
TickFpgaManagerDriver = "adi_lg_plugins.drivers.tickfpgamanagerdriver:TickFpgaManagerDriver"
tickmoduledriver = "adi_lg_plugins.drivers.tickmoduledriver:TickModuleDriver"
TickModuleDriver = "adi_lg_plugins.drivers.tickmoduledriver:TickModuleDriver"
tickoverlaydriver = "adi_lg_plugins.drivers.tickoverlaydriver:TickOverlayDriver"
TickOverlayDriver = "adi_lg_plugins.drivers.tickoverlaydriver:TickOverlayDriver"
kasapowerdriver = "adi_lg_plugins.drivers.kasadriver:KasaPowerDriver"
KasaPowerDriver = "adi_lg_plugins.drivers.kasadriver:KasaPowerDriver"
[project.entry-points."labgrid.resources"]
apcresource = "adi_lg_plugins.resources.apcpdu:APCOutlet"
APCOutlet = "adi_lg_plugins.resources.apcpdu:APCOutlet"
vesyncresource = "adi_lg_plugins.resources.vesync:VesyncOutlet"
VesyncOutlet = "adi_lg_plugins.resources.vesync:VesyncOutlet"
massstorageresource = "adi_lg_plugins.resources.massstorage:MassStorageDevice"
MassStorageDevice = "adi_lg_plugins.resources.massstorage:MassStorageDevice"
kuiperresource = "adi_lg_plugins.resources.kuiperrelease:KuiperRelease"
KuiperRelease = "adi_lg_plugins.resources.kuiperrelease:KuiperRelease"
cloudsmithresource = "adi_lg_plugins.resources.cloudsmithrelease:CloudsmithRelease"
CloudsmithRelease = "adi_lg_plugins.resources.cloudsmithrelease:CloudsmithRelease"
cyberpowerresource = "adi_lg_plugins.resources.cyberpowerpdu:CyberPowerOutlet"
CyberPowerOutlet = "adi_lg_plugins.resources.cyberpowerpdu:CyberPowerOutlet"
xilinxdevicejtag = "adi_lg_plugins.resources.xilinxdevice:XilinxDeviceJTAG"
XilinxDeviceJTAG = "adi_lg_plugins.resources.xilinxdevice:XilinxDeviceJTAG"
xilinxvivadotool = "adi_lg_plugins.resources.xilinxtool:XilinxVivadoTool"
XilinxVivadoTool = "adi_lg_plugins.resources.xilinxtool:XilinxVivadoTool"
tftpserverresource = "adi_lg_plugins.resources.tftpserver:TFTPServerResource"
TFTPServerResource = "adi_lg_plugins.resources.tftpserver:TFTPServerResource"
homeassistantresource = "adi_lg_plugins.resources.homeassistant:HomeAssistantOutlet"
HomeAssistantOutlet = "adi_lg_plugins.resources.homeassistant:HomeAssistantOutlet"
tickartifacts = "adi_lg_plugins.resources.tickartifacts:TickArtifacts"
TickArtifacts = "adi_lg_plugins.resources.tickartifacts:TickArtifacts"
kasaresource = "adi_lg_plugins.resources.kasa:KasaOutlet"
KasaOutlet = "adi_lg_plugins.resources.kasa:KasaOutlet"
[project.entry-points."labgrid.strategies"]
bootsocstrategy = "adi_lg_plugins.strategies.bootfpgasoc:BootFPGASoC"
bootsocsshstrategy = "adi_lg_plugins.strategies.bootfpgasocssh:BootFPGASoCSSH"
boottickfpgassh = "adi_lg_plugins.strategies.boottickfpgassh:BootTickFPGASSH"
bootselmap = "adi_lg_plugins.strategies.bootselmap:BootSelMap"
bootfabric = "adi_lg_plugins.strategies.bootfabric:BootFabric"
bootsoctftp = "adi_lg_plugins.strategies.bootfpgasoctftp:BootFPGASoCTFTP"
softwareprovisioning = "adi_lg_plugins.strategies.software_provisioning:SoftwareProvisioningStrategy"
bootrpi = "adi_lg_plugins.strategies.bootrpi:BootRPI"
bootvpk180 = "adi_lg_plugins.strategies.bootvpk180:BootVPK180"
bootzynq7000recovery = "adi_lg_plugins.strategies.bootzynq7000recovery:BootZynq7000JTAGRecovery"
bootnoosjtag = "adi_lg_plugins.strategies.bootnoosjtag:BootNoOSJTAG"
reflashvpk180sd = "adi_lg_plugins.strategies.reflashvpk180sd:ReflashVPK180SD"
bootzynqmpjtag = "adi_lg_plugins.strategies.bootzynqmpjtag:BootZynqMPJTAG"
# pytest auto-discovery — installs the iio_hardware / iio_carrier markers
# in any project that pip-installs labgrid-plugins.
[project.entry-points."pytest11"]
adi_lg_hw_ci = "adi_lg_plugins.pytest_plugin"
[tool.ty.environment]
# ty picks up `venv/` automatically; overridable via `ty check --python <path>`.
python-version = "3.10"
[tool.ty.rules]
# Labgrid drivers declare their dependency resources via a `bindings = {...}`
# class attribute; matching instance attributes (e.g. self.cyberpower_outlet)
# are injected at bind time. ty can't see this, so a faithful check would
# flag every binding access. Demote to ignore until driver classes grow
# explicit attribute type annotations.
unresolved-attribute = "ignore"
# labgrid's @step() decorator transforms signatures in a way ty doesn't
# understand, producing false positives on well-formed driver methods.
too-many-positional-arguments = "ignore"
[tool.ty.src]
exclude = [
"venv",
".venv",
"build",
"dist",
"coordinator/web",
"docs/build",
]
[tool.ruff]
line-length = 100
target-version = "py310"
# Drop-in onboarding templates are illustrative (placeholders, copied verbatim
# into other repos), not package code — don't gate CI lint on them.
extend-exclude = [
"adi_lg_plugins/hw_ci/onboarding_templates",
"adi_lg_plugins/hw_ci/prism_upload", # vendored verbatim from tfcollins/prism scripts/
".claude",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
]
ignore = [
"E501", # line too long (handled by formatter)
]
[tool.ruff.lint.flake8-bugbear]
## FastAPI idiom: dependency injection happens via `param = Depends(...)` in
## function signatures. Same applies to Query/Body/Header/etc. ruff's B008
## would otherwise flag every FastAPI endpoint.
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Query",
"fastapi.Body",
"fastapi.Form",
"fastapi.Header",
"fastapi.Cookie",
"fastapi.File",
"fastapi.Path",
"fastapi.Security",
"Depends",
"Query",
"Body",
"Form",
"Header",
"Cookie",
"File",
"Path",
"Security",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"