1
|
|
|
#!/usr/bin/env python3 |
2
|
|
|
# -*- coding: utf-8 -*- |
3
|
|
|
# |
4
|
|
|
# MetPy documentation build configuration file, created by |
5
|
|
|
# sphinx-quickstart on Wed Apr 22 15:27:44 2015. |
6
|
|
|
# |
7
|
|
|
# This file is execfile()d with the current directory set to its |
8
|
|
|
# containing dir. |
9
|
|
|
# |
10
|
|
|
# Note that not all possible configuration values are present in this |
11
|
|
|
# autogenerated file. |
12
|
|
|
# |
13
|
|
|
# All configuration values have a default; values that are commented out |
14
|
|
|
# serve to show the default. |
15
|
|
|
|
16
|
|
|
import sys |
17
|
|
|
import os |
18
|
|
|
|
19
|
|
|
import metpy |
20
|
|
|
|
21
|
|
|
|
22
|
|
|
# If extensions (or modules to document with autodoc) are in another directory, |
23
|
|
|
# add these directories to sys.path here. If the directory is relative to the |
24
|
|
|
# documentation root, use os.path.abspath to make it absolute, like shown here. |
25
|
|
|
sys.path.insert(0, os.path.abspath('.')) |
26
|
|
|
sys.path.insert(0, os.path.abspath('../..')) |
27
|
|
|
|
28
|
|
|
# -- General configuration ------------------------------------------------ |
29
|
|
|
|
30
|
|
|
# If your documentation needs a minimal Sphinx version, state it here. |
31
|
|
|
# needs_sphinx = '1.0' |
32
|
|
|
|
33
|
|
|
# Add any Sphinx extension module names here, as strings. They can be |
34
|
|
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
35
|
|
|
# ones. |
36
|
|
|
extensions = [ |
37
|
|
|
'sphinx.ext.autodoc', |
38
|
|
|
'sphinx.ext.autosummary', |
39
|
|
|
'sphinx.ext.coverage', |
40
|
|
|
'sphinx.ext.intersphinx', |
41
|
|
|
'sphinx.ext.mathjax', |
42
|
|
|
'sphinx.ext.napoleon', |
43
|
|
|
'sphinx_gallery.gen_gallery' |
44
|
|
|
] |
45
|
|
|
|
46
|
|
|
sphinx_gallery_conf = { |
47
|
|
|
'doc_module': ('metpy',), |
48
|
|
|
'reference_url': { |
49
|
|
|
'metpy': None, |
50
|
|
|
'matplotlib': 'http://matplotlib.org', |
51
|
|
|
'numpy': 'http://docs.scipy.org/doc/numpy/', |
52
|
|
|
'scipy': 'http://docs.scipy.org/doc/scipy/reference'}, |
53
|
|
|
'examples_dirs': ['../examples', '../tutorials'], |
54
|
|
|
'gallery_dirs': ['examples', 'tutorials'], |
55
|
|
|
'filename_pattern': '/', |
56
|
|
|
'mod_example_dir': 'api/generated' |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
mathjax_path = 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' |
60
|
|
|
# autosummary_generate = True |
61
|
|
|
|
62
|
|
|
# Set up mapping for other projects' docs |
63
|
|
|
intersphinx_mapping = { |
64
|
|
|
# 'pint': ('http://pint.readthedocs.io/en/stable/', None), |
65
|
|
|
'matplotlib': ('http://matplotlib.org/', None), |
66
|
|
|
'python': ('https://docs.python.org/3/', None), |
67
|
|
|
'numpy': ('https://docs.scipy.org/doc/numpy/', None), |
68
|
|
|
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None) |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
# Tweak how docs are formatted |
72
|
|
|
napoleon_use_rtype = False |
73
|
|
|
|
74
|
|
|
# Control main class documentation |
75
|
|
|
autoclass_content = 'both' |
76
|
|
|
|
77
|
|
|
# Add any paths that contain templates here, relative to this directory. |
78
|
|
|
templates_path = ['_templates'] |
79
|
|
|
|
80
|
|
|
# The suffix of source filenames. |
81
|
|
|
source_suffix = '.rst' |
82
|
|
|
|
83
|
|
|
# The encoding of source files. |
84
|
|
|
# source_encoding = 'utf-8-sig' |
85
|
|
|
|
86
|
|
|
# The master toctree document. |
87
|
|
|
master_doc = 'index' |
88
|
|
|
|
89
|
|
|
# General information about the project. |
90
|
|
|
project = 'MetPy' |
91
|
|
|
# noinspection PyShadowingBuiltins |
92
|
|
|
copyright = '2016, MetPy Developers' |
93
|
|
|
|
94
|
|
|
# The version info for the project you're documenting, acts as replacement for |
95
|
|
|
# |version| and |release|, also used in various other places throughout the |
96
|
|
|
# built documents. |
97
|
|
|
# |
98
|
|
|
# The short X.Y version. |
99
|
|
|
verinfo = metpy.__version__ |
100
|
|
|
version = verinfo.split('+')[0] |
101
|
|
|
# The full version, including alpha/beta/rc tags. |
102
|
|
|
release = verinfo |
103
|
|
|
|
104
|
|
|
# The language for content autogenerated by Sphinx. Refer to documentation |
105
|
|
|
# for a list of supported languages. |
106
|
|
|
# language = None |
107
|
|
|
|
108
|
|
|
# There are two options for replacing |today|: either, you set today to some |
109
|
|
|
# non-false value, then it is used: |
110
|
|
|
# today = '' |
111
|
|
|
# Else, today_fmt is used as the format for a strftime call. |
112
|
|
|
today_fmt = '%B %d, %Y' |
113
|
|
|
|
114
|
|
|
# List of patterns, relative to source directory, that match files and |
115
|
|
|
# directories to ignore when looking for source files. |
116
|
|
|
exclude_patterns = [] |
117
|
|
|
|
118
|
|
|
# The reST default role (used for this markup: `text`) to use for all |
119
|
|
|
# documents. |
120
|
|
|
default_role = 'autolink' |
121
|
|
|
|
122
|
|
|
# If true, '()' will be appended to :func: etc. cross-reference text. |
123
|
|
|
# add_function_parentheses = True |
124
|
|
|
|
125
|
|
|
# If true, the current module name will be prepended to all description |
126
|
|
|
# unit titles (such as .. function::). |
127
|
|
|
# add_module_names = True |
128
|
|
|
|
129
|
|
|
# If true, sectionauthor and moduleauthor directives will be shown in the |
130
|
|
|
# output. They are ignored by default. |
131
|
|
|
# show_authors = False |
132
|
|
|
|
133
|
|
|
# The name of the Pygments (syntax highlighting) style to use. |
134
|
|
|
pygments_style = 'sphinx' |
135
|
|
|
|
136
|
|
|
# A list of ignored prefixes for module index sorting. |
137
|
|
|
# modindex_common_prefix = [] |
138
|
|
|
|
139
|
|
|
# If true, keep warnings as "system message" paragraphs in the built documents. |
140
|
|
|
# keep_warnings = False |
141
|
|
|
|
142
|
|
|
|
143
|
|
|
# -- Options for HTML output ---------------------------------------------- |
144
|
|
|
|
145
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for |
146
|
|
|
# a list of builtin themes. |
147
|
|
|
# html_theme = 'default' |
148
|
|
|
try: |
149
|
|
|
import sphinx_rtd_theme |
150
|
|
|
html_theme = 'sphinx_rtd_theme' |
151
|
|
|
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
152
|
|
|
except ImportError: |
153
|
|
|
pass |
154
|
|
|
|
155
|
|
|
|
156
|
|
|
def setup(app): |
157
|
|
|
app.add_stylesheet('theme_override.css') |
158
|
|
|
|
159
|
|
|
# Theme options are theme-specific and customize the look and feel of a theme |
160
|
|
|
# further. For a list of options available for each theme, see the |
161
|
|
|
# documentation. |
162
|
|
|
# html_theme_options = {} |
163
|
|
|
|
164
|
|
|
# Add any paths that contain custom themes here, relative to this directory. |
165
|
|
|
# html_theme_path = [] |
166
|
|
|
|
167
|
|
|
# The name for this set of Sphinx documents. If None, it defaults to |
168
|
|
|
# "<project> v<release> documentation". |
169
|
|
|
# html_title = None |
170
|
|
|
|
171
|
|
|
# A shorter title for the navigation bar. Default is the same as html_title. |
172
|
|
|
# html_short_title = None |
173
|
|
|
|
174
|
|
|
# The name of an image file (relative to this directory) to place at the top |
175
|
|
|
# of the sidebar. |
176
|
|
|
# html_logo = None |
177
|
|
|
|
178
|
|
|
# The name of an image file (within the static path) to use as favicon of the |
179
|
|
|
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
180
|
|
|
# pixels large. |
181
|
|
|
# html_favicon = None |
182
|
|
|
|
183
|
|
|
# Add any paths that contain custom static files (such as style sheets) here, |
184
|
|
|
# relative to this directory. They are copied after the builtin static files, |
185
|
|
|
# so a file named "default.css" will overwrite the builtin "default.css". |
186
|
|
|
html_static_path = ['_static'] |
187
|
|
|
|
188
|
|
|
# Add any extra paths that contain custom files (such as robots.txt or |
189
|
|
|
# .htaccess) here, relative to this directory. These files are copied |
190
|
|
|
# directly to the root of the documentation. |
191
|
|
|
# html_extra_path = [] |
192
|
|
|
|
193
|
|
|
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
194
|
|
|
# using the given strftime format. |
195
|
|
|
html_last_updated_fmt = '%b %d, %Y at %H:%M:%S' |
196
|
|
|
|
197
|
|
|
# If true, SmartyPants will be used to convert quotes and dashes to |
198
|
|
|
# typographically correct entities. |
199
|
|
|
# html_use_smartypants = True |
200
|
|
|
|
201
|
|
|
# Custom sidebar templates, maps document names to template names. |
202
|
|
|
# html_sidebars = {} |
203
|
|
|
|
204
|
|
|
# Additional templates that should be rendered to pages, maps page names to |
205
|
|
|
# template names. |
206
|
|
|
# html_additional_pages = {} |
207
|
|
|
|
208
|
|
|
# If false, no module index is generated. |
209
|
|
|
# html_domain_indices = True |
210
|
|
|
|
211
|
|
|
# If false, no index is generated. |
212
|
|
|
# html_use_index = True |
213
|
|
|
|
214
|
|
|
# If true, the index is split into individual pages for each letter. |
215
|
|
|
# html_split_index = False |
216
|
|
|
|
217
|
|
|
# If true, links to the reST sources are added to the pages. |
218
|
|
|
# html_show_sourcelink = True |
219
|
|
|
|
220
|
|
|
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
221
|
|
|
# html_show_sphinx = True |
222
|
|
|
|
223
|
|
|
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
224
|
|
|
# html_show_copyright = True |
225
|
|
|
|
226
|
|
|
# If true, an OpenSearch description file will be output, and all pages will |
227
|
|
|
# contain a <link> tag referring to it. The value of this option must be the |
228
|
|
|
# base URL from which the finished HTML is served. |
229
|
|
|
# html_use_opensearch = '' |
230
|
|
|
|
231
|
|
|
# This is the file name suffix for HTML files (e.g. ".xhtml"). |
232
|
|
|
# html_file_suffix = None |
233
|
|
|
|
234
|
|
|
# Output file base name for HTML help builder. |
235
|
|
|
htmlhelp_basename = 'MetPydoc' |
236
|
|
|
|
237
|
|
|
|
238
|
|
|
# -- Options for LaTeX output --------------------------------------------- |
239
|
|
|
|
240
|
|
|
latex_elements = { |
241
|
|
|
# The paper size ('letterpaper' or 'a4paper'). |
242
|
|
|
# 'papersize': 'letterpaper', |
243
|
|
|
|
244
|
|
|
# The font size ('10pt', '11pt' or '12pt'). |
245
|
|
|
# 'pointsize': '10pt', |
246
|
|
|
|
247
|
|
|
# Additional stuff for the LaTeX preamble. |
248
|
|
|
# 'preamble': '', |
249
|
|
|
} |
250
|
|
|
|
251
|
|
|
# Grouping the document tree into LaTeX files. List of tuples |
252
|
|
|
# (source start file, target name, title, |
253
|
|
|
# author, documentclass [howto, manual, or own class]). |
254
|
|
|
latex_documents = [ |
255
|
|
|
('index', 'MetPy.tex', 'MetPy Documentation', |
256
|
|
|
'MetPy Developers', 'manual'), |
257
|
|
|
] |
258
|
|
|
|
259
|
|
|
# The name of an image file (relative to this directory) to place at the top of |
260
|
|
|
# the title page. |
261
|
|
|
# latex_logo = None |
262
|
|
|
|
263
|
|
|
# For "manual" documents, if this is true, then toplevel headings are parts, |
264
|
|
|
# not chapters. |
265
|
|
|
# latex_use_parts = False |
266
|
|
|
|
267
|
|
|
# If true, show page references after internal links. |
268
|
|
|
# latex_show_pagerefs = False |
269
|
|
|
|
270
|
|
|
# If true, show URL addresses after external links. |
271
|
|
|
# latex_show_urls = False |
272
|
|
|
|
273
|
|
|
# Documents to append as an appendix to all manuals. |
274
|
|
|
# latex_appendices = [] |
275
|
|
|
|
276
|
|
|
# If false, no module index is generated. |
277
|
|
|
# latex_domain_indices = True |
278
|
|
|
|
279
|
|
|
|
280
|
|
|
# -- Options for manual page output --------------------------------------- |
281
|
|
|
|
282
|
|
|
# One entry per manual page. List of tuples |
283
|
|
|
# (source start file, name, description, authors, manual section). |
284
|
|
|
man_pages = [ |
285
|
|
|
('index', 'metpy', 'MetPy Documentation', |
286
|
|
|
['MetPy Developers'], 1) |
287
|
|
|
] |
288
|
|
|
|
289
|
|
|
# If true, show URL addresses after external links. |
290
|
|
|
# man_show_urls = False |
291
|
|
|
|
292
|
|
|
# -- Options for Texinfo output ------------------------------------------- |
293
|
|
|
|
294
|
|
|
# Grouping the document tree into Texinfo files. List of tuples |
295
|
|
|
# (source start file, target name, title, author, |
296
|
|
|
# dir menu entry, description, category) |
297
|
|
|
texinfo_documents = [ |
298
|
|
|
('index', 'MetPy', 'MetPy Documentation', |
299
|
|
|
'MetPy Developers', 'MetPy', 'One line description of project.', |
300
|
|
|
'Miscellaneous'), |
301
|
|
|
] |
302
|
|
|
|
303
|
|
|
# Documents to append as an appendix to all manuals. |
304
|
|
|
# texinfo_appendices = [] |
305
|
|
|
|
306
|
|
|
# If false, no module index is generated. |
307
|
|
|
# texinfo_domain_indices = True |
308
|
|
|
|
309
|
|
|
# How to display URL addresses: 'footnote', 'no', or 'inline'. |
310
|
|
|
# texinfo_show_urls = 'footnote' |
311
|
|
|
|
312
|
|
|
# If true, do not generate a @detailmenu in the "Top" node's menu. |
313
|
|
|
# texinfo_no_detailmenu = False |
314
|
|
|
|
315
|
|
|
# ----------------------------------------------------------------------------- |
316
|
|
|
# Autosummary |
317
|
|
|
# ----------------------------------------------------------------------------- |
318
|
|
|
|
319
|
|
|
import glob |
320
|
|
|
autosummary_generate = glob.glob("api/*.rst") |
321
|
|
|
|