Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
147 lines (132 loc) · 3.36 KB
/
Copy pathpyproject.toml
File metadata and controls
147 lines (132 loc) · 3.36 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
[project]
name = "openhands-automation"
version = "1.26.0"
description = "OpenHands automation service"
readme = "README.md"
license = "MIT"
requires-python = ">=3.12"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
]
dependencies = [
# WebSocket transport for slack-sdk's async Socket Mode client. httpx has no
# WebSocket client, and slack-sdk declares aiohttp only under an `optional`
# extra that also drags in boto3/SQLAlchemy/websockets, so it is direct here.
"aiohttp>=3.14.3",
"aiosqlite>=0.20",
"alembic>=1.14",
"asyncpg>=0.30",
"boto3>=1.35",
"cachetools>=7.0.5",
# eMudhra CA distrust: GHSA-6q48-6c7w-9gw2
"certifi>=2026.10.19",
"cloud-sql-python-connector[asyncpg]>=1.16",
"croniter>=2",
"fastapi>=0.121",
"google-cloud-storage>=2.18",
"httpx>=0.27",
"jmespath>=1.0",
"openhands-sdk==1.58.1",
"openhands-workspace==1.58.1",
"pg8000>=1.31",
"prometheus-client>=0.19",
"pydantic>=2",
"pydantic-settings>=2",
"pyjwt>=2.13.0",
"python-json-logger>=3",
"pyyaml>=6",
# Socket Mode client: apps.connections.open, envelope framing, ping/pong and
# reconnect. Only used when a Slack app is configured.
"slack-sdk>=3.33",
"sqlalchemy[asyncio]>=2",
"starlette>=1.3.1",
"tenacity>=9.1.4",
"tzdata>=2024.1",
"uvicorn[standard]>=0.30",
]
[build-system]
build-backend = "hatchling.build"
requires = [
"hatchling",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["openhands"]
[tool.hatch.build.targets.wheel.force-include]
# Include migrations folder inside the automation package
# This allows alembic migrations to run when installed via pip/uvx
"migrations" = "openhands/automation/migrations"
[dependency-groups]
dev = [
"pre-commit>=4.3.0",
"pyright[nodejs]>=1.1.405",
"pytest>=8.4.1",
"pytest-cov>=5.0.0",
"ruff>=0.12.10",
"pycodestyle>=2.12.0",
"pytest-asyncio>=1.1.0",
"pytest-xdist>=3.6.0",
"pytest-timeout>=2.4.0",
"testcontainers[postgres,minio]>=4.10.0",
]
production = [
"ddtrace==4.16.0",
]
# Ruff configuration
[tool.ruff]
target-version = "py312"
line-length = 88
extend-exclude = ["openhands/automation/presets", ".pr"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes (includes F841: unused-variable)
"I", # isort
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
]
extend-select = ["B006", "B008", "B039", "RUF012"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["ARG"]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.params.Depends",
"fastapi.Query",
"fastapi.params.Query",
]
[tool.ruff.lint.isort]
known-first-party = ["openhands"]
combine-as-imports = true
force-single-line = false
lines-after-imports = 2
# Pytest configuration
[tool.pytest.ini_options]
testpaths = [
"tests"
]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
asyncio_mode = "auto"
# Pyright configuration
[tool.pyright]
include = [
"openhands/automation",
"tests",
]
exclude = [
"scripts/test_tarball",
"openhands/automation/presets",
]
venvPath = "."
venv = ".venv"
pythonVersion = "3.12"
useLibraryCodeForTypes = true
typeCheckingMode = "standard"