[project]
name = "ows-store"
version = "0.1.0"
description = "Python microservice for ows-store - handles DSP"
authors = [
    {name = "Sony Music PDE"},
]
requires-python = ">=3.13,<4.0"
dependencies = [
    "ddtrace (>=4.0,<5.0)",
    "flask[SQLAlchemy] (>=3.1,<4.0)",
    "owsclient (>=0.7,<1.0)",
    "owslogger (>=4.3,<5.0)",
    "owsrequest (>=2.9,<3.0)",
    "owsresponse (>=3.0,<4.0)",
    "PyMySQL (>=1.1,<2.0)",
    "python-pdp-sdk (>=5.1,<6.0)",
    "secrets-manager (>=1.4,<2.0)",
    "sentry-sdk[flask,sqlalchemy] (>=2.14,<3.0)",
    "SQLAlchemy (>=2.0,<3.0)",
    "uwsgi (>=2.0,<2.1)",
]

[project.optional-dependencies]
dev = [
    "mypy (>=1.9.0,<2.0.0)",
    "ruff (>=0.6.9,<1.0.0)",
    "pytest (>=9.0,<10.0)",
    "pytest-cov (>=7.0.0,<8.0.0)",
    "pytest-mock (>=3.14.0,<4.0.0)",
    "types-requests (>=2.31.0.20240311,<3.0.0)",
    "types-uWSGI (>=2.0.0.20250809,<3.0.0)",
    "yamllint (>=1.35.0,<2.0.0)",
]

[tool.poetry]
package-mode = false

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

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

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

[tool.ruff]
line-length = 88

[tool.ruff.format]
line-ending = "lf"

[tool.ruff.lint]
select = ["B", "C", "E", "F", "W", "I", "T20", "TID252", "G"]
ignore = ["C901", "E501", "B007", "B008", "B009"]

[tool.ruff.lint.mccabe]
max-complexity = 18

[tool.ruff.lint.isort]
combine-as-imports = true
forced-separate = ["tests"]

[tool.mypy]
strict = true
show_error_codes = true
disallow_untyped_defs = true
disallow_any_generics = true
plugins = [
    "sqlalchemy.ext.mypy.plugin",
]

[[tool.mypy.overrides]]
module = [
    "owslogger.*",
    "owsrequest.*",
    "owsresponse.*",
    "secrets_manager.*",
]
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = [
    "store.handlers",
]
disable_error_code = [
    "no-any-return"
]
