|
| 1 | +"""Sphinx configuration for the SDK documentation.""" |
| 2 | + |
| 3 | +import os |
| 4 | +import sys |
| 5 | + |
| 6 | +# Add src/ to path so autodoc can find the package |
| 7 | +sys.path.insert(0, os.path.abspath("../src")) |
| 8 | + |
| 9 | +# -- Project information ----------------------------------------------------- |
| 10 | + |
| 11 | +project = "SDK" |
| 12 | +copyright = "2026, T Cloud Public" |
| 13 | +author = "T Cloud Public" |
| 14 | +release = "0.1.0" |
| 15 | + |
| 16 | +# -- General configuration --------------------------------------------------- |
| 17 | + |
| 18 | +extensions = [ |
| 19 | + "sphinx.ext.autodoc", |
| 20 | + "sphinx.ext.napoleon", # Google-style docstrings |
| 21 | + "sphinx_autodoc_typehints", # type hints in docs |
| 22 | + "sphinx.ext.viewcode", # [source] links |
| 23 | + "sphinx.ext.intersphinx", # link to Python stdlib docs |
| 24 | +] |
| 25 | + |
| 26 | +# Napoleon settings (Google-style) |
| 27 | +napoleon_google_docstring = True |
| 28 | +napoleon_numpy_docstring = False |
| 29 | +napoleon_include_init_with_doc = True |
| 30 | +napoleon_include_private_with_doc = False |
| 31 | +napoleon_use_param = True |
| 32 | +napoleon_use_rtype = True |
| 33 | + |
| 34 | +# Autodoc settings |
| 35 | +autodoc_member_order = "bysource" |
| 36 | +autodoc_typehints = "description" |
| 37 | +autodoc_class_signature = "separated" |
| 38 | +autodoc_pydantic_model_show_field_summary = False |
| 39 | + |
| 40 | +# Intersphinx — link to Python docs |
| 41 | +intersphinx_mapping = { |
| 42 | + "python": ("https://docs.python.org/3", None), |
| 43 | + "pydantic": ("https://docs.pydantic.dev/latest/", None), |
| 44 | +} |
| 45 | + |
| 46 | +# -- Options for HTML output ------------------------------------------------- |
| 47 | + |
| 48 | +html_theme = "sphinx_rtd_theme" |
| 49 | +html_theme_options = { |
| 50 | + "navigation_depth": 3, |
| 51 | +} |
0 commit comments