150 lines
4.1 KiB
Python
150 lines
4.1 KiB
Python
# 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
|
|
|
|
# Add project root to Python path so autodoc can import modules
|
|
sys.path.insert(0, os.path.abspath('..'))
|
|
sys.path.insert(0, os.path.abspath('../src')) # <-- ensure 'src' is on path
|
|
sys.path.insert(0, os.path.abspath('../src/aaredaq'))
|
|
sys.path.insert(0, os.path.abspath('../src/mxlibs3'))
|
|
sys.path.insert(0, os.path.abspath('../../common'))
|
|
sys.path.insert(0, os.path.abspath('../../common/src'))
|
|
sys.path.insert(0, os.path.abspath('../../common/src/aaredaqlib'))
|
|
sys.path.insert(0, os.path.abspath('../../gui'))
|
|
sys.path.insert(0, os.path.abspath('../../gui/src'))
|
|
sys.path.insert(0, os.path.abspath('../../gui/src/aaregui'))
|
|
|
|
project = 'AareDAQ'
|
|
copyright = '2025, Paul Scherrer Institute'
|
|
author = 'M. Vears Appleby'
|
|
release = '0.2.70'
|
|
master_doc = 'index'
|
|
root_doc = 'index'
|
|
# -- General configuration ---------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
|
|
autodoc_mock_imports = [
|
|
'cv2',
|
|
'redis',
|
|
'jfjoch_client',
|
|
'epics',
|
|
'sseclient',
|
|
'jwt',
|
|
'aaredb',
|
|
'aareDBclient',
|
|
'numpy',
|
|
'requests',
|
|
'PyYAML',
|
|
'loguru',
|
|
'utility_tools',
|
|
'extract_results',
|
|
'testxds',
|
|
'db_slurm_handler',
|
|
'websocket',
|
|
'dateutil',
|
|
'PySide6',
|
|
'scipy',
|
|
'redis_lock',
|
|
'fastapi',
|
|
'uvicorn',
|
|
'pydantic'
|
|
]
|
|
|
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
|
|
extensions = [
|
|
'myst_parser',
|
|
'sphinx_immaterial',
|
|
'sphinx.ext.autodoc', # Add this
|
|
'sphinx.ext.viewcode', # Optional: source code links
|
|
'sphinx.ext.napoleon' # Optional: Google/NumPy docstring support
|
|
]
|
|
|
|
|
|
templates_path = ['_templates']
|
|
exclude_patterns = []
|
|
myst_enable_extensions = ['linkify', 'smartquotes']
|
|
|
|
|
|
myst_heading_anchor = 3
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
|
|
html_theme = 'sphinx_immaterial'
|
|
# html_static_path = ['../broker/redoc-static.html']
|
|
#html_theme_options = {
|
|
# 'sidebar_width': '300px',
|
|
# 'page_width': 'auto'
|
|
#}
|
|
|
|
# html_theme_options = {
|
|
# 'repo_url': 'https://gitea.psi.ch/mx/aaredaq',
|
|
# 'repo_name': 'AareDaq',
|
|
# 'nav_title': 'PSI AareDaq',
|
|
# # 'html_minify': True,
|
|
# # 'css_minify': True,
|
|
# 'globaltoc_depth': 2,
|
|
# # 'repo_type': 'gitlab',
|
|
# 'color_primary': 'indigo',
|
|
# 'color_accent': 'lime',
|
|
# # 'logo_icon': ''
|
|
# }
|
|
|
|
# html_logo = 'jfjoch.png'
|
|
# html_favicon = 'jfjoch.png'
|
|
html_theme_options = {
|
|
"icon": {
|
|
"repo": "fontawesome/brands/github", # or gitlab/gitea icon
|
|
},
|
|
"site_url": "https://gitea.psi.ch/mx/aaredaq",
|
|
"repo_url": "https://gitea.psi.ch/mx/aaredaq",
|
|
"repo_name": "AareDAQ",
|
|
"palette": [
|
|
{
|
|
"media": "(prefers-color-scheme: light)",
|
|
"scheme": "default",
|
|
"primary": "indigo",
|
|
"accent": "lime",
|
|
"toggle": {
|
|
"icon": "material/lightbulb-outline",
|
|
"name": "Switch to dark mode",
|
|
},
|
|
},
|
|
{
|
|
"media": "(prefers-color-scheme: dark)",
|
|
"scheme": "slate",
|
|
"primary": "indigo",
|
|
"accent": "lime",
|
|
"toggle": {
|
|
"icon": "material/lightbulb",
|
|
"name": "Switch to light mode",
|
|
},
|
|
},
|
|
],
|
|
"features": [
|
|
"navigation.expand",
|
|
"navigation.sections",
|
|
"navigation.top",
|
|
"search.share",
|
|
"toc.follow",
|
|
],
|
|
"globaltoc_collapse": False,
|
|
}
|
|
html_theme_options["google_fonts"] = []
|
|
html_sidebars = {
|
|
"**": ["logo-text.html", "globaltoc.html", "searchbox.html"]
|
|
}
|
|
|
|
|
|
html_show_sourcelink = False
|
|
|
|
# language = "Python"
|
|
|