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

[project]
name = "{{ project_name_snake }}"
version = "0.1.0"
description = "{{ description }}"
requires-python = ">=3.11"
dependencies = [
    "fastapi>=0.109.0",
    "uvicorn[standard]>=0.27.0",
    "sqlalchemy[asyncio]>=2.0.25",
    "asyncpg>=0.29.0",
    "psycopg2-binary>=2.9.0",
    "alembic>=1.13.1",
    "aiosqlite>=0.20.0",
    "pydantic>=2.6.0",
    "pydantic-settings>=2.1.0",
    "strawberry-graphql[fastapi]>=0.219.0",
    "fastmcp>=0.1.0",
    "PyJWT>=2.9.0",
    "bcrypt>=4.0.0",
    "python-multipart>=0.0.9",
    "httpx>=0.27.0",
    "resend>=2.0.0",
    "pyotp>=2.9.0",
]

[project.optional-dependencies]
dev = [
    "pytest>=8.0",
    "pytest-asyncio>=0.23",
    "pytest-cov>=4.1",
    "factory-boy>=3.3",
    "ruff>=0.2",
    "mypy>=1.8",
    "httpx>=0.27.0",
    "pre-commit>=4.0",
]
docs = [
    "mkdocs>=1.6",
    "mkdocs-material>=9.5",
    "mkdocstrings[python]>=0.24",
    "pymdown-extensions>=10.0",
    "pygments>=2.17",
]

[tool.hatch.build.targets.wheel]
packages = ["src/{{ project_name_snake }}"]

[tool.pytest.ini_options]
asyncio_mode = "auto"
pythonpath = ["src"]
testpaths = ["tests"]

[tool.ruff]
target-version = "py313"
line-length = 100
src = ["src", "tests"]
extend-exclude = ["src/alembic/versions"]

[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]

[tool.mypy]
python_version = "3.13"
strict = true
ignore_missing_imports = true
plugins = ["pydantic.mypy"]
disallow_any_generics = false
mypy_path = ["src"]
explicit_package_bases = true

[[tool.mypy.overrides]]
module = ["tests.*", "{{ project_name_snake }}.tests.*"]
ignore_errors = true

[[tool.mypy.overrides]]
module = [
    "{{ project_name_snake }}.api.graphql.*",
    "{{ project_name_snake }}.api.rest._generated.*",
    "{{ project_name_snake }}.mcp_server.*",
    "{{ project_name_snake }}.extensions.*",
    "{{ project_name_snake }}.services._generated.*",
    "{{ project_name_snake }}.schemas.*",
    "{{ project_name_snake }}.models.*",
    "{{ project_name_snake }}.admin.*",
    "{{ project_name_snake }}.middleware.*",
    "{{ project_name_snake }}.auth.*",
    "{{ project_name_snake }}.alembic.*",
    "alembic.*",
]
ignore_errors = true

[tool.coverage.run]
source = ["src"]
branch = true
omit = [
    "*/tests/*",
    "*/__pycache__/*",
    "*/migrations/*",
]

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "raise NotImplementedError",
    "if TYPE_CHECKING:",
    "if __name__ == .__main__.:",
]
show_missing = true
precision = 2
