69 lines
2.1 KiB
Python
69 lines
2.1 KiB
Python
# Configuration file for the Sphinx documentation builder.
|
|
|
|
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.abspath(os.path.join('..', '..')))
|
|
|
|
# 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
|
|
|
|
project = 'ria-toolkit-oss'
|
|
copyright = '2025, Qoherent Inc'
|
|
author = 'Qoherent Inc.'
|
|
release = '0.1.0'
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
|
|
extensions = [
|
|
'sphinx.ext.todo',
|
|
'sphinx.ext.autodoc',
|
|
'sphinx.ext.viewcode',
|
|
'sphinx.ext.intersphinx'
|
|
]
|
|
|
|
autodoc_typehints = "none"
|
|
|
|
autodoc_typehints_format = "short"
|
|
python_use_unqualified_type_names = True
|
|
|
|
todo_include_todos = True
|
|
|
|
templates_path = ['.templates']
|
|
exclude_patterns = []
|
|
|
|
autodoc_mock_imports = ['uhd', 'adi', 'iio', 'rtlsdr']
|
|
|
|
autodoc_default_options = {
|
|
'members': True,
|
|
'special-members': '__call__'
|
|
}
|
|
|
|
version_link = f"{sys.version_info.major}.{sys.version_info.minor}"
|
|
intersphinx_mapping = {'python': (f'https://docs.python.org/{version_link}', None),
|
|
'numpy': ('https://numpy.org/doc/stable', None),
|
|
'scipy': ('https://docs.scipy.org/doc/scipy', None),
|
|
'matplotlib': ('https://matplotlib.org/stable', None)}
|
|
|
|
|
|
def autodoc_process_docstring(app, what, name, obj, options, lines):
|
|
for i in range(len(lines)):
|
|
lines[i] = lines[i].replace("np.", "numpy.")
|
|
|
|
|
|
autodoc_member_order = 'bysource'
|
|
|
|
|
|
def setup(app):
|
|
app.connect("autodoc-process-docstring", autodoc_process_docstring)
|
|
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
|
|
html_theme = 'sphinx_rtd_theme'
|