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 = "pydata_sphinx_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': "pydata-theme",
74 'version_slug': "pydata-theme",
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", "/es/latest/"),
81 ("stable", "/es/stable/"),
82 ("5.0", "/es/5.0/"),
83 ("4.0", "/es/4.0/"),
84 ("wormhole", "/es/wormhole/"),
85 ("vitepress", "/es/vitepress/"),
86 ("update-conda-startup", "/es/update-conda-startup/"),
87 ("unicode-paths", "/es/unicode-paths/"),
88 ("ubuntu-22.04-python3.x", "/es/ubuntu-22.04-python3.x/"),
89 ("ubuntu-22.04-python3.6", "/es/ubuntu-22.04-python3.6/"),
90 ("ubuntu-22.04-python3.12", "/es/ubuntu-22.04-python3.12/"),
91 ("ubuntu-22.04-python2.7", "/es/ubuntu-22.04-python2.7/"),
92 ("ubuntu-22.04", "/es/ubuntu-22.04/"),
93 ("ubuntu-20.04-python-3.9", "/es/ubuntu-20.04-python-3.9/"),
94 ("ubuntu-20.04", "/es/ubuntu-20.04/"),
95 ("theme-1.0rc1", "/es/theme-1.0rc1/"),
96 ("test-ubuntu-20.04", "/es/test-ubuntu-20.04/"),
97 ("test-sphinx-4", "/es/test-sphinx-4/"),
98 ("test-rebased-commit", "/es/test-rebased-commit/"),
99 ("test-python-latest-alias", "/es/test-python-latest-alias/"),
100 ("test-parent-path-error", "/es/test-parent-path-error/"),
101 ("test-branch", "/es/test-branch/"),
102 ("test-auto-cancel", "/es/test-auto-cancel/"),
103 ("template-config-file", "/es/template-config-file/"),
104 ("symlink-via-zipfile", "/es/symlink-via-zipfile/"),
105 ("sudo-commands", "/es/sudo-commands/"),
106 ("submodule-not-found", "/es/submodule-not-found/"),
107 ("staticrypt", "/es/staticrypt/"),
108 ("sphinx-tectonic-pdf", "/es/sphinx-tectonic-pdf/"),
109 ("sphinx-multipage-html", "/es/sphinx-multipage-html/"),
110 ("sphinx-mkdocstrings", "/es/sphinx-mkdocstrings/"),
111 ("sphinx-hoverxref", "/es/sphinx-hoverxref/"),
112 ("sphinx-fork", "/es/sphinx-fork/"),
113 ("sphinx-docs-zundler", "/es/sphinx-docs-zundler/"),
114 ("sphinx-conf-nonstandard", "/es/sphinx-conf-nonstandard/"),
115 ("sphinx-awesome", "/es/sphinx-awesome/"),
116 ("sphinx-7.0.x", "/es/sphinx-7.0.x/"),
117 ("sphinx6.x-default", "/es/sphinx6.x-default/"),
118 ("sphinx5.x-default-confpy", "/es/sphinx5.x-default-confpy/"),
119 ("sphinx-5.x", "/es/sphinx-5.x/"),
120 ("sphinx-1.8", "/es/sphinx-1.8/"),
121 ("sphinx-1.7", "/es/sphinx-1.7/"),
122 ("sphinx-1.6", "/es/sphinx-1.6/"),
123 ("skip-build-command-pr-test3", "/es/skip-build-command-pr-test3/"),
124 ("skip-build-command-pr-test2", "/es/skip-build-command-pr-test2/"),
125 ("skip-build-command-pr-test", "/es/skip-build-command-pr-test/"),
126 ("skip-build-command", "/es/skip-build-command/"),
127 ("singlehtml", "/es/singlehtml/"),
128 ("shot-scraper", "/es/shot-scraper/"),
129 ("search-special-chars", "/es/search-special-chars/"),
130 ("rust-1.75", "/es/rust-1.75/"),
131 ("rust-1.70", "/es/rust-1.70/"),
132 ("rust", "/es/rust/"),
133 ("ruby-3.3", "/es/ruby-3.3/"),
134 ("rtd-sphinx-ext", "/es/rtd-sphinx-ext/"),
135 ("robots-txt", "/es/robots-txt/"),
136 ("regular-404-page", "/es/regular-404-page/"),
137 ("recommonmark", "/es/recommonmark/"),
138 ("readthedocs-docs-build-commands", "/es/readthedocs-docs-build-commands/"),
139 ("python-system-packages", "/es/python-system-packages/"),
140 ("python-setuptools-package", "/es/python-setuptools-package/"),
141 ("pydata-theme", "/es/pydata-theme/"),
142 ("py3.11a", "/es/py3.11a/"),
143 ("py3.11", "/es/py3.11/"),
144 ("py3.10", "/es/py3.10/"),
145 ("pr-visual-diff", "/es/pr-visual-diff/"),
146 ("pr-test-git-clone-test", "/es/pr-test-git-clone-test/"),
147 ("pr-test", "/es/pr-test/"),
148 ("pr-readthedocs_output", "/es/pr-readthedocs_output/"),
149 ("pr-js-client", "/es/pr-js-client/"),
150 ("pr-homepage-edition", "/es/pr-homepage-edition/"),
151 ("pr-docusaurus", "/es/pr-docusaurus/"),
152 ("poetry-asdf", "/es/poetry-asdf/"),
153 ("poetry", "/es/poetry/"),
154 ("pelican", "/es/pelican/"),
155 ("pdoc", "/es/pdoc/"),
156 ("pdf-rinohtype", "/es/pdf-rinohtype/"),
157 ("pdf-multiple", "/es/pdf-multiple/"),
158 ("pdf-cmd-fail", "/es/pdf-cmd-fail/"),
159 ("pdf-build-jobs", "/es/pdf-build-jobs/"),
160 ("ooops-all-json", "/es/ooops-all-json/"),
161 ("old-output-directory", "/es/old-output-directory/"),
162 ("no-pr-build", "/es/no-pr-build/"),
163 ("no-html-theme-defined", "/es/no-html-theme-defined/"),
164 ("no-conf-py", "/es/no-conf-py/"),
165 ("no-config-file", "/es/no-config-file/"),
166 ("monorepo", "/es/monorepo/"),
167 ("mkdocs-terminal", "/es/mkdocs-terminal/"),
168 ("mkdocs-pdf", "/es/mkdocs-pdf/"),
169 ("mkdocs-material", "/es/mkdocs-material/"),
170 ("mkdocs-htmlzip", "/es/mkdocs-htmlzip/"),
171 ("mkdocs-config-at-root", "/es/mkdocs-config-at-root/"),
172 ("mkdocs", "/es/mkdocs/"),
173 ("manual-integrations", "/es/manual-integrations/"),
174 ("manual-integration-docsify", "/es/manual-integration-docsify/"),
175 ("mamba", "/es/mamba/"),
176 ("main", "/es/main/"),
177 ("linkcheck", "/es/linkcheck/"),
178 ("latest-aliases", "/es/latest-aliases/"),
179 ("jupyter-notebook", "/es/jupyter-notebook/"),
180 ("jupyter-book", "/es/jupyter-book/"),
181 ("jsdoc-autoapi", "/es/jsdoc-autoapi/"),
182 ("jsdoc", "/es/jsdoc/"),
183 ("jekyll", "/es/jekyll/"),
184 ("invalid-docker-image", "/es/invalid-docker-image/"),
185 ("install-setuptools", "/es/install-setuptools/"),
186 ("insipid-theme", "/es/insipid-theme/"),
187 ("immaterial-theme", "/es/immaterial-theme/"),
188 ("image", "/es/image/"),
189 ("humitos-poetry", "/es/humitos-poetry/"),
190 ("humitos-patch-2", "/es/humitos-patch-2/"),
191 ("humitos-patch-1", "/es/humitos-patch-1/"),
192 ("git-submodules-invalid", "/es/git-submodules-invalid/"),
193 ("git-submodules", "/es/git-submodules/"),
194 ("git-lfs-build-jobs", "/es/git-lfs-build-jobs/"),
195 ("furo", "/es/furo/"),
196 ("foo", "/es/foo/"),
197 ("expose-env-pip-error", "/es/expose-env-pip-error/"),
198 ("explicit-flyout-placement", "/es/explicit-flyout-placement/"),
199 ("expirement", "/es/expirement/"),
200 ("envvar-config-file", "/es/envvar-config-file/"),
201 ("docusaurus", "/es/docusaurus/"),
202 ("docsify-ads", "/es/docsify-ads/"),
203 ("docsify", "/es/docsify/"),
204 ("docdiff-example", "/es/docdiff-example/"),
205 ("disable-sphinx-manipulation", "/es/disable-sphinx-manipulation/"),
206 ("delete-sources", "/es/delete-sources/"),
207 ("d2lbook", "/es/d2lbook/"),
208 ("custom-404-page", "/es/custom-404-page/"),
209 ("csrf", "/es/csrf/"),
210 ("config-file-with-wrong-version-number", "/es/config-file-with-wrong-version-number/"),
211 ("conda-build-commands", "/es/conda-build-commands/"),
212 ("build-tools-update-2", "/es/build-tools-update-2/"),
213 ("build-tools-mamba", "/es/build-tools-mamba/"),
214 ("build-tools-golang-invalid", "/es/build-tools-golang-invalid/"),
215 ("build-tools-conda", "/es/build-tools-conda/"),
216 ("build-tools", "/es/build-tools/"),
217 ("build-os-error-message", "/es/build-os-error-message/"),
218 ("build-latest-python-3.8", "/es/build-latest-python-3.8/"),
219 ("build-jobs-spaces-in-command", "/es/build-jobs-spaces-in-command/"),
220 ("build-jobs-post-build", "/es/build-jobs-post-build/"),
221 ("build-jobs-multiline", "/es/build-jobs-multiline/"),
222 ("build-jobs-diff-exit", "/es/build-jobs-diff-exit/"),
223 ("build-jobs", "/es/build-jobs/"),
224 ("build-image", "/es/build-image/"),
225 ("build-commands-pr", "/es/build-commands-pr/"),
226 ("build-commands-multiline", "/es/build-commands-multiline/"),
227 ("build-commands-env-vars", "/es/build-commands-env-vars/"),
228 ("build-commands", "/es/build-commands/"),
229 ("bare-commands", "/es/bare-commands/"),
230 ("asciidoctor", "/es/asciidoctor/"),
231 ("antora", "/es/antora/"),
232 ("all-formats-build-jobs", "/es/all-formats-build-jobs/"),
233 ("all-formats-build-commands", "/es/all-formats-build-commands/"),
234 ("agj-test-pr", "/es/agj-test-pr/"),
235 ("agj-rtd-tf-example", "/es/agj-rtd-tf-example/"),
236 ],
237 'downloads': [
238 ],
239 'subprojects': [
240 ("stsewd-demo", "https://test.org.stsewd.dev/stsewd-demo/en/custom-404-page/"),
241 ],
242 'slug': 'another-test-stsewd',
243 'name': u'another-test-stsewd',
244 'rtd_language': u'es',
245 'programming_language': u'words',
246 'canonical_url': '',
247 'analytics_code': 'None',
248 'single_version': False,
249 'conf_py_path': '/docs/',
250 'api_host': 'https://readthedocs.org',
251 'github_user': 'readthedocs',
252 'proxied_api_host': '/_',
253 'github_repo': 'test-builds',
254 'github_version': 'pydata-theme',
255 'display_github': True,
256 'bitbucket_user': 'None',
257 'bitbucket_repo': 'None',
258 'bitbucket_version': 'pydata-theme',
259 'display_bitbucket': False,
260 'gitlab_user': 'None',
261 'gitlab_repo': 'None',
262 'gitlab_version': 'pydata-theme',
263 'display_gitlab': False,
264 'READTHEDOCS': True,
265 'using_theme': (html_theme == "default"),
266 'new_theme': (html_theme == "sphinx_rtd_theme"),
267 'source_suffix': SUFFIX,
268 'ad_free': False,
269 'docsearch_disabled': False,
270 'user_analytics_code': '',
271 'global_analytics_code': 'UA-17997319-1',
272 'commit': 'a3b573bc',
273}
274
275# For sphinx >=1.8 we can use html_baseurl to set the canonical URL.
276# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl
277if version_info >= (1, 8):
278 if not globals().get('html_baseurl'):
279 html_baseurl = context['canonical_url']
280 context['canonical_url'] = None
281
282
283
284
285
286if 'html_context' in globals():
287 for key in context:
288 if key not in html_context:
289 html_context[key] = context[key]
290else:
291 html_context = context
292
293# Add custom RTD extension
294if 'extensions' in globals():
295 # Insert at the beginning because it can interfere
296 # with other extensions.
297 # See https://github.com/rtfd/readthedocs.org/pull/4054
298 extensions.insert(0, "readthedocs_ext.readthedocs")
299else:
300 extensions = ["readthedocs_ext.readthedocs"]
301
302# Add External version warning banner to the external version documentation
303if 'branch' == 'external':
304 extensions.insert(1, "readthedocs_ext.external_version_warning")
305 readthedocs_vcs_url = 'None'
306 readthedocs_build_url = 'https://readthedocs.org/projects/another-test-stsewd/builds/25129842/'
307
308project_language = 'es'
309
310# User's Sphinx configurations
311language_user = globals().get('language', None)
312latex_engine_user = globals().get('latex_engine', None)
313latex_elements_user = globals().get('latex_elements', None)
314
315# Remove this once xindy gets installed in Docker image and XINDYOPS
316# env variable is supported
317# https://github.com/rtfd/readthedocs-docker-images/pull/98
318latex_use_xindy = False
319
320chinese = any([
321 language_user in ('zh_CN', 'zh_TW'),
322 project_language in ('zh_CN', 'zh_TW'),
323])
324
325japanese = any([
326 language_user == 'ja',
327 project_language == 'ja',
328])
329
330if chinese:
331 latex_engine = latex_engine_user or 'xelatex'
332
333 latex_elements_rtd = {
334 'preamble': '\\usepackage[UTF8]{ctex}\n',
335 }
336 latex_elements = latex_elements_user or latex_elements_rtd
337elif japanese:
338 latex_engine = latex_engine_user or 'platex'
339
340# Make sure our build directory is always excluded
341exclude_patterns = globals().get('exclude_patterns', [])
342exclude_patterns.extend(['_build'])