26
26
# sys.path.insert(0, os.path.abspath('.'))
27
27
# sys.path.insert(os.path.abspath('..'))
28
28
29
- print (' python exec:' , sys .executable )
30
- print (' sys.path:' , sys .path )
31
- print (' xbatcher.version:' , xbatcher .__version__ )
29
+ print (" python exec:" , sys .executable )
30
+ print (" sys.path:" , sys .path )
31
+ print (" xbatcher.version:" , xbatcher .__version__ )
32
32
33
33
34
34
# -- General configuration ------------------------------------------------
40
40
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
41
41
# ones.
42
42
extensions = [
43
- ' sphinx.ext.mathjax' ,
44
- ' sphinx.ext.autodoc' ,
45
- ' sphinx.ext.autosummary' ,
46
- ' sphinx.ext.extlinks' ,
47
- ' sphinx.ext.viewcode' ,
48
- ' sphinx.ext.intersphinx' ,
49
- ' numpydoc' ,
50
- ' nbsphinx' ,
51
- ' IPython.sphinxext.ipython_directive' ,
52
- ' IPython.sphinxext.ipython_console_highlighting' ,
53
- ' sphinx_autosummary_accessors' ,
54
- ' sphinx_copybutton' ,
43
+ " sphinx.ext.mathjax" ,
44
+ " sphinx.ext.autodoc" ,
45
+ " sphinx.ext.autosummary" ,
46
+ " sphinx.ext.extlinks" ,
47
+ " sphinx.ext.viewcode" ,
48
+ " sphinx.ext.intersphinx" ,
49
+ " numpydoc" ,
50
+ " nbsphinx" ,
51
+ " IPython.sphinxext.ipython_directive" ,
52
+ " IPython.sphinxext.ipython_console_highlighting" ,
53
+ " sphinx_autosummary_accessors" ,
54
+ " sphinx_copybutton" ,
55
55
]
56
56
57
57
# never execute notebooks: avoids lots of expensive imports on rtd
58
58
# https://nbsphinx.readthedocs.io/en/0.2.14/never-execute.html
59
- nbsphinx_execute = ' never'
59
+ nbsphinx_execute = " never"
60
60
61
61
62
62
# http://stackoverflow.com/questions/5599254/how-to-use-sphinxs-autodoc-to-document-a-classs-init-self-method
63
63
def skip (app , what , name , obj , skip , options ):
64
- if name == ' __init__' :
64
+ if name == " __init__" :
65
65
return False
66
66
return skip
67
67
68
68
69
69
def setup (app ):
70
- app .connect (' autodoc-skip-member' , skip )
70
+ app .connect (" autodoc-skip-member" , skip )
71
71
72
72
73
- autodoc_mock_imports = [' torch' , ' tensorflow' ]
73
+ autodoc_mock_imports = [" torch" , " tensorflow" ]
74
74
75
75
# link to github issues
76
- extlinks = {
77
- 'issue' : ('https://github.com/xarray-contrib/xbatcher/issues/%s' , 'GH' )
78
- }
76
+ extlinks = {"issue" : ("https://github.com/xarray-contrib/xbatcher/issues/%s" , "GH" )}
79
77
80
78
# sphinx-copybutton configurations (from https://github.com/pydata/xarray/blob/main/doc/conf.py)
81
- copybutton_prompt_text = (
82
- r'>>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: '
83
- )
79
+ copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
84
80
copybutton_prompt_is_regexp = True
85
81
86
82
autosummary_generate = True
87
83
numpydoc_class_members_toctree = False
88
84
numpydoc_show_class_members = False
89
85
90
86
# Add any paths that contain templates here, relative to this directory.
91
- templates_path = [' _templates' , sphinx_autosummary_accessors .templates_path ]
87
+ templates_path = [" _templates" , sphinx_autosummary_accessors .templates_path ]
92
88
93
89
# The suffix of source filenames.
94
- source_suffix = ' .rst'
90
+ source_suffix = " .rst"
95
91
96
92
# The encoding of source files.
97
93
# source_encoding = 'utf-8-sig'
98
94
99
95
# The master toctree document.
100
- master_doc = ' index'
96
+ master_doc = " index"
101
97
102
98
# General information about the project.
103
- project = u' xbatcher'
104
- copyright = u' 2021, xbatcher developers'
99
+ project = " xbatcher"
100
+ copyright = " 2021, xbatcher developers"
105
101
106
102
# The version info for the project you're documenting, acts as replacement for
107
103
# |version| and |release|, also used in various other places throughout the
@@ -124,7 +120,7 @@ def setup(app):
124
120
125
121
# List of patterns, relative to source directory, that match files and
126
122
# directories to ignore when looking for source files.
127
- exclude_patterns = [' _build' ]
123
+ exclude_patterns = [" _build" ]
128
124
129
125
# The reST default role (used for this markup: `text`) to use for all
130
126
# documents.
@@ -142,7 +138,7 @@ def setup(app):
142
138
# show_authors = False
143
139
144
140
# The name of the Pygments (syntax highlighting) style to use.
145
- pygments_style = ' sphinx'
141
+ pygments_style = " sphinx"
146
142
147
143
# A list of ignored prefixes for module index sorting.
148
144
# modindex_common_prefix = []
@@ -156,15 +152,15 @@ def setup(app):
156
152
# The theme to use for HTML and HTML Help pages. See the documentation for
157
153
# a list of builtin themes.
158
154
# tml_theme = 'default'
159
- html_theme = ' pangeo_sphinx_book_theme'
155
+ html_theme = " pangeo_sphinx_book_theme"
160
156
161
157
# Theme options are theme-specific and customize the look and feel of a theme
162
158
# further. For a list of options available for each theme, see the
163
159
# documentation.
164
160
html_theme_options = {
165
- ' repository_url' : ' https://github.com/xarray-contrib/xbatcher' ,
166
- ' use_repository_button' : True ,
167
- ' use_issues_button' : True ,
161
+ " repository_url" : " https://github.com/xarray-contrib/xbatcher" ,
162
+ " use_repository_button" : True ,
163
+ " use_issues_button" : True ,
168
164
}
169
165
170
166
# Add any paths that contain custom themes here, relative to this directory.
@@ -238,7 +234,7 @@ def setup(app):
238
234
# html_file_suffix = None
239
235
240
236
# Output file base name for HTML help builder.
241
- htmlhelp_basename = ' xbatcherdoc'
237
+ htmlhelp_basename = " xbatcherdoc"
242
238
243
239
244
240
# -- Options for LaTeX output ---------------------------------------------
@@ -257,11 +253,11 @@ def setup(app):
257
253
# author, documentclass [howto, manual, or own class]).
258
254
latex_documents = [
259
255
(
260
- ' index' ,
261
- ' xbatcher.tex' ,
262
- u' xbatcher Documentation' ,
263
- u' xbatcher developers' ,
264
- ' manual' ,
256
+ " index" ,
257
+ " xbatcher.tex" ,
258
+ " xbatcher Documentation" ,
259
+ " xbatcher developers" ,
260
+ " manual" ,
265
261
),
266
262
]
267
263
@@ -292,10 +288,10 @@ def setup(app):
292
288
# (source start file, name, description, authors, manual section).
293
289
man_pages = [
294
290
(
295
- ' index' ,
296
- ' xbatcher' ,
297
- u' xbatcher Documentation' ,
298
- [u' xbatcher developers' ],
291
+ " index" ,
292
+ " xbatcher" ,
293
+ " xbatcher Documentation" ,
294
+ [" xbatcher developers" ],
299
295
1 ,
300
296
)
301
297
]
@@ -311,13 +307,13 @@ def setup(app):
311
307
# dir menu entry, description, category)
312
308
texinfo_documents = [
313
309
(
314
- ' index' ,
315
- ' xbatcher' ,
316
- u' xbatcher Documentation' ,
317
- u' xbatcher developers' ,
318
- ' xbatcher' ,
319
- ' One line description of project.' ,
320
- ' Miscellaneous' ,
310
+ " index" ,
311
+ " xbatcher" ,
312
+ " xbatcher Documentation" ,
313
+ " xbatcher developers" ,
314
+ " xbatcher" ,
315
+ " One line description of project." ,
316
+ " Miscellaneous" ,
321
317
),
322
318
]
323
319
@@ -336,6 +332,6 @@ def setup(app):
336
332
337
333
# Example configuration for intersphinx: refer to the Python standard library.
338
334
intersphinx_mapping = {
339
- ' python' : (' https://docs.python.org/3/' , None ),
340
- ' xarray' : (' http://xarray.pydata.org/en/stable/' , None ),
335
+ " python" : (" https://docs.python.org/3/" , None ),
336
+ " xarray" : (" http://xarray.pydata.org/en/stable/" , None ),
341
337
}
0 commit comments