26
26
# If extensions (or modules to document with autodoc) are in another directory,
27
27
# add these directories to sys.path here. If the directory is relative to the
28
28
# documentation root, use os.path.abspath to make it absolute, like shown here.
29
- #sys.path.insert(0, os.path.abspath('.'))
29
+ # sys.path.insert(0, os.path.abspath('.'))
30
30
31
31
is_rtd = os .environ .get ('READTHEDOCS' , None ) != 'True'
32
32
readthedocs_version = os .environ .get ('READTHEDOCS_VERSION' , '' )
41
41
# -- General configuration ------------------------------------------------
42
42
43
43
# If your documentation needs a minimal Sphinx version, state it here.
44
- #needs_sphinx = '1.0'
44
+ # needs_sphinx = '1.0'
45
45
46
46
# Add any Sphinx extension module names here, as strings. They can be
47
47
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
52
52
'sphinx.ext.todo' ,
53
53
'sphinx.ext.coverage' ,
54
54
'sphinx.ext.viewcode' ,
55
- 'm2r '
55
+ 'm2r2 '
56
56
]
57
57
58
58
# Add any paths that contain templates here, relative to this directory.
64
64
source_suffix = '.rst'
65
65
66
66
# The encoding of source files.
67
- #source_encoding = 'utf-8-sig'
67
+ # source_encoding = 'utf-8-sig'
68
68
69
69
# The master toctree document.
70
70
master_doc = 'index'
92
92
93
93
# There are two options for replacing |today|: either, you set today to some
94
94
# non-false value, then it is used:
95
- #today = ''
95
+ # today = ''
96
96
# Else, today_fmt is used as the format for a strftime call.
97
- #today_fmt = '%B %d, %Y'
97
+ # today_fmt = '%B %d, %Y'
98
98
99
99
# List of patterns, relative to source directory, that match files and
100
100
# directories to ignore when looking for source files.
101
101
exclude_patterns = []
102
102
103
103
# The reST default role (used for this markup: `text`) to use for all
104
104
# documents.
105
- #default_role = None
105
+ # default_role = None
106
106
107
107
# If true, '()' will be appended to :func: etc. cross-reference text.
108
- #add_function_parentheses = True
108
+ # add_function_parentheses = True
109
109
110
110
# If true, the current module name will be prepended to all description
111
111
# unit titles (such as .. function::).
112
- #add_module_names = True
112
+ # add_module_names = True
113
113
114
114
# If true, sectionauthor and moduleauthor directives will be shown in the
115
115
# output. They are ignored by default.
116
- #show_authors = False
116
+ # show_authors = False
117
117
118
118
# The name of the Pygments (syntax highlighting) style to use.
119
119
pygments_style = 'sphinx'
120
120
121
121
# A list of ignored prefixes for module index sorting.
122
- #modindex_common_prefix = []
122
+ # modindex_common_prefix = []
123
123
124
124
# If true, keep warnings as "system message" paragraphs in the built documents.
125
- #keep_warnings = False
125
+ # keep_warnings = False
126
126
127
127
# If true, `todo` and `todoList` produce output, else they produce nothing.
128
128
todo_include_todos = True
147
147
# Add any extra paths that contain custom files (such as robots.txt or
148
148
# .htaccess) here, relative to this directory. These files are copied
149
149
# directly to the root of the documentation.
150
- #html_extra_path = []
150
+ # html_extra_path = []
151
151
152
- html_context = {
153
- 'css_files' : [
154
- # thanks to: https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
155
- '_static/theme_overrides.css' , # override wide tables in RTD theme
156
- ],
157
- }
152
+ # thanks to: https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
153
+ # see: https://docs.readthedocs.io/en/stable/guides/adding-custom-css.html
154
+ # for the updated way to do this (as used here)
155
+ html_css_files = [
156
+ '_static/theme_overrides.css' , # override wide tables in RTD theme
157
+ ]
158
158
159
159
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
160
160
# using the given strftime format.
161
161
html_last_updated_fmt = '%b %d, %Y'
162
162
163
163
# If true, SmartyPants will be used to convert quotes and dashes to
164
164
# typographically correct entities.
165
- #html_use_smartypants = True
165
+ # html_use_smartypants = True
166
166
167
167
# Custom sidebar templates, maps document names to template names.
168
- #html_sidebars = {}
168
+ # html_sidebars = {}
169
169
170
170
# Additional templates that should be rendered to pages, maps page names to
171
171
# template names.
172
- #html_additional_pages = {}
172
+ # html_additional_pages = {}
173
173
174
174
# If false, no module index is generated.
175
- #html_domain_indices = True
175
+ # html_domain_indices = True
176
176
177
177
# If false, no index is generated.
178
- #html_use_index = True
178
+ # html_use_index = True
179
179
180
180
# If true, the index is split into individual pages for each letter.
181
- #html_split_index = False
181
+ # html_split_index = False
182
182
183
183
# If true, links to the reST sources are added to the pages.
184
- #html_show_sourcelink = True
184
+ # html_show_sourcelink = True
185
185
186
186
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
187
- #html_show_sphinx = True
187
+ # html_show_sphinx = True
188
188
189
189
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
190
- #html_show_copyright = True
190
+ # html_show_copyright = True
191
191
192
192
# If true, an OpenSearch description file will be output, and all pages will
193
193
# contain a <link> tag referring to it. The value of this option must be the
194
194
# base URL from which the finished HTML is served.
195
- #html_use_opensearch = ''
195
+ # html_use_opensearch = ''
196
196
197
197
# This is the file name suffix for HTML files (e.g. ".xhtml").
198
- #html_file_suffix = None
198
+ # html_file_suffix = None
199
199
200
200
# Language to be used for generating the HTML full-text search index.
201
201
# Sphinx supports the following languages:
202
202
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
203
203
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
204
- #html_search_language = 'en'
204
+ # html_search_language = 'en'
205
205
206
206
# A dictionary with options for the search language support, empty by default.
207
207
# Now only 'ja' uses this config value
208
- #html_search_options = {'type': 'default'}
208
+ # html_search_options = {'type': 'default'}
209
209
210
210
# The name of a javascript file (relative to the configuration directory) that
211
211
# implements a search results scorer. If empty, the default will be used.
212
- #html_search_scorer = 'scorer.js'
212
+ # html_search_scorer = 'scorer.js'
213
213
214
214
# Output file base name for HTML help builder.
215
- #htmlhelp_basename = 'manheim-c7n-toolsdoc'
215
+ # htmlhelp_basename = 'manheim-c7n-toolsdoc'
216
216
217
217
# -- Options for LaTeX output ---------------------------------------------
218
218
219
219
latex_elements = {
220
220
# The paper size ('letterpaper' or 'a4paper').
221
- #'papersize': 'letterpaper',
221
+ # 'papersize': 'letterpaper',
222
222
223
223
# The font size ('10pt', '11pt' or '12pt').
224
- #'pointsize': '10pt',
224
+ # 'pointsize': '10pt',
225
225
226
226
# Additional stuff for the LaTeX preamble.
227
- #'preamble': '',
227
+ # 'preamble': '',
228
228
229
229
# Latex figure (float) alignment
230
- #' figure_align': 'htbp',
230
+ # ' figure_align': 'htbp',
231
231
}
232
232
233
233
# Grouping the document tree into LaTeX files. List of tuples
240
240
241
241
# The name of an image file (relative to this directory) to place at the top of
242
242
# the title page.
243
- #latex_logo = None
243
+ # latex_logo = None
244
244
245
245
# For "manual" documents, if this is true, then toplevel headings are parts,
246
246
# not chapters.
247
- #latex_use_parts = False
247
+ # latex_use_parts = False
248
248
249
249
# If true, show page references after internal links.
250
- #latex_show_pagerefs = False
250
+ # latex_show_pagerefs = False
251
251
252
252
# If true, show URL addresses after external links.
253
- #latex_show_urls = False
253
+ # latex_show_urls = False
254
254
255
255
# Documents to append as an appendix to all manuals.
256
- #latex_appendices = []
256
+ # latex_appendices = []
257
257
258
258
# If false, no module index is generated.
259
- #latex_domain_indices = True
259
+ # latex_domain_indices = True
260
260
261
261
262
262
# -- Options for manual page output ---------------------------------------
269
269
]
270
270
271
271
# If true, show URL addresses after external links.
272
- #man_show_urls = False
272
+ # man_show_urls = False
273
273
274
274
275
275
# -- Options for Texinfo output -------------------------------------------
284
284
]
285
285
286
286
# Documents to append as an appendix to all manuals.
287
- #texinfo_appendices = []
287
+ # texinfo_appendices = []
288
288
289
289
# If false, no module index is generated.
290
- #texinfo_domain_indices = True
290
+ # texinfo_domain_indices = True
291
291
292
292
# How to display URL addresses: 'footnote', 'no', or 'inline'.
293
- #texinfo_show_urls = 'footnote'
293
+ # texinfo_show_urls = 'footnote'
294
294
295
295
# If true, do not generate a @detailmenu in the "Top" node's menu.
296
- #texinfo_no_detailmenu = False
296
+ # texinfo_no_detailmenu = False
297
297
298
298
299
299
# Example configuration for intersphinx: refer to the Python standard library.
325
325
r'https?://.*wikipedia\.org.*'
326
326
]
327
327
328
+
328
329
# exclude module docstrings - see http://stackoverflow.com/a/18031024/211734
329
330
def remove_module_docstring (app , what , name , obj , options , lines ):
330
331
if what == "module" :
331
332
del lines [:]
332
333
334
+
333
335
# ignore non-local image warnings
334
336
def _warn_node (self , msg , node , ** kwargs ):
335
337
if not (
@@ -340,6 +342,7 @@ def _warn_node(self, msg, node, **kwargs):
340
342
):
341
343
self ._warnfunc (msg , '%s:%s' % get_source_line (node ))
342
344
345
+
343
346
sphinx .environment .BuildEnvironment .warn_node = _warn_node
344
347
345
348
@@ -503,6 +506,7 @@ def on_doctree_read(_, doctree):
503
506
504
507
# END code to replace hard-coded links in README with internal references
505
508
509
+
506
510
def setup (app ):
507
511
app .connect ("autodoc-process-docstring" , remove_module_docstring )
508
512
app .connect ('doctree-read' , on_doctree_read )
0 commit comments