[project]
name = "resonance-engine"
version = "0.1.0"
requires-python = ">=3.14"
dependencies = [
    "fastapi>=0.139.0",
    "pydantic-settings>=2.14.2",
    "typer>=0.26.0",
    "uvicorn>=0.51.0",
    "fansifter-common[db]>=0.154.0",
    "rich>=15.0.0",
    "owslogger>=4.3.1",
    "cryptography>=49.0.0",
    "boto3>=1.43.36",
    "ddtrace>=4.11.0",
    "sentry-sdk[fastapi]>=2.59.0",
    "datadog-lambda>=8.125.0",
    "redis>=7.4.0",
    "alembic>=1.18.5",
    "psycopg[binary,pool]>=3.3.4",
    "confluent-kafka>=2.14.0",
    "jwtauth>=0.2.0,<0.3",
    "pydantic>=2.13.3",
    "emval>=0.1.12",
]

[dependency-groups]
dev = [
    "ruff>=0.15.21",
    "ty>=0.0.59",
    "dirty-equals>=0.11",
    "fakeredis>=2.36.2",
    "freezegun>=1.5.5",
    "polyfactory>=3.3.0",
    "pytest>=9.1.1",
    "pytest-cov>=7.1.0",
    "pytest-docker>=3.2.5",
    "pytest-env>=1.6.0",
    "pytest-mock>=3.15.1",
    "respx>=0.22.0",
    "types-boto3[secretsmanager,lambda,sqs,dsql]>=1.43.36",
    "types-confluent-kafka>=1.4.1",
]

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

[tool.ty.src]
include = [
    "src/**/*.py",
    "tests/**/*.py",
    "migrations/**/*.py",
]

[tool.ruff]
line-length = 88
include = [
    "src/**/*.py",
    "tests/**/*.py",
    "migrations/**/*.py",
]

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

[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["ARG002"]

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

[tool.pytest.ini_options]
addopts = [
    "--strict-config",
    "--strict-markers",
]
xfail_strict = true
junit_family = "xunit2"
filterwarnings = [
    "ignore:'HTTP_422_UNPROCESSABLE_ENTITY' is deprecated.*:DeprecationWarning:starlette",
]
env = [
    "Environment = test",
    "APP_DEBUG = true",
    "AUTH_ENABLED = false",
    "DSQL_ENDPOINT = ",
    "DB_USER = postgres",
    "DB_PASSWORD = postgres",
    "D:DB_HOST = localhost",
    "D:DB_PORT = 7432",
    "D:DB_NAME = resonance_test",
    "ENCRYPTION_BACKEND = plain",
    "LOGGING_DEBUG = true",
    "SENTRY_DSN = ",
    "DD_FLUSH_TO_LOG = true",
    "FAN_COLLECT_WORKER_TIMEOUT_S = 540",
    "FAN_FANOUT_WINDOW_S = 600",
]

[tool.alembic]
script_location = "migrations"
prepend_sys_path = "."
file_template = "%%(year)d%%(month).2d%%(day).2d%%(hour).2d%%(minute).2d%%(second).2d_%%(rev)s_%%(slug)s"
timezone = "UTC"
output_encoding = "utf-8"

[build-system]
requires = ["uv_build>=0.11.2,<0.12"]
build-backend = "uv_build"
