[project]
authors = [{ name = "humanlayer authors", email = "dexter@metalytics.dev" }]
requires-python = "<4.0,>=3.10"
dependencies = [
  "pydantic>=2.8.2,<3.0.0",
  "requests>=2.32.3,<3.0.0",
  "python-slugify>=8.0.4,<9.0.0",
  "python-dotenv>=1.0.1,<2.0.0",
  "click>=8.1.7,<9.0.0",
  "aiohttp>=3.11.10,<4.0.0",
]
name = "humanlayer"
version = "0.7.10-alpha.1"
description = "humanlayer"
readme = "README.md"

[project.urls]
repository = "https://github.com/humanlayer/humanlayer"

[project.scripts]
hl = "humanlayer.cli.main:cli"
humanlayer = "humanlayer.cli.main:cli"

[dependency-groups]
dev = [
  "pytest<8.0.0,>=7.2.0",
  "pytest-cov<5.0.0,>=4.0.0",
  "deptry<1.0.0,>=0.12.0",
  "mypy<2.0.0,>=1.5.1",
  "pre-commit<4.0.0,>=3.4.0",
  "tox<5.0.0,>=4.11.1",
  "ruff<1.0.0,>=0.5.6",
  "types-requests<3.0.0.0,>=2.32.0.20240712",
  "types-python-slugify<9.0.0.0,>=8.0.2.20240310",
  "black<25.0.0,>=24.8.0",
  "pytest-asyncio<0.22.0",
]
docs = [
  "mkdocs<2.0.0,>=1.4.2",
  "mkdocs-material<10.0.0,>=9.2.7",
  "mkdocstrings[python]<1.0.0,>=0.23.0",
]

[tool.pdm.build]
includes = ["humanlayer"]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"

[tool.mypy]
files = ["humanlayer"]
disallow_untyped_defs = "True"
disallow_any_unimported = "True"
no_implicit_optional = "True"
check_untyped_defs = "True"
warn_return_any = "True"
warn_unused_ignores = "True"
show_error_codes = "True"

[tool.pytest.ini_options]
testpaths = ["tests"]

[tool.ruff]
target-version = "py37"
line-length = 120
fix = true
select = [
  # flake8-2020
  "YTT",
  # flake8-bandit
  "S",
  # flake8-bugbear
  "B",
  # flake8-builtins
  "A",
  # flake8-comprehensions
  "C4",
  # flake8-debugger
  "T10",
  # flake8-simplify
  "SIM",
  # isort
  "I",
  # mccabe
  "C90",
  # pycodestyle
  "E",
  "W",
  # pyflakes
  "F",
  # pyupgrade
  "UP",
  # ruff
  "RUF",
  # tryceratops
  "TRY",
]
ignore = [
  # LineTooLong
  "E501",

  # DoNotAssignLambda
  "E731",

  # Unsafe eval
  "S307",

  # long exception message
  "TRY003",

]

[tool.ruff.format]
preview = true

[tool.coverage.report]
skip_empty = true

[tool.coverage.run]
branch = true
source = ["humanlayer"]


[tool.ruff.per-file-ignores]
"tests/*" = ["S101"]
"humanlayer/cli/main.py" = ["TRY003"]
"humanlayer/core/types.py" = ["TRY003"]
"**/__init__.py" = ["F403"]
"**/core/protocol.py" = ["A003"]
"**/test_*.py" = ["S101"]
"**/*_test.py" = ["S101"]
"**/approval.py" = ["S101"]
"**/async_approval.py" = ["S101"]

[tool.ruff.mccabe]
max-complexity = 12


[tool.black]
line_length = 104

[tool.deptry]
exclude = ["examples", "venv", ".venv", "humanlayer-ts", "humanlayer-mcp", "hack"]


[tool.deptry.per_rule_ignores]
DEP003 = ["click"]
DEP004 = ["pytest"]
