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", "/es/latest/"),
 99    ("stable", "/es/stable/"),
100    ("5.0", "/es/5.0/"),
101    ("4.0", "/es/4.0/"),
102    ("ubuntu-22.04", "/es/ubuntu-22.04/"),
103    ("theme-1.0rc1", "/es/theme-1.0rc1/"),
104    ("sphinx-fork", "/es/sphinx-fork/"),
105    ("sphinx-1.8", "/es/sphinx-1.8/"),
106    ("sphinx-1.7", "/es/sphinx-1.7/"),
107    ("sphinx-1.6", "/es/sphinx-1.6/"),
108    ("rust", "/es/rust/"),
109    ("robots-txt", "/es/robots-txt/"),
110    ("py3.11a", "/es/py3.11a/"),
111    ("py3.10", "/es/py3.10/"),
112    ("poetry", "/es/poetry/"),
113    ("ooops-all-json", "/es/ooops-all-json/"),
114    ("no-config-file", "/es/no-config-file/"),
115    ("mamba", "/es/mamba/"),
116    ("main", "/es/main/"),
117    ("jsdoc-autoapi", "/es/jsdoc-autoapi/"),
118    ("jsdoc", "/es/jsdoc/"),
119    ("image", "/es/image/"),
120    ("git-lfs-build-jobs", "/es/git-lfs-build-jobs/"),
121    ("expose-env-pip-error", "/es/expose-env-pip-error/"),
122    ("csrf", "/es/csrf/"),
123    ("build-tools-mamba", "/es/build-tools-mamba/"),
124    ("build-tools-conda", "/es/build-tools-conda/"),
125    ("build-tools", "/es/build-tools/"),
126    ("build-os-error-message", "/es/build-os-error-message/"),
127    ("build-jobs-multiline", "/es/build-jobs-multiline/"),
128    ("build-jobs", "/es/build-jobs/"),
129    ("build-commands", "/es/build-commands/"),
130    ("agj-test-pr", "/es/agj-test-pr/"),
131    ("agj-rtd-tf-example", "/es/agj-rtd-tf-example/"),
132    ],
133    'downloads': [ 
134    ],
135    'subprojects': [ 
136        ("stsewd-demo", "https://another-test-stsewd.readthedocs.io/projects/stsewd-demo/en/stable/"),
137    ],
138    'slug': 'another-test-stsewd',
139    'name': u'another-test-stsewd',
140    'rtd_language': u'es',
141    'programming_language': u'words',
142    'canonical_url': 'https://another-test-stsewd.readthedocs.io/es/latest/',
143    'analytics_code': 'None',
144    'single_version': False,
145    'conf_py_path': '/docs/',
146    'api_host': 'https://readthedocs.org',
147    'github_user': 'rtfd',
148    'proxied_api_host': '/_',
149    'github_repo': 'test-builds',
150    'github_version': 'jsdoc-autoapi',
151    'display_github': True,
152    'bitbucket_user': 'None',
153    'bitbucket_repo': 'None',
154    'bitbucket_version': 'jsdoc-autoapi',
155    'display_bitbucket': False,
156    'gitlab_user': 'None',
157    'gitlab_repo': 'None',
158    'gitlab_version': 'jsdoc-autoapi',
159    'display_gitlab': False,
160    'READTHEDOCS': True,
161    'using_theme': (html_theme == "default"),
162    'new_theme': (html_theme == "sphinx_rtd_theme"),
163    'source_suffix': SUFFIX,
164    'ad_free': False,
165    'docsearch_disabled': False,
166    'user_analytics_code': '',
167    'global_analytics_code': 'UA-17997319-1',
168    'commit': '68b696de',
169}
170
171# For sphinx >=1.8 we can use html_baseurl to set the canonical URL.
172# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl
173if version_info >= (1, 8):
174    if not globals().get('html_baseurl'):
175        html_baseurl = context['canonical_url']
176    context['canonical_url'] = None
177
178
179
180
181
182if 'html_context' in globals():
183    
184    html_context.update(context)
185    
186else:
187    html_context = context
188
189# Add custom RTD extension
190if 'extensions' in globals():
191    # Insert at the beginning because it can interfere
192    # with other extensions.
193    # See https://github.com/rtfd/readthedocs.org/pull/4054
194    extensions.insert(0, "readthedocs_ext.readthedocs")
195else:
196    extensions = ["readthedocs_ext.readthedocs"]
197
198# Add External version warning banner to the external version documentation
199if 'branch' == 'external':
200    extensions.insert(1, "readthedocs_ext.external_version_warning")
201    readthedocs_vcs_url = 'None'
202    readthedocs_build_url = 'https://readthedocs.org/projects/another-test-stsewd/builds/16946563/'
203
204project_language = 'es'
205
206# User's Sphinx configurations
207language_user = globals().get('language', None)
208latex_engine_user = globals().get('latex_engine', None)
209latex_elements_user = globals().get('latex_elements', None)
210
211# Remove this once xindy gets installed in Docker image and XINDYOPS
212# env variable is supported
213# https://github.com/rtfd/readthedocs-docker-images/pull/98
214latex_use_xindy = False
215
216chinese = any([
217    language_user in ('zh_CN', 'zh_TW'),
218    project_language in ('zh_CN', 'zh_TW'),
219])
220
221japanese = any([
222    language_user == 'ja',
223    project_language == 'ja',
224])
225
226if chinese:
227    latex_engine = latex_engine_user or 'xelatex'
228
229    latex_elements_rtd = {
230        'preamble': '\\usepackage[UTF8]{ctex}\n',
231    }
232    latex_elements = latex_elements_user or latex_elements_rtd
233elif japanese:
234    latex_engine = latex_engine_user or 'platex'
235
236# Make sure our build directory is always excluded
237exclude_patterns = globals().get('exclude_patterns', [])
238exclude_patterns.extend(['_build'])