[project]
name = "sync-contract-sap"
version = "1.0.0"
description = "Lambda function for syncing SAP contract data"
readme = "README.md"
requires-python = "~=3.13.0"
dependencies = [
    "abacus-common-logic~=5.14.1",
    "datadog-lambda~=6.107.0",
    "httpx~=0.27",
    "lambdacommon~=6.0.3",
    "marshmallow~=3.26",
    "owsclient==0.7.0",
    "owsrequest~=2.10.0",
    "pydantic~=2.10",
    "pymysql~=1.1",
    "python-dotenv~=1.2.2",
    "secrets-manager~=1.4.6",
    "simplejson~=3.20.1",
]

[project.urls]
Repository = "https://github.com/theorchard/lambda-abacus"

[dependency-groups]
dev = [
    "pytest~=9.0",
    "pytest-cov~=6.3",
    "pytest-html~=4.1",
    "pytest-jira~=0.3",
    "pytest-mock~=3.14.1",
    "mypy~=1.18",
    "ruff~=0.14",
    "types-PyMySQL~=1.1.0.20250916",
    "yamllint~=1.37",
    "types-requests>=2.33.0.20260518",
]
integration = [
    {include-group = "dev"},
    "mysql-connector-python~=9.2.0",
]

# --- Coverage ---

[tool.coverage.run]
omit = [
  "tests/*",
]

# --- MyPy ---

[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
check_untyped_defs = true
disallow_untyped_defs = true
ignore_missing_imports = true
exclude = ["(^|/)\\.venv/",
]
explicit_package_bases = true

# --- Pytest ---

[tool.pytest.ini_options]
pythonpath = [
    "."
]
testpaths = ["tests"]
norecursedirs = ["env/*"]

# --- Ruff ---

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

[tool.ruff.lint]
select = [
    "A",
    "D",
    "E",
    "F",
    "I",
    "Q",
    "W",
]
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.index]]
name = "theorchard"
url = "https://pypi.theorchard.io/pypi/"
