-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathpyproject.toml
More file actions
242 lines (209 loc) · 5.91 KB
/
Copy pathpyproject.toml
File metadata and controls
242 lines (209 loc) · 5.91 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 = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "physicalai"
dynamic = ["version"]
requires-python = ">=3.11"
description = "Lightweight runtime for physical AI inference"
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "Intel OpenVINO Toolkit" }]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"numpy>=1.24",
"loguru>=0.7",
# target PyTurboJPEG 1.x for libjpeg-turbo 2.x compatibility
"PyTurboJPEG<2; sys_platform == 'linux'",
"pynokhwa==0.1.3",
"pydantic>=2.5",
"pyyaml>=6.0",
"opencv-python-headless",
"huggingface_hub>=0.34,<2.0",
"transformers>=5.5.0,<5.6.0",
"num2words>=0.5.14,<0.6.0",
"safetensors>=0.4.3,<1.0.0",
"onnxruntime",
"openvino>=2026.3.0",
"openvino_tokenizers>=2026.3.0.0",
"jsonargparse[signatures,shtab]>=4.50,<5",
"typing-extensions>=4.5",
]
[project.scripts]
physicalai = "physicalai.cli.main:main"
pai = "physicalai.cli.main:main"
[project.optional-dependencies]
tests = ["pytest", "mypy"]
notebooks = ["matplotlib", "matplotlib-inline", "ipykernel"]
realsense = [
"pyrealsense2>=2.58.4.10922; sys_platform != 'darwin'",
"pyrealsense2-macosx; sys_platform == 'darwin'",
]
basler = ["pypylon", "opencv-python-headless"]
# Pin iceoryx2 exact version and sync with PhysicalAI Studio so
# publishers and subscribers across processes/venvs can attach to each other.
transport = ["iceoryx2==0.9.0", "eclipse-zenoh==1.9.0", "msgpack==1.2.1"]
genicam = []
capture = [
"physicalai[realsense]",
"physicalai[basler]",
"physicalai[genicam]",
"physicalai[transport]",
]
ur = []
abb = []
franka = []
trossen = ["trossen-arm>=1.9.0"]
so101 = ["feetech-servo-sdk"]
observer-rerun = ["rerun-sdk>=0.22"]
robots = [
"physicalai[ur]",
"physicalai[abb]",
"physicalai[franka]",
"physicalai[trossen]; python_version < '3.14'",
"physicalai[so101]",
]
[dependency-groups]
dev = ["pytest", "mypy", "pyrefly", "ruff>=0.15.12", "prek"]
docs = ["mkdocs>=1.6", "mkdocs-material>=9.6"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.metadata]
allow-direct-references = true
[project.urls]
Homepage = "https://github.com/openvinotoolkit/physicalai"
Documentation = "https://github.com/openvinotoolkit/physicalai/tree/main/docs"
Repository = "https://github.com/openvinotoolkit/physicalai"
Issues = "https://github.com/openvinotoolkit/physicalai/issues"
[tool.hatch.build.targets.wheel]
packages = ["src/physicalai"]
[tool.hatch.build.targets.sdist]
include = [
"src/physicalai/**",
"README.md",
"LICENSE",
"pyproject.toml",
"docs/**",
"examples/**",
]
[tool.pyrefly]
python-version = "3.11"
search-path = ["src"]
project-includes = ["src", "tests"]
ignore-missing-imports = ["*"]
[tool.mypy]
files = ["src", "tests"]
mypy_path = "src"
ignore_missing_imports = true
explicit_package_bases = true
[tool.uv]
default-groups = ["dev"]
[tool.ruff]
target-version = "py311"
line-length = 120
preview = true
include = ["src/**/*.py", "src/**/*.pyi"]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"notebooks",
]
src = ["src", "tests"]
extend-exclude = ["docs", "examples", "tests", "notebooks", ".github/scripts"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"COM812", # Conflicts with Ruff formatter
]
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.per-file-ignores]
# physicalai.cli is intentionally a PEP 420 namespace package (no __init__.py)
# so the runtime and studio distributions can each contribute subcommands.
"src/physicalai/cli/*.py" = ["INP001"]
"src/physicalai/capture/transport/_header.py" = ["RUF012"]
"src/physicalai/capture/transport/_publisher.py" = ["S603"]
"src/physicalai/robot/transport/_owner.py" = ["S603"]
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.pylint]
max-args = 15
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-copyright]
notice-rgx = '# Copyright \(C\) (\d{4}(-\d{4})?) Intel Corporation\n# SPDX-License-Identifier: Apache-2\.0'
[tool.bandit]
skips = ["B101"]
exclude_dirs = ["tests"]
[tool.markdownlint]
default = true
[tool.markdownlint.MD001]
enabled = true
[tool.markdownlint.MD013]
line_length = 1000
[tool.markdownlint.MD024]
allow_different_nesting = true
siblings_only = true
[tool.markdownlint.MD033]
enabled = false
[tool.markdownlint.MD034]
enabled = false
[tool.markdownlint.MD036]
enabled = false
[tool.markdownlint.MD041]
enabled = false
[tool.markdownlint.MD042]
enabled = false
[tool.pytest.ini_options]
addopts = ["--strict-markers", "--strict-config", "--showlocals", "-ra", "-m", "not ov_smoke"]
testpaths = "tests"
pythonpath = ["src", "tests/fuzz/harnesses"]
# Prevent pytest from walking into the fuzz harness tree.
norecursedirs = ["tests/fuzz"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"requires_download: marks tests that require downloading external datasets",
"integration: marks tests as integration tests",
"v4l2: marks tests requiring V4L2 mocking (Linux only)",
"transport: marks tests requiring iceoryx2",
"ov_smoke: OpenVINO smoke tests — three-stage contract (load, tokenizer, predict) against published HF exports",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"@abstractmethod",
"pass",
"raise ImportError",
"raise ValueError",
"except ImportError:",
]
[tool.coverage.run]
source = ["src/physicalai"]
[tool.coverage.paths]
source = ["src"]