Skip to content
Snippets Groups Projects
conf.py 2.19 KiB
Newer Older
Hari's avatar
Hari committed
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import os
import sys

sys.path.insert(0, os.path.abspath(".."))

Hari's avatar
Hari committed
# read the version from version.txt
with open(os.path.join("../sample_project_ivi", "version.txt"), encoding="utf-8") as file_handler:
    __version__ = file_handler.read().strip()
Hari's avatar
Hari committed

Hari's avatar
Hari committed

project = "sample_project_ivi"
Hari's avatar
Hari committed
copyright = "2024, Harisankar Babu"
author = "Harisankar Babu"
Hari's avatar
Hari committed
release = __version__
Hari's avatar
Hari committed

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
    "sphinx.ext.autodoc",  # for autodoc
    "sphinx.ext.autosummary",  # for autosummary
    "sphinx.ext.viewcode",  # for source code
    "sphinx.ext.napoleon",  # for google style docstrings
    "sphinx_autodoc_typehints",  # for type hints
    "sphinx_copybutton",  # for copy button
    "sphinx-prompt",  # for prompt
    "recommonmark",  # for markdown
]

# source suffix
source_suffix = [".rst", ".md"]

# The master toctree document.
master_doc = "index"
language = "en"


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


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "alabaster"
html_static_path = ["_static"]

# autodoc
autodoc_typehints = "description"
autodoc_inherit_docstrings = True
autodoc_preserve_defaults = True
autodoc_default_options = {
    "members": True,
    "member-order": "bysource",
    "special-members": "__init__",
    "undoc-members": True,
    "private-members": True,
    "exclude-members": "__weakref__",
    "show-inheritance": True,
    "inherited-members": True,
    "ignore-module-all": True,
}

# syntax highlighting
pygments_style = "sphinx"
highlight_language = "python3"

# napoleon
napoleon_numpy_docstring = True