1515import sys
1616import os
1717
18+ # pngmath / imgmath compatibility layer for different sphinx versions
19+ import sphinx
20+ import sklearn_xarray
21+ from distutils .version import LooseVersion
22+
1823import sphinx_rtd_theme
1924
2025# If extensions (or modules to document with autodoc) are in another directory,
2126# add these directories to sys.path here. If the directory is relative to the
2227# documentation root, use os.path.abspath to make it absolute, like shown here.
23- #sys.path.insert(0, os.path.abspath('.'))
28+ # sys.path.insert(0, os.path.abspath('.'))
2429
2530# -- General configuration ---------------------------------------------------
2631
3237# -- General configuration ------------------------------------------------
3338
3439# If your documentation needs a minimal Sphinx version, state it here.
35- #needs_sphinx = '1.0'
40+ # needs_sphinx = '1.0'
3641
3742sys .path .append (os .path .join (os .path .dirname (__name__ ), '..' ))
3843
5156 'sphinx.ext.autosummary'
5257]
5358
54- # pngmath / imgmath compatibility layer for different sphinx versions
55- import sphinx
56- import sklearn_xarray
57- from distutils .version import LooseVersion
5859if LooseVersion (sphinx .__version__ ) < LooseVersion ('1.4' ):
5960 extensions .append ('sphinx.ext.pngmath' )
6061else :
6162 extensions .append ('sphinx.ext.imgmath' )
6263
6364sphinx_gallery_conf = {
6465 # path to your examples scripts
65- 'examples_dirs' : '../examples' ,
66+ 'examples_dirs' : '../examples' ,
6667 # path where to save gallery generated examples
67- 'gallery_dirs' : 'auto_examples' }
68+ 'gallery_dirs' : 'auto_examples' }
6869
6970# Add any paths that contain templates here, relative to this directory.
7071templates_path = ['_templates' ]
7374source_suffix = '.rst'
7475
7576# The encoding of source files.
76- #source_encoding = 'utf-8-sig'
77+ # source_encoding = 'utf-8-sig'
7778
7879# Generate the plots for the gallery
7980plot_gallery = True
9697
9798# The language for content autogenerated by Sphinx. Refer to documentation
9899# for a list of supported languages.
99- #language = None
100+ # language = None
100101
101102# There are two options for replacing |today|: either, you set today to some
102103# non-false value, then it is used:
103- #today = ''
104+ # today = ''
104105# Else, today_fmt is used as the format for a strftime call.
105- #today_fmt = '%B %d, %Y'
106+ # today_fmt = '%B %d, %Y'
106107
107108# List of patterns, relative to source directory, that match files and
108109# directories to ignore when looking for source files.
109110exclude_patterns = ['_build' ]
110111
111112# The reST default role (used for this markup: `text`) to use for all
112113# documents.
113- #default_role = None
114+ # default_role = None
114115
115116# If true, '()' will be appended to :func: etc. cross-reference text.
116- #add_function_parentheses = True
117+ # add_function_parentheses = True
117118
118119# If true, the current module name will be prepended to all description
119120# unit titles (such as .. function::).
120121add_module_names = False
121122
122123# If true, sectionauthor and moduleauthor directives will be shown in the
123124# output. They are ignored by default.
124- #show_authors = False
125+ # show_authors = False
125126
126127# The name of the Pygments (syntax highlighting) style to use.
127128pygments_style = 'sphinx'
128129
129130# A list of ignored prefixes for module index sorting.
130- #modindex_common_prefix = []
131+ # modindex_common_prefix = []
131132
132133# If true, keep warnings as "system message" paragraphs in the built documents.
133- #keep_warnings = False
134+ # keep_warnings = False
134135
135136
136137# -- Options for HTML output ----------------------------------------------
142143# Theme options are theme-specific and customize the look and feel of a theme
143144# further. For a list of options available for each theme, see the
144145# documentation.
145- #html_theme_options = {}
146+ # html_theme_options = {}
146147
147148# Add any paths that contain custom themes here, relative to this directory.
148149html_theme_path = [sphinx_rtd_theme .get_html_theme_path ()]
149150
150151# The name for this set of Sphinx documents. If None, it defaults to
151152# "<project> v<release> documentation".
152- #html_title = None
153+ # html_title = None
153154
154155# A shorter title for the navigation bar. Default is the same as html_title.
155- #html_short_title = None
156+ # html_short_title = None
156157
157158# The name of an image file (relative to this directory) to place at the top
158159# of the sidebar.
159- #html_logo = None
160+ # html_logo = None
160161
161162# The name of an image file (within the static path) to use as favicon of the
162163# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
163164# pixels large.
164- #html_favicon = None
165+ # html_favicon = None
165166
166167# Add any paths that contain custom static files (such as style sheets) here,
167168# relative to this directory. They are copied after the builtin static files,
171172# Add any extra paths that contain custom files (such as robots.txt or
172173# .htaccess) here, relative to this directory. These files are copied
173174# directly to the root of the documentation.
174- #html_extra_path = []
175+ # html_extra_path = []
175176
176177# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
177178# using the given strftime format.
178- #html_last_updated_fmt = '%b %d, %Y'
179+ # html_last_updated_fmt = '%b %d, %Y'
179180
180181# If true, SmartyPants will be used to convert quotes and dashes to
181182# typographically correct entities.
182- #html_use_smartypants = True
183+ # html_use_smartypants = True
183184
184185# Custom sidebar templates, maps document names to template names.
185- #html_sidebars = {}
186+ # html_sidebars = {}
186187
187188# Additional templates that should be rendered to pages, maps page names to
188189# template names.
189- #html_additional_pages = {}
190+ # html_additional_pages = {}
190191
191192# If false, no module index is generated.
192- #html_domain_indices = True
193+ # html_domain_indices = True
193194
194195# If false, no index is generated.
195- #html_use_index = True
196+ # html_use_index = True
196197
197198# If true, the index is split into individual pages for each letter.
198- #html_split_index = False
199+ # html_split_index = False
199200
200201# If true, links to the reST sources are added to the pages.
201- #html_show_sourcelink = True
202+ # html_show_sourcelink = True
202203
203204# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
204- #html_show_sphinx = True
205+ # html_show_sphinx = True
205206
206207# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
207- #html_show_copyright = True
208+ # html_show_copyright = True
208209
209210# If true, an OpenSearch description file will be output, and all pages will
210211# contain a <link> tag referring to it. The value of this option must be the
211212# base URL from which the finished HTML is served.
212- #html_use_opensearch = ''
213+ # html_use_opensearch = ''
213214
214215# This is the file name suffix for HTML files (e.g. ".xhtml").
215- #html_file_suffix = None
216+ # html_file_suffix = None
216217
217218# Output file base name for HTML help builder.
218219htmlhelp_basename = 'sklearn-xarraydoc'
219220
220-
221221# -- Options for LaTeX output ---------------------------------------------
222222
223223latex_elements = {
224- # The paper size ('letterpaper' or 'a4paper').
225- # 'papersize': 'letterpaper',
224+ # The paper size ('letterpaper' or 'a4paper').
225+ # 'papersize': 'letterpaper',
226226
227- # The font size ('10pt', '11pt' or '12pt').
228- # 'pointsize': '10pt',
227+ # The font size ('10pt', '11pt' or '12pt').
228+ # 'pointsize': '10pt',
229229
230- # Additional stuff for the LaTeX preamble.
231- # 'preamble': '',
230+ # Additional stuff for the LaTeX preamble.
231+ # 'preamble': '',
232232}
233233
234234# Grouping the document tree into LaTeX files. List of tuples
235235# (source start file, target name, title,
236236# author, documentclass [howto, manual, or own class]).
237237latex_documents = [
238- ('index' , 'sklearn-xarray.tex' , u'sklearn-xarray Documentation' ,
239- u'Peter Hausamann' , 'manual' ),
238+ ('index' , 'sklearn-xarray.tex' , u'sklearn-xarray Documentation' ,
239+ u'Peter Hausamann' , 'manual' ),
240240]
241241
242242# The name of an image file (relative to this directory) to place at the top of
243243# the title page.
244- #latex_logo = None
244+ # latex_logo = None
245245
246246# For "manual" documents, if this is true, then toplevel headings are parts,
247247# not chapters.
248- #latex_use_parts = False
248+ # latex_use_parts = False
249249
250250# If true, show page references after internal links.
251- #latex_show_pagerefs = False
251+ # latex_show_pagerefs = False
252252
253253# If true, show URL addresses after external links.
254- #latex_show_urls = False
254+ # latex_show_urls = False
255255
256256# Documents to append as an appendix to all manuals.
257- #latex_appendices = []
257+ # latex_appendices = []
258258
259259# If false, no module index is generated.
260- #latex_domain_indices = True
260+ # latex_domain_indices = True
261261
262262
263263# -- Options for manual page output ---------------------------------------
270270]
271271
272272# If true, show URL addresses after external links.
273- #man_show_urls = False
273+ # man_show_urls = False
274274
275275
276276# -- Options for Texinfo output -------------------------------------------
279279# (source start file, target name, title, author,
280280# dir menu entry, description, category)
281281texinfo_documents = [
282- ('index' , 'sklearn-xarray' , u'sklearn-xarray Documentation' ,
283- u'Peter Hausamann' , 'sklearn-xarray' , 'Integrate xarray and sklearn.' ,
284- 'Miscellaneous' ),
282+ ('index' , 'sklearn-xarray' , u'sklearn-xarray Documentation' ,
283+ u'Peter Hausamann' , 'sklearn-xarray' , 'Integrate xarray and sklearn.' ,
284+ 'Miscellaneous' ),
285285]
286286
287+
287288def generate_example_rst (app , what , name , obj , options , lines ):
288289 # generate empty examples files, so that we don't get
289290 # inclusion errors if there are no examples for a class / module
@@ -297,17 +298,18 @@ def generate_example_rst(app, what, name, obj, options, lines):
297298def setup (app ):
298299 app .connect ('autodoc-process-docstring' , generate_example_rst )
299300
301+
300302# Documents to append as an appendix to all manuals.
301- #texinfo_appendices = []
303+ # texinfo_appendices = []
302304
303305# If false, no module index is generated.
304- #texinfo_domain_indices = True
306+ # texinfo_domain_indices = True
305307
306308# How to display URL addresses: 'footnote', 'no', or 'inline'.
307- #texinfo_show_urls = 'footnote'
309+ # texinfo_show_urls = 'footnote'
308310
309311# If true, do not generate a @detailmenu in the "Top" node's menu.
310- #texinfo_no_detailmenu = False
312+ # texinfo_no_detailmenu = False
311313
312314
313315# Example configuration for intersphinx: refer to the Python standard library.
0 commit comments