[project]
name = "twilio-webhooks-inbound"
version = "0.1.0"
description = "Lambda to process Twilio webhooks inbound messages"
authors = [{ name = "The Orchard", email = "webdev@theorchard.com" }]
requires-python = ">=3.13.0, <3.14"
readme = "README.md"
dependencies = [
    "anydi>=0.47.0",
    "boto3>=1.40.20",
    "boto3-stubs[kms]>=1.42.11",
    "cryptography>=46.0.3",
    "datadog-lambda>=8.113.0",
    "fansifter-common[db]>=0.105.0",
    "owslogger>=4.3.1",
    "psycopg[binary]>=3.2.10",
    "pydantic-settings>=2.10.1",
    "rich>=14.1.0",
    "sentry-sdk>=2.35.1",
    "twilio>=9.8.2",
]

[dependency-groups]
dev = [
    "dirty-equals>=0.9.0",
    "freezegun>=1.5.5",
    "polyfactory>=2.22.4",
    "pyright[nodejs]>=1.1.404",
    "pytest>=8.4.1",
    "pytest-cov>=6.2.1",
    "pytest-env>=1.1.5",
    "ruff>=0.12.10",
]

[build-system]
requires = ["uv_build>=0.8.13,<0.9.0"]
build-backend = "uv_build"

[tool.uv]

[[tool.uv.index]]
name = "theorchard"
url = "https://pypi.theorchard.io/pypi/"

[tool.uv.build-backend]
module-name = "app"
module-root = ""

[tool.pyright]
include = [
    "app/**/*.py",
    "tests/**/*.py",
]
strict = [
    "app/**/*.py",
]
typeCheckingMode = "standard"
extraPaths = ["typings"]

[tool.ruff]
line-length = 88
target-version = "py313"

[tool.ruff.lint]
select = ["ARG", "C", "E", "F", "W", "B", "I", "UP", "T20", "TID252", "G"]
ignore = ["E501", "B008", "B009"]

[tool.ruff.lint.isort]
combine-as-imports = true
forced-separate = ["tests"]

[tool.pytest.ini_options]
addopts = [
    "--strict-config",
]
xfail_strict = true
junit_family = "xunit2"
anydi_inject_all = true
env = [
    "Environment = test",
    "APP_DEBUG = true",
    "LOG_FORMAT = console",
    "SENTRY_DSN = ",
    "DD_FLUSH_TO_LOG = true",
]
