[build-system]
build-backend = "poetry.core.masonry.api"
requires = [
  "poetry-core",
]

[tool.poetry]
name = "enterprise_server"
version = "0.0.1"
description = "Deploy OpenHands"
authors = [ "OpenHands" ]
license = "POLYFORM"
readme = "README.md"
repository = "https://github.com/OpenHands/OpenHands"
packages = [
  { include = "server" },
  { include = "storage" },
  { include = "sync" },
  { include = "integrations" },
]

[tool.poetry.dependencies]
python = "^3.12,<3.14"
openhands-ai = { path = "../", develop = true }
gspread = "^6.1.4"
alembic = "^1.14.1"
cloud-sql-python-connector = "^1.16.0"
psycopg2-binary = "^2.9.10"
pg8000 = "^1.31.2"
stripe = "^11.5.0"
python-json-logger = "^3.2.1"
python-keycloak = "^5.3.1"
asyncpg = "^0.30.0"
sqlalchemy = { extras = [ "asyncio" ], version = "^2.0.40" }
resend = "^2.7.0"
tenacity = "^9.1.2"
slack-sdk = "^3.35.0"
ddtrace = "3.13.0"                                           #pin to avoid yanked version 3.12.4
posthog = "^7.0.0"
limits = "^5.2.0"
coredis = "^4.22.0"
httpx = "*"
scikit-learn = "^1.7.0"
shap = "^0.48.0"
google-cloud-recaptcha-enterprise = "^1.24.0"
# Dependencies previously only in Dockerfile, now managed via poetry.lock
prometheus-client = "^0.24.0"
pandas = "^2.2.0"
numpy = "^2.2.0"
mcp = "^1.10.0"
pillow = "^12.1.1"

[tool.poetry.group.dev.dependencies]
ruff = "0.8.3"
mypy = "1.13.0"
pre-commit = "4.1.0"
build = "*"
types-requests = "^2.32.4.20250611"

[tool.poetry.group.test.dependencies]
pytest = "*"
pytest-cov = "*"
pytest-asyncio = "*"
pytest-forked = "*"
pytest-xdist = "*"
flake8 = "*"
freezegun = "^1.5.1"
openai = "*"
opencv-python = "*"
pandas = "*"
reportlab = "*"
gevent = ">=24.2.1,<26.0.0"

[tool.poetry-dynamic-versioning]
enable = true
style = "semver"

[tool.autopep8]
# autopep8 fights with mypy on line length issue
ignore = [ "E501" ]

[tool.black]
# prevent black (if installed) from changing single quotes to double quotes
skip-string-normalization = true

[tool.ruff]
lint.select = [ "D" ]
# ignore warnings for missing docstrings
lint.ignore = [ "D1" ]
lint.pydocstyle.convention = "google"

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"

[tool.coverage.run]
relative_files = true
omit = [ "tests/*" ]
