-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathpyproject.toml
More file actions
265 lines (235 loc) · 6.56 KB
/
Copy pathpyproject.toml
File metadata and controls
265 lines (235 loc) · 6.56 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
[project]
name = "hud-python"
version = "0.6.8.dev1"
description = "SDK for the HUD platform."
readme = "README.md"
requires-python = ">=3.11, <3.13"
authors = [
{ name = "HUD", email = "founders@hud.ai" },
]
license = { file = "LICENSE" }
dependencies = [
# Core dependencies - minimal for MCP servers and CLI
"httpx>=0.23.0,<1",
"packaging>=21.0",
"pydantic>=2.6,<3",
"pydantic-settings>=2.2,<3",
# MCP dependencies
"mcp>=1.24.0,<2.0",
"fastmcp==3.0.2",
# For all inference agents
"openai>=2.26.0",
"anthropic>=0.78.0",
"google-genai",
# CLI dependencies
"typer>=0.9.0",
"rich>=13.0.0",
"questionary==2.1.0",
"prompt-toolkit==3.0.51",
"asyncssh>=2.23.0",
"asyncvnc>=1.3.0",
# >=11.0: 11.2.x is what Isaac Sim's kit python pins (prebundled, symlink-
# deduped); requiring 11.3 would force an upgrade that bricks the sim.
"pillow>=11.0.0",
"websockets>=15.0.1",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
[project.urls]
"Homepage" = "https://github.com/hud-evals/hud-python"
"Bug Tracker" = "https://github.com/hud-evals/hud-python/issues"
"Documentation" = "https://docs.hud.ai"
[project.scripts]
hud = "hud.cli:main"
hud-python = "hud.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
exclude = [
"docs/",
"cookbooks/",
"integrations/",
"**/checkpoints/",
"**/*.safetensors",
"**/*.ckpt",
"**/*.pth",
]
[tool.hud.clone]
title = "🚀 Welcome to HUD SDK!"
message = """[bold cyan]Thanks for using the hud SDK![/bold cyan]
[yellow]Quick Start:[/yellow]
• Install dependencies: [green]uv sync[/green]
• Try the CLI: [green]hud --help[/green]
• Read the docs: [green]https://docs.hud.ai[/green]
[dim]For runnable recipes, check out the [cyan]cookbooks/[/cyan] directory.[/dim]
[bold]Happy coding! 🎉[/bold]"""
style = "blue"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.sdist]
include = [
"hud/**",
"README.md",
"LICENSE",
"pyproject.toml"
]
exclude = [
"*/tests/",
"*/__pycache__/",
"**/*.safetensors",
"**/*.ckpt",
"**/*.pth",
"*.pyc",
"*.pyo",
"*~",
".DS_Store"
]
[tool.hatch.build.targets.wheel]
packages = ["hud"]
# Ensure py.typed is included in the package
[tool.hatch.build.targets.wheel.force-include]
"hud/py.typed" = "hud/py.typed"
[project.optional-dependencies]
# AI providers (openai, anthropic, google-genai) are now core dependencies; this
# extra is kept empty so `hud-python[agents]` and the `agent` alias still resolve.
agents = []
# AWS Bedrock support for ClaudeAgent
bedrock = [
"anthropic[bedrock]>=0.78.0",
]
# Development dependencies - includes testing, linting, and automation tools
dev = [
"hud-python[agents]", # Include agents for dev
"dotenv>=0.9.9",
# Testing and linting
"ruff >=0.11.8, <0.15.0",
"pytest >=8.1.1",
"pytest-asyncio",
"pytest-mock",
"pytest-cov",
"pyright==1.1.407",
]
# Alias for backwards compatibility
agent = ["hud-python[agents]"]
browseruse = [
"browser-use>=0.11.13",
]
# Robot capability (openpi/0 protocol wire codec + bridges + agent harness)
robot = [
"numpy>=1.24",
"openpi-client>=0.1.2", # openpi msgpack-numpy wire codec (the openpi/0 format)
"av>=12", # PyAV (ffmpeg): H.264/CMAF camera-frame video streaming for traces
]
# Modal placement (ModalRuntime): per-rollout cloud sandboxes from a built image
modal = [
"modal>=1.0",
]
# Daytona placement (DaytonaRuntime): per-rollout cloud sandboxes from a snapshot
daytona = [
"daytona>=0.100",
]
# Client-side custom training losses (TrainingClient.forward_backward_custom).
# Only the custom-loss path needs torch autograd; the built-in loss_fn path and
# the rest of the client are torch-free.
train = [
"torch>=2",
]
[tool.ruff]
target-version = "py311"
line-length = 100
lint.extend-select = [
"I", # isort
"F", # pyflakes
"ANN", # flake8-annotations
"Q", # flake8-quotes
"ASYNC", # flake8-async
"TID", # flake8-tidy
"RSE", # flake8-raise
"G", # flake8-logging-format
"B", # flake8-bugbear
"E", # pycodestyle errors
"W", # pycodestyle warnings
"PIE", # flake8-pie
"S", # flake8-bandit
"PERF", # Perflint
"PLC", # Pylint
"UP", # pyupgrade
"SIM", # flake8-simplify
"INP", # flake8-no-pep420
"T20", # flake8-print
"PYI", # flake8-pyi
"TCH", # Flake-8 TCH
"T10", # flake-8 debugger
"RUF", # Ruff-specific
]
lint.ignore = [
"ANN401", # Allow Any.
"W293", # Ignore blank line contains whitespace
"PLC0415", # Allow function-local imports.
"S101", # Allow assert statements.
"S603", # subprocess calls with shell=False are fine.
"E731", # Allow lambda assignments.
]
[tool.ruff.lint.extend-per-file-ignores]
"**/tests/**/*.py" = ["PYI", "B", "S", "ANN"]
# Robot runtime/harness: bare prints are deliberate operator feedback on env/agent loops.
"hud/environment/robot/**" = ["T201"]
"hud/agents/robot/**" = ["T201"]
"hud/capabilities/robot.py" = ["T201"]
"hud/telemetry/lerobot.py" = ["T201"]
"*.ipynb" = ["ALL"] # Disables all rules for Jupyter.
"**/cookbooks/**/*.py" = ["ALL"]
"scripts/*.py" = ["T201", "INP001"] # dev scripts: print is the interface
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
[tool.pyright]
include = ["hud", "integrations"]
exclude = [
"**/node_modules",
"**/__pycache__",
"**/venv",
"**/.venv",
]
pythonVersion = "3.11"
typeCheckingMode = "basic"
strict = ["hud/agents"]
reportMissingImports = "warning"
[tool.coverage.run]
source = ["hud"]
omit = [
"*/tests/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"pass",
"pytest.mark.skip",
"@(typing\\.)?overload",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
"class .*\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
show_missing = true
fail_under = 58
omit = [
"*/tests/*",
]
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
testpaths = ["hud", "integrations"]
addopts = ""
markers = [
"integration: marks tests as integration tests (require HUD_API_KEY, network access)",
]