Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
278 lines (243 loc) · 7.96 KB
/
Copy pathpyproject.toml
File metadata and controls
278 lines (243 loc) · 7.96 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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.uv.workspace]
members = ["packages/*"]
exclude = ["packages/physicalai-lerobot-plugin"]
[tool.uv.sources]
physicalai = { workspace = true }
physicalai-studio-plugin = { workspace = true }
physicalai-mujoco-plugin = { workspace = true }
physicalai-rebot-b601-plugin = { workspace = true }
physicalai-stararm-plugin = { workspace = true }
physicalai-trossen-plugin = { workspace = true }
physicalai-so101-plugin = { workspace = true }
[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.4",
"pydantic>=2.5",
"pyyaml>=6.0",
"opencv-python-headless",
"huggingface_hub>=0.34,<2.0",
"transformers>=5.15.1,<5.16.0",
"num2words>=0.5.14,<0.6.0",
"safetensors>=0.4.3,<1.0.0",
"onnxruntime",
"openvino>=2026.4.0",
"openvino_tokenizers>=2026.4.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", "ipywidgets", "jupyterlab"]
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 = []
observer-rerun = ["rerun-sdk>=0.22", "psutil>=5.9"]
robots = [
"physicalai[ur]",
"physicalai[abb]",
"physicalai[franka]",
"physicalai[so101]",
"physicalai[trossen]",
]
# First-party plugin packages from packages/. They require Python 3.12+, so on
# 3.11 these extras install nothing. The Trossen plugin also requires
# trossen-arm, which is distributed only for macOS and Linux.
# physicalai-lerobot-plugin is left out: it pulls in torch and downgrades shared
# dependencies such as OpenCV.
plugin-mujoco = ["physicalai-mujoco-plugin; python_version >= '3.12'"]
plugin-rebot-b601 = ["physicalai-rebot-b601-plugin; python_version >= '3.12'"]
plugin-stararm = ["physicalai-stararm-plugin; python_version >= '3.12'"]
plugin-so101 = ["physicalai-so101-plugin; python_version >= '3.12' and python_version < '3.14'"]
so101 = ["physicalai-so101-plugin; python_version >= '3.12' and python_version < '3.14'"]
plugin-trossen = ["physicalai-trossen-plugin; python_version >= '3.12' and python_version < '3.14' and (sys_platform == 'darwin' or sys_platform == 'linux')"]
trossen = ["physicalai-trossen-plugin; python_version >= '3.12' and python_version < '3.14' and (sys_platform == 'darwin' or sys_platform == 'linux')"]
[dependency-groups]
dev = ["pytest", "mypy", "pyrefly", "ruff>=0.15.12", "prek", "physicalai-so101-plugin"]
docs = ["mkdocs>=1.6", "mkdocs-material>=9.6"]
[tool.hatch.version]
source = "vcs"
tag-pattern = '^v(?P<version>\d+(?:\.\d+)*)$'
raw-options = { search_parent_directories = true, git_describe_command = "git describe --dirty --tags --long --match v*" }
[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",
"packages/physicalai-studio-plugin/src",
"packages/physicalai-mujoco-plugin/src",
]
project-includes = [
"src",
"tests",
"packages/physicalai-studio-plugin/src",
"packages/physicalai-studio-plugin/tests",
"packages/physicalai-mujoco-plugin/src",
]
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", "packages/**/src/**/*.py", "packages/**/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 and not mujoco_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",
"mujoco_smoke: MuJoCo smoke matrix and reachability checks over every supported robot profile (deselected by default; run with -m mujoco_smoke)",
]
[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"]