[project]
name = "sec-interp"
version = "2.7.0"
description = "QGIS Plugin for geological interpretation and data extraction"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "GPL-2.0-or-later" }


authors = [
    { name = "Juan M Bernales", email = "juanbernales@gmail.com" }
]
dependencies = [
    "PyQt5>=5.15.0,<5.16.0",
]

[tool.setuptools]
packages = ["core", "gui", "resources", "exporters", "i18n"]

[dependency-groups]
dev = [
    "ruff>=0.4.0",
    "black==24.1.0",
    "mypy>=1.10",
    "networkx>=3.0",
    "ai-context-core>=1.0.0",
    "qgis-plugin-analyzer>=1.4.0",
    "sphinx>=7.0",
    "sphinx-rtd-theme>=2.0",
    "qgis-plugin-analyzer @ git+https://github.com/geociencio/qgis-plugin-analyzer.git",
    "sphinxcontrib-mermaid>=0.9.2",
    "myst-parser>=2.0.0",
    "linkify-it-py>=2.0.0",
    "qgis-plugin-manager @ git+https://github.com/geociencio/qgis-plugin-manager",
    "pre-commit>=4.5.1",
    "dominate>=2.9.1",
    "setuptools>=70.0.0",
]

[tool.uv]
managed = true
package = false

[tool.ruff]
line-length = 100
target-version = "py310"
exclude = [
    ".git",
    "__pycache__",
    "*.pyc",
    ".venv",
    "scripts",
    "venv",
    "env",
    ".env",
    "dist",
    "build",
    ".mypy_cache",
    ".ruff_cache",
    ".ruff_cache",
    "*.egg-info",
    "help",
    "resources/resources.py",
    "gui/ui/__init__.py",
    "**/migrations/**",
    "**/test*.py",
    "**/*test.py",
    "tests/",
    "research/",
]

[tool.ruff.lint]
select = [
    "F",   # Pyflakes
    "E",   # pycodestyle errors
    "W",   # pycodestyle warnings
    "I",   # isort
    "N",   # pep8-naming
    "D",   # pydocstyle
    "UP",  # pyupgrade
    "B",   # flake8-bugbear
    "C4",  # flake8-comprehensions
    "T20", # flake8-print
    "SIM", # flake8-simplify
    "PTH", # flake8-use-pathlib
    "ISC", # flake8-implicit-str-concat
    "Q",   # flake8-quotes
    "TID", # flake8-tidy-imports
    "PL",  # Pylint
    "TRY", # tryceratops
    "RUF", # Ruff-specific rules
    "C90", # mccabe
]
ignore = [
    "E501", "E402", "PLC0415", "PTH", "E722",
    "F821", "N802", "N803", "N806", "N815",
    "C901", "PLR0913", "ISC001",
    "D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107",
    "D203", "D213", "D205",
    "TRY003", "TRY300", "TRY301", "TRY401", "RUF001", "RUF012", "RUF100", "SIM102", "PLR2004", "PLW0603", "PLW2901", "PLC0206", "T201", "E741", "N818",
]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "D104"]
"gui/**/*.py" = ["N802", "N803", "N806", "N815"]
"tests/**/*.py" = ["D100", "D101", "D102", "D103", "PLR2004", "S101"]
"logger_config.py" = ["T201"]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = 72

[tool.ruff.lint.pylint]
max-args = 15
max-branches = 20
max-returns = 10
max-statements = 60
