[tool.poetry]
name = "jwtauth"
version = "1.0.0"
description = "Sony Music PDE JWTAuth Library"
readme = "README.md"
authors = ["Sony Music PDE <webdev@theorchard.com>"]
classifiers = [
    "Environment :: Web Environment",
    "Framework :: Pytest",
    "Intended Audience :: Developers",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Internet :: WWW/HTTP",
]

[tool.poetry.dependencies]
python="^3.11"
anyio="^3.6.2"
pyjwt = {extras = ["crypto"], version="^2.13.0"}
pydantic = { extras = ["email"], version = "^2.7", optional=true}
boto3 = { version="^1.39.4", optional=true }
requests = { version = "^2.31.0", optional = true }
pyotp = { version = "^2.9.0", optional = true }

[tool.poetry.extras]
testing = ["pydantic", "boto3", "requests", "pyotp"]

[tool.poetry.group.dev.dependencies]
ruff = "^0.5.4"
mypy = "^1.11.0"
pytest = "^8.3.1"
pytest-cov = "^5.0.0"
pytest-mock = "^3.14.0"
bump2version = "^1.0.1"
starlette="^0.49.1"
httpx="^0.28.1"
pydantic = { extras = ["email"], version = "^2.7"}
types-requests = "^2.31.0"
boto3 = "^1.39.4"
boto3-stubs = {version = "^1.39.0", extras = ["secretsmanager"]}
pyotp = "^2.9.0"
requests = "^2.31.0"

[tool.ruff]
line-length = 88

[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.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true

[tool.mypy]
python_version = "3.11"
strict = true
pretty = true
color_output = true
show_error_codes = true

[tool.pytest.ini_options]
addopts = [
    "--strict-config",
    "--strict-markers",
    "-p no:jwtauth",
]
xfail_strict = true
junit_family = "xunit2"

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

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.setuptools.packages.find]
exclude = ["tests"]

[tool.setuptools.package-data]
jwtauth = ["py.typed"]

[[tool.poetry.source]]
name = "theorchard"
url = "https://pypi.theorchard.io/pypi/"
priority = "supplemental"

[[tool.poetry.source]]
name = "PyPI"
priority = "primary"
