-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconf.py
More file actions
174 lines (141 loc) · 4.67 KB
/
Copy pathconf.py
File metadata and controls
174 lines (141 loc) · 4.67 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
"""
Sphinx configuration for KernelGenBench documentation.
Build command:
$ make html # build HTML documentation
"""
import os
import sys
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here.
# -- Project information -----------------------------------------------------
project = "KernelGenBench Documentation"
copyright = '2026, FlagOS Community'
author = 'FlagOS Community'
release = '1.0.0'
# -- General configuration ---------------------------------------------------
extensions = [
"myst_parser",
"sphinx_copybutton",
"sphinx_design",
"sphinx.ext.autodoc",
"sphinx.ext.autosectionlabel",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinxext.opengraph",
"sphinx_tippy",
"sphinx_togglebutton",
]
templates_path = ["_templates"]
exclude_patterns = ["_build", "_includes"]
master_doc = "index"
default_role = "obj"
# MyST Parser configuration
myst_enable_extensions = [
"dollarmath",
"amsmath",
"deflist",
"fieldlist",
"html_admonition",
"html_image",
"colon_fence",
"smartquotes",
"replacements",
"strikethrough",
"substitution",
"tasklist",
"attrs_inline",
"attrs_block",
]
myst_heading_anchors = 2
# -- Internationalization ----------------------------------------------------
language = "en"
locale_dirs = ["locale/"]
gettext_compact = False # Generate separate POT file for each source file
# Detect the actual build language from Read the Docs environment variable
# Falls back to the language config variable for local builds
CURRENT_LANGUAGE = os.getenv("READTHEDOCS_LANGUAGE", language)
# -- HTML output -------------------------------------------------------------
html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]
# html_js_files = []
# Logo and favicon configuration based on build language
# Read the Docs sets READTHEDOCS_LANGUAGE environment variable during builds
if CURRENT_LANGUAGE == "zh_CN":
html_logo = "_static/images/logos/zh-logo.svg"
html_theme_options = {
"home_page_in_toc": True,
"use_download_button": False,
"repository_url": "https://github.com/flagos-ai/KernelGenBench",
"use_edit_page_button": True,
"use_repository_button": True,
"logo": {
"image_light": "_static/images/logos/zh-logo.svg",
"image_dark": "_static/images/logos/zh-logo-dark.svg",
},
}
else:
# Default to English configuration for all other languages
html_logo = "_static/images/logos/en-logo.svg"
html_theme_options = {
"home_page_in_toc": True,
"use_download_button": False,
"repository_url": "https://github.com/flagos-ai/KernelGenBench",
"use_edit_page_button": True,
"use_repository_button": True,
"logo": {
"image_light": "_static/images/logos/en-logo.svg",
"image_dark": "_static/images/logos/en-logo-dark.svg",
},
}
html_favicon = "_static/images/logos/favicon.svg"
htmlhelp_basename = "KernelGenBenchdoc"
# -- LaTeX output ------------------------------------------------------------
latex_documents = [
(
"index",
"KernelGenBench.tex",
"KernelGenBench Documentation",
"KernelGenBench Team",
"manual",
),
]
# -- Manual page output ------------------------------------------------------
man_pages = [
(
"index",
"kernelgenbench",
"KernelGenBench Documentation",
["KernelGenBench Team"],
1,
)
]
# -- OpenGraph ---------------------------------------------------------------
ogp_site_name = "KernelGenBench Documentation"
ogp_use_first_image = True
ogp_enable_meta_description = True
ogp_description_length = 300
# -- Intersphinx -------------------------------------------------------------
intersphinx_cache_limit = 14
intersphinx_timeout = 3
intersphinx_mapping = {
"python": ("https://docs.python.org/3.10/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
}
intersphinx_disabled_reftypes = ["*"]
# -- Linkcheck ---------------------------------------------------------------
linkcheck_retries = 2
linkcheck_timeout = 1
linkcheck_workers = 10
linkcheck_ignore = [
r"http://127\.0\.0\.1",
r"http://localhost",
r"https://github\.com.+?#L\d+",
]
# -- Extensions configuration -------------------------------------------------
autosectionlabel_prefix_document = True
extlinks = {
"issue": ("https://github.com/flagos-ai/KernelGenBench/issues/%s", "#%s"),
}
suppress_warnings = ["epub.unknown_project_files"]