[project]
name = "m2mconfig"
version = "0.1.0"
description = "Tools for managing machine-to-machine (M2M) clients in Auth0"
authors = [{ name = "Sony Music PDE" }]
readme = "README.md"
requires-python = ">=3.11,<4.0"
dependencies = [
  "auth0-python>=4.7.1,<5.0.0",
  "boto3>=1.34.62,<2.0.0",
  "boto3-stubs[sts,secretsmanager]>=1.34.62,<2.0.0",
  "environs>=11.0.0,<12.0.0",
  "mypy-boto3>=1.34.62,<2.0.0",
  "pydantic>=2.6.4,<3.0.0",
  "typer>=0.9.0,<1.0.0",
  "fansifter-common>=0.14.0,<0.15.0",
  "sentry-sdk>=2.13.0,<3.0.0",
]

[project.scripts]
m2mconfig = "m2mconfig.cli.main:app"

[tool.poetry.group.dev.dependencies]
mypy = "1.8.0"
pytest = "9.0.3"
pytest-cov = "4.1.0"
pytest-mock = "3.12.0"
ruff = "0.2.2"

[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",
]
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.mypy.overrides]]
module = [
  "auth0.*",
]
ignore_missing_imports = true

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