20
20
import os
21
21
import sys
22
22
23
- sys .path .insert (0 , os .path .abspath ('..' ))
23
+ sys .path .insert (0 , os .path .abspath (".." ))
24
24
25
25
# For dependencies
26
26
from unittest .mock import MagicMock
27
+
28
+
27
29
class Mock (MagicMock ):
28
30
@classmethod
29
31
def __getattr__ (cls , name ):
30
- return MagicMock ()
31
-
32
- MOCK_MODULES = ['numpy' , 'matplotlib' , 'matplotlib.pyplot' , 'pandas' , 'scipy' ,
33
- 'sklearn' , 'sklearn.preprocessing' , 'mne' ]
32
+ return MagicMock ()
33
+
34
+
35
+ MOCK_MODULES = [
36
+ "numpy" ,
37
+ "matplotlib" ,
38
+ "matplotlib.pyplot" ,
39
+ "pandas" ,
40
+ "scipy" ,
41
+ "sklearn" ,
42
+ "sklearn.preprocessing" ,
43
+ "mne" ,
44
+ ]
34
45
sys .modules .update ((mod_name , Mock ()) for mod_name in MOCK_MODULES )
35
46
36
47
# -- General configuration ------------------------------------------------
@@ -42,26 +53,26 @@ def __getattr__(cls, name):
42
53
# Add any Sphinx extension module names here, as strings. They can be
43
54
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
44
55
# ones.
45
- extensions = [' sphinx.ext.autodoc' ]
56
+ extensions = [" sphinx.ext.autodoc" ]
46
57
47
58
# Add any paths that contain templates here, relative to this directory.
48
- templates_path = [' _templates' ]
59
+ templates_path = [" _templates" ]
49
60
50
61
# The suffix(es) of source filenames.
51
62
# You can specify multiple suffix as a list of string:
52
63
#
53
64
# source_suffix = ['.rst', '.md']
54
- source_suffix = ' .rst'
65
+ source_suffix = " .rst"
55
66
56
67
# The master toctree document.
57
- master_doc = ' index'
68
+ master_doc = " index"
58
69
59
70
# General information about the project.
60
- project = ' wfdb'
61
- copyright = ' 2018, MIT Lab for Computational Physiology'
62
- author = ' MIT Lab for Computational Physiology'
71
+ project = " wfdb"
72
+ copyright = " 2018, MIT Lab for Computational Physiology"
73
+ author = " MIT Lab for Computational Physiology"
63
74
64
- with open (' ../wfdb/version.py' ) as f :
75
+ with open (" ../wfdb/version.py" ) as f :
65
76
__version__ = f .read ().split ()[- 1 ].strip ("'" )
66
77
# The version info for the project you're documenting, acts as replacement for
67
78
# |version| and |release|, also used in various other places throughout the
@@ -82,10 +93,10 @@ def __getattr__(cls, name):
82
93
# List of patterns, relative to source directory, that match files and
83
94
# directories to ignore when looking for source files.
84
95
# This patterns also effect to html_static_path and html_extra_path
85
- exclude_patterns = [' _build' , ' Thumbs.db' , ' .DS_Store' ]
96
+ exclude_patterns = [" _build" , " Thumbs.db" , " .DS_Store" ]
86
97
87
98
# The name of the Pygments (syntax highlighting) style to use.
88
- pygments_style = ' sphinx'
99
+ pygments_style = " sphinx"
89
100
90
101
# If true, `todo` and `todoList` produce output, else they produce nothing.
91
102
todo_include_todos = False
@@ -96,7 +107,7 @@ def __getattr__(cls, name):
96
107
# The theme to use for HTML and HTML Help pages. See the documentation for
97
108
# a list of builtin themes.
98
109
#
99
- html_theme = ' classic'
110
+ html_theme = " classic"
100
111
101
112
# Theme options are theme-specific and customize the look and feel of a theme
102
113
# further. For a list of options available for each theme, see the
@@ -107,25 +118,25 @@ def __getattr__(cls, name):
107
118
# Add any paths that contain custom static files (such as style sheets) here,
108
119
# relative to this directory. They are copied after the builtin static files,
109
120
# so a file named "default.css" will overwrite the builtin "default.css".
110
- html_static_path = [' _static' ]
121
+ html_static_path = [" _static" ]
111
122
112
123
# Custom sidebar templates, must be a dictionary that maps document names
113
124
# to template names.
114
125
#
115
126
# This is required for the alabaster theme
116
127
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
117
128
html_sidebars = {
118
- '**' : [
119
- ' relations.html' , # needs 'show_related': True theme option to display
120
- ' searchbox.html' ,
129
+ "**" : [
130
+ " relations.html" , # needs 'show_related': True theme option to display
131
+ " searchbox.html" ,
121
132
]
122
133
}
123
134
124
135
125
136
# -- Options for HTMLHelp output ------------------------------------------
126
137
127
138
# Output file base name for HTML help builder.
128
- htmlhelp_basename = ' wfdbdoc'
139
+ htmlhelp_basename = " wfdbdoc"
129
140
130
141
131
142
# -- Options for LaTeX output ---------------------------------------------
@@ -134,15 +145,12 @@ def __getattr__(cls, name):
134
145
# The paper size ('letterpaper' or 'a4paper').
135
146
#
136
147
# 'papersize': 'letterpaper',
137
-
138
148
# The font size ('10pt', '11pt' or '12pt').
139
149
#
140
150
# 'pointsize': '10pt',
141
-
142
151
# Additional stuff for the LaTeX preamble.
143
152
#
144
153
# 'preamble': '',
145
-
146
154
# Latex figure (float) alignment
147
155
#
148
156
# 'figure_align': 'htbp',
@@ -152,19 +160,15 @@ def __getattr__(cls, name):
152
160
# (source start file, target name, title,
153
161
# author, documentclass [howto, manual, or own class]).
154
162
latex_documents = [
155
- (master_doc , 'wfdb.tex' , 'wfdb Documentation' ,
156
- author , 'manual' ),
163
+ (master_doc , "wfdb.tex" , "wfdb Documentation" , author , "manual" ),
157
164
]
158
165
159
166
160
167
# -- Options for manual page output ---------------------------------------
161
168
162
169
# One entry per manual page. List of tuples
163
170
# (source start file, name, description, authors, manual section).
164
- man_pages = [
165
- (master_doc , 'wfdb' , 'wfdb Documentation' ,
166
- [author ], 1 )
167
- ]
171
+ man_pages = [(master_doc , "wfdb" , "wfdb Documentation" , [author ], 1 )]
168
172
169
173
170
174
# -- Options for Texinfo output -------------------------------------------
@@ -173,10 +177,13 @@ def __getattr__(cls, name):
173
177
# (source start file, target name, title, author,
174
178
# dir menu entry, description, category)
175
179
texinfo_documents = [
176
- (master_doc , 'wfdb' , 'wfdb Documentation' ,
177
- author , 'wfdb' , 'One line description of project.' ,
178
- 'Miscellaneous' ),
180
+ (
181
+ master_doc ,
182
+ "wfdb" ,
183
+ "wfdb Documentation" ,
184
+ author ,
185
+ "wfdb" ,
186
+ "One line description of project." ,
187
+ "Miscellaneous" ,
188
+ ),
179
189
]
180
-
181
-
182
-
0 commit comments