[project]
name = "songwhip-event-processor"
version = "0.1.0"
description = ""
authors = [{ name = "The Orchard", email = "webdev@theorchard.com" }]
requires-python = ">=3.12, <3.13"
dependencies = [
    "pydantic>=2.9.2,<3",
    "pydantic-settings>=2.9.1,<3",
    "fansifter-common>=0.148.0",
    "boto3>=v1.43.15",
    "sentry-sdk>=2.14.0,<3",
    "datadog-lambda>=8.125.0",
    "orjson>=3.11.9",
    "confluent-kafka>=2.14.0",
    "owslogger>=4.3.0",
    "rich>=15.0.0",
]

[dependency-groups]
dev = [
    "ty>=0.0.39",
    "ruff>=0.15.14",
    "pytest>=8.3.5,<9",
    "pytest-cov>=6.1.1",
    "pytest-env>=1.1.0,<2",
    "pytest-mock>=3.15.1",
    "boto3-stubs[s3, kms]>=1.26.10,<2",
    "polyfactory>=3.3.0",
    "types-confluent-kafka>=1.4.1",
    "types-boto3[kms]>=1.43.15",
]

[tool.uv]

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

[tool.hatch.build.targets.sdist]
include = ["./app"]

[tool.hatch.build.targets.wheel]
include = ["./app"]

[tool.hatch.build.targets.wheel.sources]
"./app" = "app"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

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

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

[tool.ruff.lint]
select = ["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",
    "--strict-markers",
    "-p no:anydi",
]
xfail_strict = true
junit_family = "xunit2"
env = [
    "Environment = test",
    "LOG_FORMAT = console",
    "CACHE_BACKEND = memory",
]
