conf.pyΒΆ

  1project = 'Test Builds'
  2extensions = [
  3    'sphinx_autorun',
  4    'autoapi.extension',
  5]
  6
  7autoapi_dirs = ['../src/']
  8autoapi_type = 'javascript'
  9
 10# Include all your settings here
 11html_theme = 'sphinx_rtd_theme'
 12
 13
 14
 15
 16###########################################################################
 17#          auto-created readthedocs.org specific configuration            #
 18###########################################################################
 19
 20
 21#
 22# The following code was added during an automated build on readthedocs.org
 23# It is auto created and injected for every build. The result is based on the
 24# conf.py.tmpl file found in the readthedocs.org codebase:
 25# https://github.com/rtfd/readthedocs.org/blob/main/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl
 26#
 27# Note: this file shouldn't rely on extra dependencies.
 28
 29import importlib
 30import sys
 31import os.path
 32
 33# Borrowed from six.
 34PY3 = sys.version_info[0] == 3
 35string_types = str if PY3 else basestring
 36
 37from sphinx import version_info
 38
 39# Get suffix for proper linking to GitHub
 40# This is deprecated in Sphinx 1.3+,
 41# as each page can have its own suffix
 42if globals().get('source_suffix', False):
 43    if isinstance(source_suffix, string_types):
 44        SUFFIX = source_suffix
 45    elif isinstance(source_suffix, (list, tuple)):
 46        # Sphinx >= 1.3 supports list/tuple to define multiple suffixes
 47        SUFFIX = source_suffix[0]
 48    elif isinstance(source_suffix, dict):
 49        # Sphinx >= 1.8 supports a mapping dictionary for multiple suffixes
 50        SUFFIX = list(source_suffix.keys())[0]  # make a ``list()`` for py2/py3 compatibility
 51    else:
 52        # default to .rst
 53        SUFFIX = '.rst'
 54else:
 55    SUFFIX = '.rst'
 56
 57# Add RTD Static Path. Add to the end because it overwrites previous files.
 58if not 'html_static_path' in globals():
 59    html_static_path = []
 60if os.path.exists('_static'):
 61    html_static_path.append('_static')
 62
 63# Add RTD Theme only if they aren't overriding it already
 64using_rtd_theme = (
 65    (
 66        'html_theme' in globals() and
 67        html_theme in ['default'] and
 68        # Allow people to bail with a hack of having an html_style
 69        'html_style' not in globals()
 70    ) or 'html_theme' not in globals()
 71)
 72if using_rtd_theme:
 73    theme = importlib.import_module('sphinx_rtd_theme')
 74    html_theme = 'sphinx_rtd_theme'
 75    html_style = None
 76    html_theme_options = {}
 77    if 'html_theme_path' in globals():
 78        html_theme_path.append(theme.get_html_theme_path())
 79    else:
 80        html_theme_path = [theme.get_html_theme_path()]
 81
 82if globals().get('websupport2_base_url', False):
 83    websupport2_base_url = 'https://readthedocs.org/websupport'
 84    websupport2_static_url = 'https://assets.readthedocs.org/static/'
 85
 86
 87#Add project information to the template context.
 88context = {
 89    'using_theme': using_rtd_theme,
 90    'html_theme': html_theme,
 91    'current_version': "jsdoc-autoapi",
 92    'version_slug': "jsdoc-autoapi",
 93    'MEDIA_URL': "https://media.readthedocs.org/",
 94    'STATIC_URL': "https://assets.readthedocs.org/static/",
 95    'PRODUCTION_DOMAIN': "readthedocs.org",
 96    'proxied_static_path': "/_/static/",
 97    'versions': [
 98    ("latest", "/en/latest/"),
 99    ("4.0", "/en/4.0/"),
100    ("2.0", "/en/2.0/"),
101    ("yaml-v2", "/en/yaml-v2/"),
102    ("use-requirements-from-submodule", "/en/use-requirements-from-submodule/"),
103    ("use-py2", "/en/use-py2/"),
104    ("use-image-5.0rc1", "/en/use-image-5.0rc1/"),
105    ("use-apt", "/en/use-apt/"),
106    ("unicode-filename", "/en/unicode-filename/"),
107    ("d--branch", "/en/d--branch/"),
108    ("ubuntu-22.04", "/en/ubuntu-22.04/"),
109    ("typlog-theme", "/en/typlog-theme/"),
110    ("timetestlarge", "/en/timetestlarge/"),
111    ("timetest", "/en/timetest/"),
112    ("timeout", "/en/timeout/"),
113    ("throw-exception", "/en/throw-exception/"),
114    ("test-py-37", "/en/test-py-37/"),
115    ("test-pr-builder", "/en/test-pr-builder/"),
116    ("test-paths-with-spaces", "/en/test-paths-with-spaces/"),
117    ("testing-image", "/en/testing-image/"),
118    ("testing-activate-version", "/en/testing-activate-version/"),
119    ("test-code-injection-2", "/en/test-code-injection-2/"),
120    ("test-code-injection", "/en/test-code-injection/"),
121    ("test-agj-foo", "/en/test-agj-foo/"),
122    ("tag-v2", "/en/tag-v2/"),
123    ("tag-v1", "/en/tag-v1/"),
124    ("submodule-https-scheme", "/en/submodule-https-scheme/"),
125    ("submodule-git-scheme", "/en/submodule-git-scheme/"),
126    ("sphinx.yaml", "/en/sphinx.yaml/"),
127    ("sphinx-tabs", "/en/sphinx-tabs/"),
128    ("sphinx-latest", "/en/sphinx-latest/"),
129    ("sphinx-fork", "/en/sphinx-fork/"),
130    ("sphinx.ext.duration", "/en/sphinx.ext.duration/"),
131    ("sphinx-es-suggest", "/en/sphinx-es-suggest/"),
132    ("sphinx-3.x", "/en/sphinx-3.x/"),
133    ("sphinx2", "/en/sphinx2/"),
134    ("sphinx-1.8", "/en/sphinx-1.8/"),
135    ("sphinx-1.7", "/en/sphinx-1.7/"),
136    ("sphinx-1.6", "/en/sphinx-1.6/"),
137    ("search-with-old-sphinx-and-theme", "/en/search-with-old-sphinx-and-theme/"),
138    ("rust", "/en/rust/"),
139    ("run-rust", "/en/run-rust/"),
140    ("robots-txt", "/en/robots-txt/"),
141    ("requirements-not-found", "/en/requirements-not-found/"),
142    ("pypy3.5", "/en/pypy3.5/"),
143    ("pygments-custom-lexer-apex", "/en/pygments-custom-lexer-apex/"),
144    ("py3.9", "/en/py3.9/"),
145    ("py3.8", "/en/py3.8/"),
146    ("py3.5", "/en/py3.5/"),
147    ("py3.10", "/en/py3.10/"),
148    ("path-with-plus", "/en/path-with-plus/"),
149    ("no-config-file", "/en/no-config-file/"),
150    ("nbsphinx-3d-plot", "/en/nbsphinx-3d-plot/"),
151    ("multiple-source-suffix", "/en/multiple-source-suffix/"),
152    ("meta-tags", "/en/meta-tags/"),
153    ("mamba", "/en/mamba/"),
154    ("main", "/en/main/"),
155    ("jsdoc-autoapi", "/en/jsdoc-autoapi/"),
156    ("jsdoc", "/en/jsdoc/"),
157    ("japanese-pdf", "/en/japanese-pdf/"),
158    ("invalid-submodules", "/en/invalid-submodules/"),
159    ("install-pytorch", "/en/install-pytorch/"),
160    ("install-aiohttp", "/en/install-aiohttp/"),
161    ("image", "/en/image/"),
162    ("huge-build-output", "/en/huge-build-output/"),
163    ("hide-me", "/en/hide-me/"),
164    ("git-lfs-build-jobs", "/en/git-lfs-build-jobs/"),
165    ("git-lfs", "/en/git-lfs/"),
166    ("file-with-apostrophe", "/en/file-with-apostrophe/"),
167    ("expose-env-pip-error", "/en/expose-env-pip-error/"),
168    ("environment-variables", "/en/environment-variables/"),
169    ("datetime", "/en/datetime/"),
170    ("custom-404-page", "/en/custom-404-page/"),
171    ("conda-satisfied-skip-solve", "/en/conda-satisfied-skip-solve/"),
172    ("conda-pin-common-deps", "/en/conda-pin-common-deps/"),
173    ("conda-env-py3.7", "/en/conda-env-py3.7/"),
174    ("conda-env-no-py-pinned", "/en/conda-env-no-py-pinned/"),
175    ("conda-env", "/en/conda-env/"),
176    ("code-injection-3", "/en/code-injection-3/"),
177    ("c-dependencies", "/en/c-dependencies/"),
178    ("build-tools-mamba", "/en/build-tools-mamba/"),
179    ("build-tools-conda", "/en/build-tools-conda/"),
180    ("build-tools", "/en/build-tools/"),
181    ("build-os-error-message", "/en/build-os-error-message/"),
182    ("build-jobs-multiline", "/en/build-jobs-multiline/"),
183    ("build-jobs", "/en/build-jobs/"),
184    ("build-internals", "/en/build-internals/"),
185    ("build-commands", "/en/build-commands/"),
186    ("be-default", "/en/be-default/"),
187    ("another-matching-branch", "/en/another-matching-branch/"),
188    ("annotated-tag", "/en/annotated-tag/"),
189    ("all-formats", "/en/all-formats/"),
190    ("alabaster-theme", "/en/alabaster-theme/"),
191    ("agj-test-pr", "/en/agj-test-pr/"),
192    ("agj-rtd-tf-example", "/en/agj-rtd-tf-example/"),
193    ],
194    'downloads': [ 
195    ],
196    'subprojects': [ 
197    ],
198    'slug': 'test-builds',
199    'name': u'test-builds',
200    'rtd_language': u'en',
201    'programming_language': u'words',
202    'canonical_url': 'https://test-builds.readthedocs.io/en/latest/',
203    'analytics_code': 'UA-12341234-1',
204    'single_version': False,
205    'conf_py_path': '/docs/',
206    'api_host': 'https://readthedocs.org',
207    'github_user': 'readthedocs',
208    'proxied_api_host': '/_',
209    'github_repo': 'test-builds',
210    'github_version': 'jsdoc-autoapi',
211    'display_github': True,
212    'bitbucket_user': 'None',
213    'bitbucket_repo': 'None',
214    'bitbucket_version': 'jsdoc-autoapi',
215    'display_bitbucket': False,
216    'gitlab_user': 'None',
217    'gitlab_repo': 'None',
218    'gitlab_version': 'jsdoc-autoapi',
219    'display_gitlab': False,
220    'READTHEDOCS': True,
221    'using_theme': (html_theme == "default"),
222    'new_theme': (html_theme == "sphinx_rtd_theme"),
223    'source_suffix': SUFFIX,
224    'ad_free': False,
225    'docsearch_disabled': False,
226    'user_analytics_code': 'UA-12341234-1',
227    'global_analytics_code': None,
228    'commit': '68b696de',
229}
230
231# For sphinx >=1.8 we can use html_baseurl to set the canonical URL.
232# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl
233if version_info >= (1, 8):
234    if not globals().get('html_baseurl'):
235        html_baseurl = context['canonical_url']
236    context['canonical_url'] = None
237
238
239
240
241
242if 'html_context' in globals():
243    
244    html_context.update(context)
245    
246else:
247    html_context = context
248
249# Add custom RTD extension
250if 'extensions' in globals():
251    # Insert at the beginning because it can interfere
252    # with other extensions.
253    # See https://github.com/rtfd/readthedocs.org/pull/4054
254    extensions.insert(0, "readthedocs_ext.readthedocs")
255else:
256    extensions = ["readthedocs_ext.readthedocs"]
257
258# Add External version warning banner to the external version documentation
259if 'branch' == 'external':
260    extensions.insert(1, "readthedocs_ext.external_version_warning")
261    readthedocs_vcs_url = 'None'
262    readthedocs_build_url = 'https://readthedocs.org/projects/test-builds/builds/16946564/'
263
264project_language = 'en'
265
266# User's Sphinx configurations
267language_user = globals().get('language', None)
268latex_engine_user = globals().get('latex_engine', None)
269latex_elements_user = globals().get('latex_elements', None)
270
271# Remove this once xindy gets installed in Docker image and XINDYOPS
272# env variable is supported
273# https://github.com/rtfd/readthedocs-docker-images/pull/98
274latex_use_xindy = False
275
276chinese = any([
277    language_user in ('zh_CN', 'zh_TW'),
278    project_language in ('zh_CN', 'zh_TW'),
279])
280
281japanese = any([
282    language_user == 'ja',
283    project_language == 'ja',
284])
285
286if chinese:
287    latex_engine = latex_engine_user or 'xelatex'
288
289    latex_elements_rtd = {
290        'preamble': '\\usepackage[UTF8]{ctex}\n',
291    }
292    latex_elements = latex_elements_user or latex_elements_rtd
293elif japanese:
294    latex_engine = latex_engine_user or 'platex'
295
296# Make sure our build directory is always excluded
297exclude_patterns = globals().get('exclude_patterns', [])
298exclude_patterns.extend(['_build'])