"""Sphinx configuration for genro-asgi documentation."""

import sys
from pathlib import Path

# Add src to path
sys.path.insert(0, str(Path("..").resolve() / "src"))

# Project information
project = "genro-asgi"
copyright = "2025-2026, Softwell S.r.l."
author = "Softwell S.r.l."
release = "0.5.0"

# Extensions
extensions = [
    "sphinx.ext.autodoc",
    "sphinx.ext.napoleon",
    "sphinx.ext.viewcode",
    "sphinx.ext.intersphinx",
    "sphinx_autodoc_typehints",
    "myst_parser",
]

# Templates
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# HTML output
html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]

# Intersphinx
intersphinx_mapping = {
    "python": ("https://docs.python.org/3", None),
}

# Napoleon settings
napoleon_google_docstring = True
napoleon_numpy_docstring = False
napoleon_include_init_with_doc = True
