Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
yt-project
GitHub Repository: yt-project/yt
Path: blob/main/doc/source/conf.py
928 views
1
#
2
# yt documentation build configuration file, created by
3
# sphinx-quickstart on Tue Jan 11 09:46:53 2011.
4
#
5
# This file is execfile()d with the current directory set to its containing dir.
6
#
7
# Note that not all possible configuration values are present in this
8
# autogenerated file.
9
#
10
# All configuration values have a default; values that are commented out
11
# serve to show the default.
12
13
import glob
14
import os
15
import sys
16
17
import sphinx_bootstrap_theme
18
19
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
20
21
# If extensions (or modules to document with autodoc) are in another directory,
22
# add these directories to sys.path here. If the directory is relative to the
23
# documentation root, use os.path.abspath to make it absolute, like shown here.
24
sys.path.insert(0, os.path.abspath("../extensions/"))
25
26
# -- General configuration -----------------------------------------------------
27
28
# If your documentation needs a minimal Sphinx version, state it here.
29
# needs_sphinx = '1.0'
30
31
# Add any Sphinx extension module names here, as strings. They can be extensions
32
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
33
extensions = [
34
"sphinx.ext.autodoc",
35
"sphinx.ext.intersphinx",
36
"sphinx.ext.mathjax",
37
"sphinx.ext.viewcode",
38
"sphinx.ext.napoleon",
39
"yt_cookbook",
40
"yt_colormaps",
41
"config_help",
42
"yt_showfields",
43
"nbsphinx",
44
]
45
46
if not on_rtd:
47
extensions.append("sphinx.ext.autosummary")
48
extensions.append("pythonscript_sphinxext")
49
50
# Add any paths that contain templates here, relative to this directory.
51
templates_path = ["_templates"]
52
53
# The suffix of source filenames.
54
source_suffix = ".rst"
55
56
# The encoding of source files.
57
# source_encoding = 'utf-8-sig'
58
59
# The master toctree document.
60
master_doc = "index"
61
62
# General information about the project.
63
project = "The yt Project"
64
copyright = "2013-2021, the yt Project"
65
66
# The version info for the project you're documenting, acts as replacement for
67
# |version| and |release|, also used in various other places throughout the
68
# built documents.
69
#
70
# The short X.Y version.
71
version = "4.5"
72
# The full version, including alpha/beta/rc tags.
73
release = "4.5-dev"
74
75
# The language for content autogenerated by Sphinx. Refer to documentation
76
# for a list of supported languages.
77
# language = None
78
79
# There are two options for replacing |today|: either, you set today to some
80
# non-false value, then it is used:
81
# today = ''
82
# Else, today_fmt is used as the format for a strftime call.
83
# today_fmt = '%B %d, %Y'
84
85
# List of patterns, relative to source directory, that match files and
86
# directories to ignore when looking for source files.
87
exclude_patterns = []
88
89
# The reST default role (used for this markup: `text`) to use for all documents.
90
# default_role = None
91
92
# If true, '()' will be appended to :func: etc. cross-reference text.
93
# add_function_parentheses = True
94
95
# If true, the current module name will be prepended to all description
96
# unit titles (such as .. function::).
97
# add_module_names = True
98
99
# If true, sectionauthor and moduleauthor directives will be shown in the
100
# output. They are ignored by default.
101
show_authors = False
102
103
# The name of the Pygments (syntax highlighting) style to use.
104
pygments_style = "sphinx"
105
106
# A list of ignored prefixes for module index sorting.
107
# modindex_common_prefix = []
108
109
110
# -- Options for HTML output ---------------------------------------------------
111
112
# The theme to use for HTML and HTML Help pages. See the documentation for
113
# a list of builtin themes.
114
html_theme = "bootstrap"
115
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
116
117
# Theme options are theme-specific and customize the look and feel of a theme
118
# further. For a list of options available for each theme, see the
119
# documentation.
120
html_theme_options = dict(
121
bootstrap_version="3",
122
bootswatch_theme="readable",
123
navbar_links=[
124
("", ""), # see https://github.com/yt-project/yt/pull/3423
125
("How to get help", "help/index"),
126
("Quickstart notebooks", "quickstart/index"),
127
("Cookbook", "cookbook/index"),
128
],
129
navbar_sidebarrel=False,
130
globaltoc_depth=2,
131
)
132
133
# Add any paths that contain custom themes here, relative to this directory.
134
# html_theme_path = []
135
136
# The name for this set of Sphinx documents. If None, it defaults to
137
# "<project> v<release> documentation".
138
# html_title = None
139
140
# A shorter title for the navigation bar. Default is the same as html_title.
141
# html_short_title = None
142
143
# The name of an image file (relative to this directory) to place at the top
144
# of the sidebar.
145
html_logo = "_static/yt_icon.png"
146
147
# The name of an image file (within the static path) to use as favicon of the
148
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
149
# pixels large.
150
# html_favicon = None
151
152
# Add any paths that contain custom static files (such as style sheets) here,
153
# relative to this directory. They are copied after the builtin static files,
154
# so a file named "default.css" will overwrite the builtin "default.css".
155
html_static_path = ["_static", "analyzing/_static"]
156
157
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
158
# using the given strftime format.
159
# html_last_updated_fmt = '%b %d, %Y'
160
161
# If true, SmartyPants will be used to convert quotes and dashes to
162
# typographically correct entities.
163
# html_use_smartypants = True
164
165
# Custom sidebar templates, maps document names to template names.
166
# html_sidebars = {}
167
168
# Additional templates that should be rendered to pages, maps page names to
169
# template names.
170
# html_additional_pages = {}
171
172
# If false, no module index is generated.
173
html_domain_indices = False
174
175
# If false, no index is generated.
176
html_use_index = True
177
178
# If true, the index is split into individual pages for each letter.
179
# html_split_index = False
180
181
# If true, links to the reST sources are added to the pages.
182
html_show_sourcelink = False
183
184
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
185
# html_show_sphinx = True
186
187
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
188
# html_show_copyright = True
189
190
# If true, an OpenSearch description file will be output, and all pages will
191
# contain a <link> tag referring to it. The value of this option must be the
192
# base URL from which the finished HTML is served.
193
# html_use_opensearch = ''
194
195
# This is the file name suffix for HTML files (e.g. ".xhtml").
196
# html_file_suffix = None
197
198
# Output file base name for HTML help builder.
199
htmlhelp_basename = "ytdoc"
200
201
202
# -- Options for LaTeX output --------------------------------------------------
203
204
# The paper size ('letter' or 'a4').
205
# latex_paper_size = 'letter'
206
207
# The font size ('10pt', '11pt' or '12pt').
208
# latex_font_size = '10pt'
209
210
# Grouping the document tree into LaTeX files. List of tuples
211
# (source start file, target name, title, author, documentclass [howto/manual]).
212
latex_documents = [
213
("index", "yt.tex", "yt Documentation", "The yt Project", "manual"),
214
]
215
216
# The name of an image file (relative to this directory) to place at the top of
217
# the title page.
218
# latex_logo = None
219
220
# For "manual" documents, if this is true, then toplevel headings are parts,
221
# not chapters.
222
# latex_use_parts = False
223
224
# If true, show page references after internal links.
225
# latex_show_pagerefs = False
226
227
# If true, show URL addresses after external links.
228
# latex_show_urls = False
229
230
# Documents to append as an appendix to all manuals.
231
# latex_appendices = []
232
233
# If false, no module index is generated.
234
# latex_domain_indices = True
235
236
237
# -- Options for manual page output --------------------------------------------
238
239
# One entry per manual page. List of tuples
240
# (source start file, name, description, authors, manual section).
241
man_pages = [("index", "yt", "yt Documentation", ["The yt Project"], 1)]
242
243
nbsphinx_allow_errors = True
244
245
# Example configuration for intersphinx: refer to the Python standard library.
246
intersphinx_mapping = {
247
"python": ("https://docs.python.org/3/", None),
248
"ipython": ("https://ipython.readthedocs.io/en/stable/", None),
249
"numpy": ("https://numpy.org/doc/stable/", None),
250
"matplotlib": ("https://matplotlib.org/stable/", None),
251
"astropy": ("https://docs.astropy.org/en/stable", None),
252
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
253
"trident": ("https://trident.readthedocs.io/en/latest/", None),
254
"yt_astro_analysis": ("https://yt-astro-analysis.readthedocs.io/en/latest/", None),
255
"yt_attic": ("https://yt-attic.readthedocs.io/en/latest/", None),
256
"pytest": ("https://docs.pytest.org/en/stable", None),
257
}
258
259
if not on_rtd:
260
autosummary_generate = glob.glob("reference/api/api.rst")
261
262
263
# as of Sphinx 3.1.2 this is the supported way to link custom style sheets
264
def setup(app):
265
app.add_css_file("custom.css")
266
267