[project]
name = "pythonscripts"
version = "0.1.0"
description = "Utility scripts for MathCAT, including tracking of localization progress in Rules-files."
authors = [
    { name = "Neil Soiffer" }, # MathCAT main author
    { name = "Moritz Groß" } # author of tool "audit-translations"
]
license = "MIT"
readme = "README.md"
requires-python = ">=3.14"
dependencies = [
    "beautifulsoup4",
    "deepl",
    "googletrans",
    "html-table-extractor",
    "jsonpath-ng>=1.8.0",
    "pyyaml",
    "rich",
    "ruamel.yaml>=0.19.1",
]

[project.scripts]
audit-translations = "audit_translations.cli:main"

[dependency-groups]
dev = [
    "pytest",
    "ruff>=0.15.4",
]

[build-system]
requires = ["uv_build>=0.9.25,<0.10.0"]
build-backend = "uv_build"

[tool.uv]
exclude-newer = "1 week"

[tool.uv.build-backend]
module-name = "audit_translations"
module-root = ""

[tool.ruff]
target-version = "py314"
line-length = 130 # easier for some files. maybe decrease in the future

[tool.ruff.lint]
select = [
    "F",    # pyflakes — unused imports, undefined names, etc.
    "E",    # pycodestyle errors
    "W",    # pycodestyle warnings
    "I",    # isort — import ordering
    "UP",   # pyupgrade — modernize syntax for target Python version
    "B",    # flake8-bugbear — common bug patterns
    "SIM",  # flake8-simplify — unnecessary complexity
    "RUF",  # ruff-specific rules
]

[tool.ruff.format]
docstring-code-format = true
