[project]
name = "email-campaigns-sender"
version = "0.1.0"
description = ""
authors = [{ name = "The Orchard", email = "webdev@theorchard.com" }]
requires-python = "~=3.13.0"
readme = "README.md"
dependencies = [
    "pydantic-settings>=2.0.3,<3",
    "fansifter-common[cli,db]==0.154.0",
    "anydi>=0.74.2",
    "snowflake-sqlalchemy>=1.8.2,<2",
    "sentry-sdk>=2.12.0,<3",
    "datadog-lambda>=6.97.0,<7",
    "boto3>=1.28.63,<2",
    "cryptography>=43.0.1,<44",
    "unidecode>=1.4.0",
    "owslogger>=4.3.0",
    "rich>=14.2.0",
    "redis>=7.0.1",
    "cachetools>=6.2.4",
    "emval>=0.1.12",
]

[dependency-groups]
dev = [
    "ty>=0.0.29",
    "ruff>=0.15.9",
    "pytest>=9.0.2",
    "pytest-cov>=6.1.1",
    "pytest-env>=1.2.0,<2",
    "pytest-docker>=3.2.5",
    "polyfactory==2.22.3",
    "freezegun>=1.2.2,<2",
    "dirty-equals>=0.9.0",
    "faker>=37.11.0",
    "psycopg[binary]>=3.2.11",
    "boto3-stubs[s3]>=1.40.46",
    "fakeredis[json,lua]>=2.32.0",
    "types-cachetools>=6.2.0.20251022",
]

[[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"

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

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

[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",
    "--strict-markers",
]
xfail_strict = true
junit_family = "xunit2"
anydi_inject_all = true
env = [
    "Environment = test",
    "APP_DEBUG = true",
    "SNOWFLAKE_USER = postgres",
    "SNOWFLAKE_PASSWORD = postgres",
    "D:SNOWFLAKE_HOST = localhost",
    "D:SNOWFLAKE_PORT = 7443",
    "D:SNOWFLAKE_DATABASE = app_reporting_test",
    "LOGGING_DEBUG = true",
    "SENTRY_DSN = ",
    "DD_FLUSH_TO_LOG = true",
]

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

omit = [
    "app/config.py",
    "app/container.py",
]

[tool.coverage.report]
exclude_also = [
    "@abstractmethod",
    "@abc.abstractmethod",
    "if TYPE_CHECKING",
    "raise NotImplementedError",
    "if settings.sentry_dsn:",
]

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