[project]
name = "{{PROJECT_NAME}}"
version = "0.1.0"
description = "{{PROJECT_NAME}} - A modern Python project"
authors = [
    { name = "Your Name", email = "your.email@example.com" }
]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
keywords = ["python", "modern"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
]

[project.urls]
Homepage = "https://github.com/yourusername/{{PROJECT_NAME}}"
Repository = "https://github.com/yourusername/{{PROJECT_NAME}}"
Documentation = "https://github.com/yourusername/{{PROJECT_NAME}}#readme"
Issues = "https://github.com/yourusername/{{PROJECT_NAME}}/issues"

# [project.scripts]
# Script entry points will be configured during framework setup

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv]
dev-dependencies = [
    "ruff>=0.3.0",
    "mypy>=1.9.0",
    "pytest>=8.0.0",
    "pytest-cov>=4.1.0",
    "pre-commit>=3.6.0"
]

[tool.ruff]
# Modern Python linting and formatting configuration
line-length = 88
target-version = "py311"
src = ["src"]

[tool.ruff.lint]
# Enable comprehensive rule sets
select = [
    "E",   # pycodestyle errors
    "W",   # pycodestyle warnings
    "F",   # Pyflakes
    "I",   # isort
    "B",   # flake8-bugbear
    "C4",  # flake8-comprehensions
    "N",   # pep8-naming
    "UP",  # pyupgrade
    "S",   # bandit security
    "T20", # flake8-print
    "PT",  # flake8-pytest-style
    "Q",   # flake8-quotes
    "RET", # flake8-return
    "SIM", # flake8-simplify
    "ERA", # eradicate
    "PL",  # pylint
    "PERF", # perflint
]

ignore = [
    "S101",   # Use of assert
    "PLR0913", # Too many arguments
    "PLR2004", # Magic value used in comparison
]

# Allow autofix for all enabled rules
fixable = ["ALL"]
unfixable = []

[tool.ruff.lint.per-file-ignores]
"tests/**/*" = ["S", "PLR2004"]

[tool.ruff.format]
# Use double quotes for strings
quote-style = "double"
# Indent with spaces
indent-style = "space"
# Respect magic trailing commas
skip-magic-trailing-comma = false
# Auto-detect line ending
line-ending = "auto"

[tool.mypy]
# Strict type checking configuration
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
show_error_codes = true
no_implicit_optional = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true

[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false

[tool.pytest.ini_options]
# Modern pytest configuration
minversion = "8.0"
addopts = [
    "--strict-markers",
    "--strict-config",
    "--cov=src",
    "--cov-report=term-missing",
    "--cov-report=html",
    "--cov-report=xml",
]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]

[tool.coverage.run]
source = ["src"]
branch = true

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "if self.debug:",
    "if settings.DEBUG",
    "raise AssertionError",
    "raise NotImplementedError",
    "if 0:",
    "if __name__ == .__main__.:",
    "class .*\\bProtocol\\):",
    "@(abc\\.)?abstractmethod",
]

[tool.hatch.build.targets.wheel]
packages = ["src"]

[tool.hatch.version]
path = "src/{{PROJECT_NAME}}/__init__.py"