forked from hud-evals/hud-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
261 lines (235 loc) · 6.29 KB
/
Copy pathpyproject.toml
File metadata and controls
261 lines (235 loc) · 6.29 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
[project]
name = "hud-python"
version = "0.4.70"
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
"hud-mcp-python-sdk>=3.13.2",
"hud-fastmcp-python-sdk>=0.1.2",
"hud-mcp-use-python-sdk==2.3.20",
"langchain==0.3.27",
"pathspec>=0.12.1",
"wrapt>=1.14.0",
# CLI dependencies
"typer>=0.9.0",
"rich>=13.0.0",
"toml>=0.10.2",
"watchfiles>=0.21.0",
"questionary==2.1.0",
"prompt-toolkit==3.0.51",
# Terminal library with mouse support for JSON viewer
"blessed>=1.20.0",
# Telemetry
"opentelemetry-instrumentation-mcp==0.47.0",
"opentelemetry-api>=1.34.1",
"opentelemetry-sdk>=1.34.1",
"opentelemetry-exporter-otlp-proto-http>=1.34.1",
# Data and evaluation
"datasets>=2.14.0",
"numpy>=1.24.0",
"pillow>=11.1.0",
# AI providers
"anthropic>=0.75",
"openai>=2.8.1",
"google-genai",
"tornado>=6.5.2",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[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 = [
"environments/",
"docs/",
"examples/",
"**/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 in development mode: [green]pip install -e .[/green]
• Try the CLI: [green]hud --help[/green]
• Analyze an MCP server: [green]hud analyze hud-text-2048:latest[/green]
• Read the docs: [green]docs/[/green]
[dim]For more examples, check out the [cyan]examples/[/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]
rl = [
"peft>=0.17.1",
"vllm==0.10.1.1",
"bitsandbytes>=0.41.0 ; sys_platform == 'linux'", # For 8-bit optimizers (Linux only)
"liger-kernel>=0.5.0 ; sys_platform == 'linux'", # Optimized Triton kernels for LLM training (Linux only)
# Note: flash-attn is recommended but optional
# Install separately with: uv pip install flash-attn --no-build-isolation
]
# Development dependencies - includes testing, linting, and automation tools
dev = [
# Include agent dependencies
# Jupyter support
"ipykernel",
"ipython <9",
"jupyter_client",
"jupyter_core",
"dotenv>=0.9.9",
# Testing and linting
"ruff >=0.11.8",
"pytest >=8.1.1,<9",
"pytest-asyncio",
"pytest-mock",
"pytest-cov",
"pyright==1.1.407",
# Automation and computer control
"playwright",
"pyautogui>=0.9.54",
"pillow>=11.1.0",
]
# Agent dependencies extend dev
agent = ["hud-python[dev]"]
agents = ["hud-python[agent]"]
[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.
]
[tool.ruff.lint.extend-per-file-ignores]
"**/tests/**/*.py" = ["PYI", "B", "S", "ANN"]
"*.ipynb" = ["ALL"] # Disables all rules for Jupyter.
"**/examples/**/*.py" = ["ALL"]
"**/environments/**/*.py" = ["ALL"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
[tool.pyright]
include = ["hud"]
exclude = [
"**/node_modules",
"**/__pycache__",
"**/venv",
"hud/misc/claude_plays_pokemon.py",
]
pythonVersion = "3.11"
typeCheckingMode = "basic"
reportMissingImports = "warning"
[tool.coverage.run]
source = ["hud"]
omit = [
"*/tests/*",
"*/examples/*",
"hud/rl/*",
"hud/cli/rl/*",
"hud/misc/*",
]
[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/*",
"*/examples/*",
"hud/rl/*",
"hud/cli/rl/*",
"hud/misc/*",
]
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
testpaths = ["hud", "examples"]
# Ignore the dev folder and other non-test directories
addopts = "--ignore=dev --ignore=ref --ignore=test_env --ignore=environments"