[project]
name = "fansifter-common"
version = "0.154.0"
description = "Sony Music Fansifter common library"
requires-python = "~=3.12.0"
readme = "README.md"
authors = [
    {name = "Sony Music PDE", email = "webdev@theorchard.com"},
]
classifiers = [
    "Environment :: Web Environment",
    "Intended Audience :: Developers",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Internet :: WWW/HTTP",
]

dependencies = [
    "pydantic ~= 2.13.4",
    "owsclient ~= 0.13.1",
    "cachelib ~= 0.14.0",
    "python-dateutil ~= 2.8.2",
    "lazy-object-proxy ~= 1.12.0",
    "regex ~= 2026.5.9",
]

[project.optional-dependencies]
cli = [
    "click ~= 8.4.1",
]
db = [
    "SQLAlchemy ~= 2.0.50",
    "SQLAlchemy-Utils ~= 0.42.1",
    "jinja2sql ~= 0.11.0",
]
crypto = [
    "pyjwt[crypto] ~= 2.13.0",
]
dev = [
    "ty >= 0.0.40",
    "ruff ~= 0.15.14",
    "pytest ~= 9.0.3",
    "pytest-cov ~= 7.1.0",
    "pytest-mock ~= 3.15.1",
    "bump2version ~= 1.0.1",
    "faker ~= 40.19.1",
    "polyfactory ~= 3.3.0",
    "boto3 ~= 1.43.16",
    "boto3-stubs[secretsmanager] ~= 1.43.16",
    "cachelib ~= 0.14.0",
    "aiocache ~= 0.12.3",
    "fastapi ~= 0.136.3",
    "ddtrace ~= 4.9.0",
    "respx ~= 0.22.0",
    "types-python-dateutil ~= 2.9.0",
    "types-regex ~= 2026.5.9",
    "jwtauth ~= 0.6.1",
    "snowflake-connector-python ~= 4.6.0",
]

[tool.uv]

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

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

[tool.ruff.lint]
select = ["C", "E", "F", "W", "B", "I", "UP", "T20", "TID252"]
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"

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

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

[tool.hatch.build]
include = [
    "fansifter_common"
]
