[project]
name = "ows-assets"
version = "0.1.0"
description = "Python microservice for ows-assets - handles asset CRUD"
authors = [
    {name = "Sony Music PDE"},
]
requires-python = ">=3.11.0,<4.0"
dependencies = [
    "boto3 (>=1.35.24,<2.0.0)",
    "boto3-stubs[dynamodb,s3,sts] (>=1.40.64,<2.0.0)",
    "botocore (>=1.35.24,<2.0.0)",
    "ddtrace (>=4.0,<5.0)",
    "flask (>=3.1.3,<4.0.0)",
    "jsonschema (>=4.23.0,<5.0.0)",
    "limits (>=5.6.0,<6.0.0)",
    "owsclient (>=0.13.1,<1.0.0)",
    "owslogger (>=4.3.0,<5.0.0)",
    "owsrequest (>=2.10.1,<3.0.0)",
    "PyMySQL (>=1.1.1,<2.0.0)",
    "python-pdp-sdk[migration] (>=6.1.0,<7.0.0)",
    "redis (>=7.0.1,<8.0.0)",
    "requests (>=2.32.4,<3.0.0)",
    "secrets_manager == 1.4.4",
    "sentry-sdk[flask] (>=2.14.0,<3.0.0)",
    "SQLAlchemy (>=2.0.0,<3.0.0)",
    "tzdata (>=2025.2,<2027.0)",
    "urllib3 (>=2.7.0,<3.0.0)",
    "uWSGI (>=2.0,<2.1)",
]

[project.optional-dependencies]
dev = [
    "fakeredis[lua] (>=2.32.0,<3.0.0)",
    "flexmock (>=0.12,<1.0.0)",
    "freezegun (>=1.4,<2.0.0)",
    "pytest-freezer (>=0.4.9,<1.0.0)",
    "mypy (>=1.9.0,<2.0.0)",
    "moto (>=5.0.0,<6.0.0)",
    "ruff (>=0.6.9,<1.0.0)",
    "pytest (>=9.0,<10.0)",
    "pytest-cov (>=7.0.0,<8.0.0)",
    "pytest-forked (>=1.6.0,<2.0.0)",
    "pytest-mock (>=3.14.0,<4.0.0)",
    "pytest-xdist (>=3.5.0,<4.0.0)",
    "qa-utils-grass == 0.6.1",
    "syrupy (>=5.1,<6.0)",
    "types-jsonschema (>=4.25.1.20251009,<5.0.0.0)",
    "types-pymysql (>=1.1.0.20251220,<2.0.0.0)",
    "types-pyyaml (>=6.0.12.20250915,<7.0.0.0)",
    "types-redis (>=4.6.0.20241004,<5.0.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 = ["C", "E", "F", "W", "B", "I", "T20", "TID252", "G"]
ignore = ["C901", "E501", "B007", "B008", "B009"]

[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 = [
    "auth.*",
    "owslogger.*",
    "owsrequest.*",
    "owsresponse.*",
    "python_pdp_sdk.*",
    "secrets_manager.*",
]
ignore_missing_imports = true

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