[project]
name = "ows-ledger"
version = "1.0.0"
description = "ows-ledger"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
    "abacus-common-data~=0.8.2",
    "abacus-common-logic~=5.13",
    "annotated-types~=0.7.0",
    "anyio~=3.7.1",
    "backoff~=2.2.1",
    "blinker~=1.9.0",
    "bloom-filter2~=2.0.0",
    "boto3~=1.40",
    "botocore~=1.40",
    "bytecode~=0.16",
    "cachelib~=0.13.0",
    "certifi~=2026.1",
    "charset-normalizer~=3.4",
    "click~=8.2.1",
    "ddtrace~=3.19",
    "docopt~=0.6.2",
    "envier~=0.6.1",
    "flask~=3.1.3",
    "flask-marshmallow~=1.2.1",
    "flask-sqlalchemy~=3.0.5",
    "future~=1.0.0",
    "h11~=0.16.0",
    "httpcore~=1.0.9",
    "httpx~=0.27",
    "idna~=3.10",
    "importlib-metadata~=8.7.0",
    "itsdangerous~=2.2.0",
    "jinja2~=3.1.6",
    "jmespath~=1.0.1",
    "jwtauth~=0.6.1",
    "markupsafe~=2.1.5",
    "marshmallow~=3.26.1",
    "marshmallow-sqlalchemy~=1.0.0",
    "mmh3cffi~=0.2.1",
    "opentelemetry-api~=1.36.0",
    "owsclient~=0.7",
    "owslogger~=4.3.0",
    "owsrequest==2.10.1",
    "owsresponse~=3.0.4",
    "packaging~=25.0",
    "pycparser~=2.22",
    "pydantic~=2.11.7",
    "pydantic-core~=2.33.2",
    "pymysql~=1.1.2",
    "python-dateutil~=2.9.0.post0",
    "python-dotenv~=1.2.2",
    "python-json-logger~=3.3.0",
    "python-pdp-sdk~=5.3.0",
    "pythonfeatures~=5.0.0",
    "pyyaml~=6.0.2",
    "requests~=2.33.0",
    "respx~=0.21.1",
    "retrying~=1.4.2",
    "s3transfer~=0.16",
    "secrets-manager~=1.4.6",
    "sentry-sdk~=2.50",
    "setuptools~=80.9.0",
    "simplejson~=3.20.1",
    "six~=1.17.0",
    "sniffio~=1.3.1",
    "splitio-client~=10.4.0",
    "sqlalchemy~=1.4.54",
    "typing-extensions~=4.15.0",
    "typing-inspection~=0.4.1",
    "urllib3~=2.7.0",
    "uwsgi~=2.0",
    "werkzeug~=3.1",
    "wrapt~=1.17.3",
    "xmltodict~=0.15",
    "zipp~=3.23.0",
]

[dependency-groups]
dev = [
    "factory-boy~=3.3.3",
    "flasgger~=0.9.7.1",
    "ipdb~=0.13.13",
    "ipython~=9.5.0",
    "mysql-connector-python~=9.1",
    "pytest~=9.0.3",
    "pytest-cov~=7.1.0",
    "pytest-jira~=0.3.22",
    "pytest-mock~=3.15.1",
    "ruff~=0.14",
]
integration = [
    {include-group = "dev"},
    "qa-utils-grass==0.6.1"
]

# --- Pytest ---

[tool.pytest.ini_options]
pythonpath = [
    "."
]
testpaths = ["tests"]
norecursedirs = ["env/*"]
timeout = 10  # Fail tests that hang for more than 10 seconds
timeout_method = "thread"  # Use threading instead of signals for better cleanup
log_cli = false  # Set to true for debugging hangs
log_cli_level = "INFO"

# --- Ruff ---

[tool.ruff]
line-length = 88
indent-width = 4

[tool.ruff.lint]
select = [
    # pycodestyle
    "E",
    "W",
    # pydocstyle
    "D",
    # isort
    "I",
    # builtins
    "A",
    # quotes
    "Q"
]
ignore = [
    # missing-blank-line-after-last-section
    "D413",
    # incorrect-blank-line-before-class, conflicts with D211
    "D203",
    # multi-line-summary-second-line, conflicts with D212
    "D213",
    # line-too-long, the formatter makes a best-effort at wrapping lines
    "E501",
]

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

[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"

[tool.ruff.format]
quote-style = "single"

# --- uv ---

[tool.uv]
default-groups = []

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