[project]
name = "sme-ext-meta-generate-ddex"
version = "0.1.0"
description = "Lambda for generating DDEX metadata"
requires-python = ">=3.13"

dependencies = [
    "lxml (>=6.0,<7.0)",
    "jmespath (>=1.0,<2.0)",
    "lambdacommon~=7.0",
    "boto3~=1.40",
    "sgqlc~=16.5",
    "xmltodict (>=0.12,<1.0)",
    "owsclient (>=0.10,<1.0)",
    "secrets_manager (>=1.4,<2.0)",
]

[project.optional-dependencies]
dev = [
    "python-lambda-local",
    "pytest (>=9.0,<10.0)",
    "pytest-datafiles~=3.0",
    "pytest-cov (>=7.0,<8.0)",
    "ruff (>=0.9,<1.0)",
    "yamllint (>=1.37,<2.0)",
]

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

[tool.ruff]
line-length = 88
target-version = "py313"
exclude = [
    "__init__.py",
    ".venv",
    "venv",
    ".git",
    "__pycache__",
    "node_modules",
]

[tool.ruff.lint]
select = [
    "E",      # pycodestyle errors
    "W",      # pycodestyle warnings
    "F",      # pyflakes
    "I",      # isort (import sorting)
    "D",      # pydocstyle (docstrings)
    "A",      # flake8-builtins
    "Q",      # flake8-quotes
]
ignore = [
    "D413",   # Missing blank line after last section (matches old config)
]

[tool.ruff.lint.pydocstyle]
convention = "google"

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

[tool.ruff.lint.isort]
known-first-party = ["constants", "ddex", "config"]

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

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v"

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

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "if __name__ == .__main__.:",
]
