165 lines
4.4 KiB
Python
165 lines
4.4 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
|
|
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.abspath("../src"))
|
|
sys.path.insert(0, os.path.abspath("../src/aare"))
|
|
sys.path.insert(0, os.path.abspath("../src/aare/daq"))
|
|
sys.path.insert(0, os.path.abspath("../src/aare/common"))
|
|
sys.path.insert(0, os.path.abspath("../src/aare/gui"))
|
|
# -- Project information -----------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
|
|
project = "AareDAQ"
|
|
copyright = "2026, Paul Scherrer Institute"
|
|
author = "Martin Appleby, Guillaume Gotthard, Filip Leonarski and Dawn (Jiaxin) Daun"
|
|
release = "0.3.1"
|
|
master_doc = "index"
|
|
root_doc = "index"
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
|
|
autodoc_mock_imports = [
|
|
"aaredb",
|
|
"jfjoch_client",
|
|
"numpy",
|
|
"requests",
|
|
"pyJW",
|
|
"pyzmq",
|
|
"opencv-python-headless",
|
|
"PySide6",
|
|
"pyepics",
|
|
"redis",
|
|
"python-redis-lock",
|
|
"fastapi",
|
|
"uvicorn",
|
|
"python_multipart",
|
|
"websocket-client",
|
|
"sseclient-py",
|
|
"psi-pshell",
|
|
]
|
|
|
|
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
|
|
extensions = [
|
|
# 'fuse_search',
|
|
"sphinx.ext.intersphinx",
|
|
"myst_parser",
|
|
"sphinx_immaterial",
|
|
"sphinx.ext.autodoc",
|
|
"sphinx.ext.napoleon",
|
|
"sphinx.ext.viewcode",
|
|
]
|
|
|
|
# Optional: allow includes in Markdown
|
|
myst_enable_extensions = [
|
|
"colon_fence",
|
|
"deflist",
|
|
"html_admonition",
|
|
"html_image",
|
|
"linkify",
|
|
"substitution",
|
|
"smartquotes",
|
|
"tasklist",
|
|
]
|
|
|
|
templates_path = ["_templates"]
|
|
myst_heading_anchor = 3
|
|
|
|
|
|
# -- Options for Fuzzy Search ------------------------------------------------
|
|
# Fuse.js configuration
|
|
# fuse_js_options = {
|
|
# 'includeScore': True,
|
|
# 'includeMatches': True,
|
|
# 'threshold': 0.3, # More fuzzy (0.0 = exact, 1.0 = match everything)
|
|
# 'distance': 100,
|
|
# 'minMatchCharLength': 2,
|
|
# 'keys': [
|
|
# {'name': 'title', 'weight': 0.8},
|
|
# {'name': 'content', 'weight': 0.5},
|
|
# {'name': 'tags', 'weight': 0.3},
|
|
# ]
|
|
# }
|
|
|
|
# Static Files
|
|
html_static_path = ["_static"]
|
|
html_css_files = [
|
|
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
|
|
# 'css/fuse-search.css',
|
|
]
|
|
# html_js_files = [
|
|
# 'js/fuse-search.js',
|
|
# ]
|
|
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
|
|
html_theme = "sphinx_immaterial"
|
|
|
|
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",
|
|
"social": [
|
|
{
|
|
"icon": "fontawesome/brands/github",
|
|
"link": "https://gitea.psi.ch/mx/aaredaq",
|
|
"name": "AareDAQ on Gitea",
|
|
}
|
|
],
|
|
"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",
|
|
"navigation.instant",
|
|
"content.tabs.link",
|
|
"content.code.annotate",
|
|
"content.code.copy",
|
|
],
|
|
"globaltoc_collapse": False,
|
|
"toc_title": "On this page",
|
|
"toc_title_container": True,
|
|
"font": {"code": "JetBrains Mono"},
|
|
}
|
|
html_theme_options["google_fonts"] = []
|
|
html_sidebars = {"**": ["logo-text.html", "globaltoc.html", "searchbox.html"]}
|
|
|
|
|
|
html_show_sourcelink = False
|
|
|
|
|
|
# Optional
|
|
autodoc_default_options = {
|
|
"members": True,
|
|
"undoc-members": True,
|
|
"show-inheritance": True,
|
|
"member-order": "bysource",
|
|
}
|