[project]
name = "ows-pdp"
version = "0.1.0"
description = "ows-pdp is the future of authorization checks."
readme = "README.md"
requires-python = ">=3.11.11"
dependencies = [
    "audience-common>=3.5.0",
    "aiofiles>=24.1.0",
    "boto3>=1.26.10,<2",
    "cerbos==0.14.0",
    "ddtrace==4.10.4",
    "environs==9.5.0",
    "fakeredis==2.20.0",
    "fastapi==0.135.0",
    "jwtauth>=1.0.0,<2",
    "owsclient>=0.1.0",
    "pydantic>=2.4.1,<3",
    "pyyaml>=6.0.2",
    "redis==5.0.1",
    "secrets-manager>=1.4.6",
    "sentry-sdk==2.14.0",
    "splitio-client>=10.2.0",
    "starlette==1.3.1",
    "typer==0.9.0",
    "uvicorn==0.22.0",
    "owscontext>=0.4.1",
]

[project.scripts]
pdpcli = "pdp.cli.main:main"

[project.optional-dependencies]
fastapi = [
    "sentry-sdk==2.14.0",
]
standard = [
    "uvicorn==0.22.0",
]
all = [
    "typer==0.9.0",
]
cpphash = [
    "splitio-client>=10.2.0",
]
asyncio = [
    "splitio-client>=10.2.0",
]
dynamodb = [
    "boto3-stubs>=1.26.148",
]

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

[tool.uv]

[tool.uv.sources]
owsclient = { index = "theorchard" }
audience-common = { index = "theorchard" }
jwtauth = { index = "theorchard" }
secrets-manager = { index = "theorchard" }

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

[dependency-groups]
dev = [
    "boto3-stubs>=1.26.148",
    "freezegun>=1.5.1",
    "jwtauth[testing]>=0.5.3",
    "mypy>=1.15.0",
    "mypy-boto3-dynamodb>=1.37.12",
    "pytest>=9.0.3",
    "pytest-cov>=6.0.0",
    "pytest-mock>=3.14.0",
    "ruff>=0.11.2",
    "types-aiofiles>=24.1.0",
    "types-pyyaml>=6.0.12.20241230",
    "types-requests>=2.32.4.20260324",
]
integration = [
    "boto3-stubs>=1.26.148",
    "pytest>=8.3.5",
    "pytest-env>=1.1.5",
    "requests>=2.33.0",
]

[tool.ruff]
line-length = 88
exclude = [
  ".eggs",
  ".git",
  ".hg",
  ".mypy_cache",
  ".tox",
  ".venv",
  "env",
  "_build",
  "buck-out",
  "build",
  "dist"
]

[tool.ruff.lint]
select = ["E", "I", "F"]
ignore = ["E203", "A003"]

[tool.ruff.lint.isort]
known-third-party = ["cerbos", "fastapi"]

[tool.mypy]
python_version = "3.11"
strict = true
show_error_codes = true
explicit_package_bases = true
plugins = ["pydantic.mypy"]

[[tool.mypy.overrides]]
module = [
  "cerbos.*",
  "secrets_manager.*",
  "splitio.*",
]
ignore_missing_imports = true
