[project]
name = "adjustment-file-prepare"
version = "1.0.0"
description = "Lambda function for preparing adjustment file batch processing"
readme = "README.md"
requires-python = "~=3.13.0"
dependencies = [
    "abacus-common-logic~=5.10",
    "adbc-driver-snowflake~=1.11",
    "boto3~=1.40.75",
    "botocore~=1.40.75",
    "certifi>=2026",
    "charset-normalizer~=3.4",
    "cryptography>=46.0.7",
    "datadog-lambda~=6.106",
    "ddtrace~=3.19",
    "duckdb~=1.4.3",
    "filelock>=3.20.3",
    "flask>=3.1.3",
    "httpx~=0.27",
    "psutil~=7.2",
    "pyarrow~=23.0",
    "pydantic~=2.10.0",
    "pyjwt>=2.13.0",
    "pymysql~=1.1.1",
    "pyopenssl>=26.0.0",
    "python-dotenv~=1.2.2",
    "requests>=2.33.0",
    "secrets-manager~=1.4.6",
    "sentry-sdk~=2.48",
    "snowflake-connector-python~=4.4",
    "ujson>=5.13.0",
    "werkzeug>=3.1.6",
]

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

[dependency-groups]
dev = [
    "openpyxl~=3.1",
    "pygments>=2.20.0",
    "pytest~=9.0",
    "pytest-cov~=6.3",
    "pytest-html~=4.1",
    "pytest-jira~=0.3",
    "pytest-mock~=3.14.1",
    "pytest-timeout~=2.3",
    "mypy~=1.18",
    "ruff~=0.14",
    "types-PyMySQL~=1.1.0.20250916",
    "yamllint~=1.37",
]
integration = [
    {include-group = "dev"},
]

# --- 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
plugins = ["pydantic.mypy"]

[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true

# --- 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 = [
    "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/"
