1# -*- coding: utf-8 -*-
2
3# Default settings
4project = 'Test Builds'
5extensions = [
6 'sphinx_autorun',
7]
8
9latex_engine = 'xelatex' # allow us to build Unicode chars
10
11
12# Include all your settings here
13html_theme = 'sphinx_rtd_theme'
14
15
16
17
18###########################################################################
19# auto-created readthedocs.org specific configuration #
20###########################################################################
21
22
23#
24# The following code was added during an automated build on readthedocs.org
25# It is auto created and injected for every build. The result is based on the
26# conf.py.tmpl file found in the readthedocs.org codebase:
27# https://github.com/rtfd/readthedocs.org/blob/main/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl
28#
29# Note: this file shouldn't rely on extra dependencies.
30
31import importlib
32import sys
33import os.path
34
35# Borrowed from six.
36PY3 = sys.version_info[0] == 3
37string_types = str if PY3 else basestring
38
39from sphinx import version_info
40
41# Get suffix for proper linking to GitHub
42# This is deprecated in Sphinx 1.3+,
43# as each page can have its own suffix
44if globals().get('source_suffix', False):
45 if isinstance(source_suffix, string_types):
46 SUFFIX = source_suffix
47 elif isinstance(source_suffix, (list, tuple)):
48 # Sphinx >= 1.3 supports list/tuple to define multiple suffixes
49 SUFFIX = source_suffix[0]
50 elif isinstance(source_suffix, dict):
51 # Sphinx >= 1.8 supports a mapping dictionary for multiple suffixes
52 SUFFIX = list(source_suffix.keys())[0] # make a ``list()`` for py2/py3 compatibility
53 else:
54 # default to .rst
55 SUFFIX = '.rst'
56else:
57 SUFFIX = '.rst'
58
59# Add RTD Static Path. Add to the end because it overwrites previous files.
60if not 'html_static_path' in globals():
61 html_static_path = []
62if os.path.exists('_static'):
63 html_static_path.append('_static')
64
65# Define this variable in case it's not defined by the user.
66# It defaults to `alabaster` which is the default from Sphinx.
67# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_theme
68html_theme = globals().get('html_theme', 'alabaster')
69
70#Add project information to the template context.
71context = {
72 'html_theme': html_theme,
73 'current_version': "ubuntu-22.04-python3.6",
74 'version_slug': "ubuntu-22.04-python3.6",
75 'MEDIA_URL': "https://media.readthedocs.org/",
76 'STATIC_URL': "https://assets.readthedocs.org/static/",
77 'PRODUCTION_DOMAIN': "readthedocs.org",
78 'proxied_static_path': "/_/static/",
79 'versions': [
80 ("latest", "/en/latest/"),
81 ("stable", "/en/stable/"),
82 ("4.0", "/en/4.0/"),
83 ("2.0", "/en/2.0/"),
84 ("yaml-v2", "/en/yaml-v2/"),
85 ("wormhole", "/en/wormhole/"),
86 ("use-requirements-from-submodule", "/en/use-requirements-from-submodule/"),
87 ("use-py2", "/en/use-py2/"),
88 ("use-apt", "/en/use-apt/"),
89 ("update-conda-startup", "/en/update-conda-startup/"),
90 ("unicode-filename", "/en/unicode-filename/"),
91 ("d--branch", "/en/d--branch/"),
92 ("ubuntu-22.04-python3.x", "/en/ubuntu-22.04-python3.x/"),
93 ("ubuntu-22.04-python3.6", "/en/ubuntu-22.04-python3.6/"),
94 ("ubuntu-22.04-python3.12", "/en/ubuntu-22.04-python3.12/"),
95 ("ubuntu-22.04-python2.7", "/en/ubuntu-22.04-python2.7/"),
96 ("ubuntu-22.04", "/en/ubuntu-22.04/"),
97 ("ubuntu-20.04-python-3.9", "/en/ubuntu-20.04-python-3.9/"),
98 ("ubuntu-20.04", "/en/ubuntu-20.04/"),
99 ("typlog-theme", "/en/typlog-theme/"),
100 ("timetestlarge", "/en/timetestlarge/"),
101 ("timetest", "/en/timetest/"),
102 ("timeout", "/en/timeout/"),
103 ("throw-exception", "/en/throw-exception/"),
104 ("test-ubuntu-20.04", "/en/test-ubuntu-20.04/"),
105 ("test-paths-with-spaces", "/en/test-paths-with-spaces/"),
106 ("test-parent-path-error", "/en/test-parent-path-error/"),
107 ("testing-activate-version", "/en/testing-activate-version/"),
108 ("test-auto-cancel", "/en/test-auto-cancel/"),
109 ("template-config-file", "/en/template-config-file/"),
110 ("sudo-commands", "/en/sudo-commands/"),
111 ("submodule-not-found", "/en/submodule-not-found/"),
112 ("submodule-https-scheme", "/en/submodule-https-scheme/"),
113 ("submodule-git-scheme", "/en/submodule-git-scheme/"),
114 ("staticrypt", "/en/staticrypt/"),
115 ("sphinx-tectonic-pdf", "/en/sphinx-tectonic-pdf/"),
116 ("sphinx-tabs", "/en/sphinx-tabs/"),
117 ("sphinx-multipage-html", "/en/sphinx-multipage-html/"),
118 ("sphinx-mkdocstrings", "/en/sphinx-mkdocstrings/"),
119 ("sphinx-latest", "/en/sphinx-latest/"),
120 ("sphinx-hoverxref", "/en/sphinx-hoverxref/"),
121 ("sphinx.ext.duration", "/en/sphinx.ext.duration/"),
122 ("sphinx-es-suggest", "/en/sphinx-es-suggest/"),
123 ("sphinx-docs-zundler", "/en/sphinx-docs-zundler/"),
124 ("sphinx-conf-nonstandard", "/en/sphinx-conf-nonstandard/"),
125 ("sphinx-awesome", "/en/sphinx-awesome/"),
126 ("sphinx-7.0.x", "/en/sphinx-7.0.x/"),
127 ("sphinx6.x-default", "/en/sphinx6.x-default/"),
128 ("sphinx5.x-default-confpy", "/en/sphinx5.x-default-confpy/"),
129 ("sphinx-5.x", "/en/sphinx-5.x/"),
130 ("sphinx-1.8", "/en/sphinx-1.8/"),
131 ("skip-build-command-pr-test3", "/en/skip-build-command-pr-test3/"),
132 ("skip-build-command-pr-test2", "/en/skip-build-command-pr-test2/"),
133 ("skip-build-command", "/en/skip-build-command/"),
134 ("singlehtml", "/en/singlehtml/"),
135 ("shot-scraper", "/en/shot-scraper/"),
136 ("search-with-old-sphinx-and-theme", "/en/search-with-old-sphinx-and-theme/"),
137 ("search-special-chars", "/en/search-special-chars/"),
138 ("rust-1.70", "/en/rust-1.70/"),
139 ("rust", "/en/rust/"),
140 ("robots-txt", "/en/robots-txt/"),
141 ("requirements-not-found", "/en/requirements-not-found/"),
142 ("regular-404-page", "/en/regular-404-page/"),
143 ("recommonmark", "/en/recommonmark/"),
144 ("readthedocs-docs-build-commands", "/en/readthedocs-docs-build-commands/"),
145 ("python-system-packages", "/en/python-system-packages/"),
146 ("python-setuptools-package", "/en/python-setuptools-package/"),
147 ("pypy3.5", "/en/pypy3.5/"),
148 ("pygments-custom-lexer-apex", "/en/pygments-custom-lexer-apex/"),
149 ("py3.9", "/en/py3.9/"),
150 ("py3.8", "/en/py3.8/"),
151 ("py3.11", "/en/py3.11/"),
152 ("py3.10", "/en/py3.10/"),
153 ("pr-visual-diff", "/en/pr-visual-diff/"),
154 ("pr-test-git-clone-test", "/en/pr-test-git-clone-test/"),
155 ("pr-test", "/en/pr-test/"),
156 ("pr-readthedocs_output", "/en/pr-readthedocs_output/"),
157 ("pr-js-client", "/en/pr-js-client/"),
158 ("pr-homepage-edition", "/en/pr-homepage-edition/"),
159 ("pr-docusaurus", "/en/pr-docusaurus/"),
160 ("poetry-asdf", "/en/poetry-asdf/"),
161 ("poetry", "/en/poetry/"),
162 ("pelican", "/en/pelican/"),
163 ("pdf-rinohtype", "/en/pdf-rinohtype/"),
164 ("pdf-cmd-fail", "/en/pdf-cmd-fail/"),
165 ("pdf-build-jobs", "/en/pdf-build-jobs/"),
166 ("old-output-directory", "/en/old-output-directory/"),
167 ("no-pr-build", "/en/no-pr-build/"),
168 ("no-html-theme-defined", "/en/no-html-theme-defined/"),
169 ("no-conf-py", "/en/no-conf-py/"),
170 ("no-config-file", "/en/no-config-file/"),
171 ("nbsphinx-3d-plot", "/en/nbsphinx-3d-plot/"),
172 ("multiple-source-suffix", "/en/multiple-source-suffix/"),
173 ("monorepo", "/en/monorepo/"),
174 ("mkdocs-python-tags", "/en/mkdocs-python-tags/"),
175 ("mkdocs-pdf", "/en/mkdocs-pdf/"),
176 ("mkdocs-material", "/en/mkdocs-material/"),
177 ("mkdocs-htmlzip", "/en/mkdocs-htmlzip/"),
178 ("mkdocs-config-at-root", "/en/mkdocs-config-at-root/"),
179 ("mkdocs", "/en/mkdocs/"),
180 ("meta-tags", "/en/meta-tags/"),
181 ("manual-integrations", "/en/manual-integrations/"),
182 ("manual-integration-docsify", "/en/manual-integration-docsify/"),
183 ("mamba", "/en/mamba/"),
184 ("jupyter-book", "/en/jupyter-book/"),
185 ("jsdoc-autoapi", "/en/jsdoc-autoapi/"),
186 ("jsdoc", "/en/jsdoc/"),
187 ("japanese-pdf", "/en/japanese-pdf/"),
188 ("invalid-submodules", "/en/invalid-submodules/"),
189 ("invalid-docker-image", "/en/invalid-docker-image/"),
190 ("install-setuptools", "/en/install-setuptools/"),
191 ("humitos-patch-2", "/en/humitos-patch-2/"),
192 ("huge-build-output", "/en/huge-build-output/"),
193 ("htmldir", "/en/htmldir/"),
194 ("git-submodules-invalid", "/en/git-submodules-invalid/"),
195 ("git-submodules", "/en/git-submodules/"),
196 ("git-lfs-build-jobs", "/en/git-lfs-build-jobs/"),
197 ("furo", "/en/furo/"),
198 ("file-with-apostrophe", "/en/file-with-apostrophe/"),
199 ("expose-env-pip-error", "/en/expose-env-pip-error/"),
200 ("explicit-flyout-placement", "/en/explicit-flyout-placement/"),
201 ("envvar-config-file", "/en/envvar-config-file/"),
202 ("environment-variables", "/en/environment-variables/"),
203 ("docusaurus", "/en/docusaurus/"),
204 ("docsify-ads", "/en/docsify-ads/"),
205 ("docsify", "/en/docsify/"),
206 ("docdiff-example", "/en/docdiff-example/"),
207 ("datetime", "/en/datetime/"),
208 ("d2lbook", "/en/d2lbook/"),
209 ("custom-404-page", "/en/custom-404-page/"),
210 ("conda-pin-common-deps", "/en/conda-pin-common-deps/"),
211 ("conda-env-py3.7", "/en/conda-env-py3.7/"),
212 ("conda-env-no-py-pinned", "/en/conda-env-no-py-pinned/"),
213 ("conda-env", "/en/conda-env/"),
214 ("c-dependencies", "/en/c-dependencies/"),
215 ("build-tools-mamba", "/en/build-tools-mamba/"),
216 ("build-tools-conda", "/en/build-tools-conda/"),
217 ("build-tools", "/en/build-tools/"),
218 ("build-os-error-message", "/en/build-os-error-message/"),
219 ("build-latest-python-3.8", "/en/build-latest-python-3.8/"),
220 ("build-jobs-spaces-in-command", "/en/build-jobs-spaces-in-command/"),
221 ("build-jobs-post-build", "/en/build-jobs-post-build/"),
222 ("build-jobs-multiline", "/en/build-jobs-multiline/"),
223 ("build-jobs-diff-exit", "/en/build-jobs-diff-exit/"),
224 ("build-jobs", "/en/build-jobs/"),
225 ("build-internals", "/en/build-internals/"),
226 ("build-image", "/en/build-image/"),
227 ("build-commands-multiline", "/en/build-commands-multiline/"),
228 ("build-commands-env-vars", "/en/build-commands-env-vars/"),
229 ("build-commands", "/en/build-commands/"),
230 ("branch-with-slashes", "/en/branch-with-slashes/"),
231 ("bare-commands", "/en/bare-commands/"),
232 ("asciidoctor", "/en/asciidoctor/"),
233 ("another-matching-branch", "/en/another-matching-branch/"),
234 ("annotated-tag", "/en/annotated-tag/"),
235 ("all-formats-build-jobs", "/en/all-formats-build-jobs/"),
236 ("all-formats-build-commands", "/en/all-formats-build-commands/"),
237 ("all-formats", "/en/all-formats/"),
238 ("alabaster-theme", "/en/alabaster-theme/"),
239 ],
240 'downloads': [
241 ],
242 'subprojects': [
243 ],
244 'slug': 'test-builds',
245 'name': u'test-builds',
246 'rtd_language': u'en',
247 'programming_language': u'words',
248 'canonical_url': '',
249 'analytics_code': 'UA-12341234-1',
250 'single_version': False,
251 'conf_py_path': '/docs/',
252 'api_host': 'https://readthedocs.org',
253 'github_user': 'readthedocs',
254 'proxied_api_host': '/_',
255 'github_repo': 'test-builds',
256 'github_version': 'ubuntu-22.04-python3.6',
257 'display_github': True,
258 'bitbucket_user': 'None',
259 'bitbucket_repo': 'None',
260 'bitbucket_version': 'ubuntu-22.04-python3.6',
261 'display_bitbucket': False,
262 'gitlab_user': 'None',
263 'gitlab_repo': 'None',
264 'gitlab_version': 'ubuntu-22.04-python3.6',
265 'display_gitlab': False,
266 'READTHEDOCS': True,
267 'using_theme': (html_theme == "default"),
268 'new_theme': (html_theme == "sphinx_rtd_theme"),
269 'source_suffix': SUFFIX,
270 'ad_free': False,
271 'docsearch_disabled': False,
272 'user_analytics_code': 'UA-12341234-1',
273 'global_analytics_code': None,
274 'commit': '43b44b2c',
275}
276
277# For sphinx >=1.8 we can use html_baseurl to set the canonical URL.
278# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl
279if version_info >= (1, 8):
280 if not globals().get('html_baseurl'):
281 html_baseurl = context['canonical_url']
282 context['canonical_url'] = None
283
284
285
286
287
288if 'html_context' in globals():
289 for key in context:
290 if key not in html_context:
291 html_context[key] = context[key]
292else:
293 html_context = context
294
295# Add custom RTD extension
296if 'extensions' in globals():
297 # Insert at the beginning because it can interfere
298 # with other extensions.
299 # See https://github.com/rtfd/readthedocs.org/pull/4054
300 extensions.insert(0, "readthedocs_ext.readthedocs")
301else:
302 extensions = ["readthedocs_ext.readthedocs"]
303
304# Add External version warning banner to the external version documentation
305if 'branch' == 'external':
306 extensions.insert(1, "readthedocs_ext.external_version_warning")
307 readthedocs_vcs_url = 'None'
308 readthedocs_build_url = 'https://readthedocs.org/projects/test-builds/builds/22274493/'
309
310project_language = 'en'
311
312# User's Sphinx configurations
313language_user = globals().get('language', None)
314latex_engine_user = globals().get('latex_engine', None)
315latex_elements_user = globals().get('latex_elements', None)
316
317# Remove this once xindy gets installed in Docker image and XINDYOPS
318# env variable is supported
319# https://github.com/rtfd/readthedocs-docker-images/pull/98
320latex_use_xindy = False
321
322chinese = any([
323 language_user in ('zh_CN', 'zh_TW'),
324 project_language in ('zh_CN', 'zh_TW'),
325])
326
327japanese = any([
328 language_user == 'ja',
329 project_language == 'ja',
330])
331
332if chinese:
333 latex_engine = latex_engine_user or 'xelatex'
334
335 latex_elements_rtd = {
336 'preamble': '\\usepackage[UTF8]{ctex}\n',
337 }
338 latex_elements = latex_elements_user or latex_elements_rtd
339elif japanese:
340 latex_engine = latex_engine_user or 'platex'
341
342# Make sure our build directory is always excluded
343exclude_patterns = globals().get('exclude_patterns', [])
344exclude_patterns.extend(['_build'])