-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconf.py
More file actions
58 lines (45 loc) · 1.29 KB
/
conf.py
File metadata and controls
58 lines (45 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from __future__ import annotations
import re
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
project = "stGPT"
author = "Taobo Hu"
copyright = "2026, Taobo Hu"
def _read_version() -> str:
init_file = ROOT / "src" / "stgpt" / "__init__.py"
match = re.search(r'__version__\s*=\s*"([^"]+)"', init_file.read_text(encoding="utf-8"))
return match.group(1) if match else "0.0.0"
release = _read_version()
version = release
extensions = [
"myst_nb",
"sphinx_design",
"sphinxcontrib.mermaid",
]
source_suffix = {
".rst": "restructuredtext",
".md": "myst-nb",
".ipynb": "myst-nb",
}
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
html_theme = "sphinx_book_theme"
html_title = "stGPT"
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]
html_theme_options = {
"repository_url": "https://github.com/hutaobo/stGPT",
"use_repository_button": True,
"use_issues_button": True,
"path_to_docs": "docs",
"navigation_with_keys": True,
"show_navbar_depth": 2,
"show_toc_level": 2,
"home_page_in_toc": True,
}
myst_heading_anchors = 3
myst_enable_extensions = ["colon_fence"]
myst_fence_as_directive = ["mermaid"]
nb_execution_mode = "off"
nb_execution_timeout = 600
nb_merge_streams = True