|
12 | 12 | # All configuration values have a default; values that are commented out
|
13 | 13 | # serve to show the default.
|
14 | 14 |
|
| 15 | +# flake8: noqa |
| 16 | + |
15 | 17 | import os
|
16 | 18 | import sys
|
17 | 19 | import sphinx_rtd_theme
|
18 | 20 |
|
19 | 21 | # If extensions (or modules to document with autodoc) are in another directory,
|
20 | 22 | # add these directories to sys.path here. If the directory is relative to the
|
21 | 23 | # documentation root, use os.path.abspath to make it absolute, like shown here.
|
22 |
| -sys.path.insert(0, os.path.abspath('sphinxext')) |
| 24 | +sys.path.insert(0, os.path.abspath("sphinxext")) |
23 | 25 | from github_link import make_linkcode_resolve
|
24 | 26 | import generate_database_schema
|
25 | 27 |
|
|
32 | 34 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
33 | 35 | # ones.
|
34 | 36 | extensions = [
|
35 |
| - 'sphinx.ext.autodoc', |
36 |
| - 'sphinx.ext.autosummary', |
37 |
| - 'sphinx.ext.doctest', |
38 |
| - 'sphinx.ext.intersphinx', |
39 |
| - 'sphinx_click.ext', |
40 |
| - 'numpydoc', |
41 |
| - 'sphinx_issues', |
| 37 | + "sphinx.ext.autodoc", |
| 38 | + "sphinx.ext.autosummary", |
| 39 | + "sphinx.ext.doctest", |
| 40 | + "sphinx.ext.intersphinx", |
| 41 | + "sphinx_click.ext", |
| 42 | + "numpydoc", |
| 43 | + "sphinx_issues", |
42 | 44 | ]
|
43 | 45 |
|
44 | 46 | # this is needed for some reason...
|
|
48 | 50 | # pngmath / imgmath compatibility layer for different sphinx versions
|
49 | 51 | import sphinx
|
50 | 52 | from distutils.version import LooseVersion
|
51 |
| -if LooseVersion(sphinx.__version__) < LooseVersion('1.4'): |
52 |
| - extensions.append('sphinx.ext.pngmath') |
| 53 | + |
| 54 | +if LooseVersion(sphinx.__version__) < LooseVersion("1.4"): |
| 55 | + extensions.append("sphinx.ext.pngmath") |
53 | 56 | else:
|
54 |
| - extensions.append('sphinx.ext.imgmath') |
| 57 | + extensions.append("sphinx.ext.imgmath") |
55 | 58 |
|
56 |
| -autodoc_default_flags = ['members', 'inherited-members'] |
| 59 | +autodoc_default_flags = ["members", "inherited-members"] |
57 | 60 |
|
58 | 61 | # Add any paths that contain templates here, relative to this directory.
|
59 |
| -templates_path = ['_templates'] |
| 62 | +templates_path = ["_templates"] |
60 | 63 |
|
61 | 64 | # generate autosummary even if no references
|
62 | 65 | autosummary_generate = True
|
63 | 66 |
|
64 | 67 | # The suffix of source filenames.
|
65 |
| -source_suffix = '.rst' |
| 68 | +source_suffix = ".rst" |
66 | 69 |
|
67 | 70 | # The encoding of source files.
|
68 | 71 | # source_encoding = 'utf-8-sig'
|
|
71 | 74 | plot_gallery = True
|
72 | 75 |
|
73 | 76 | # The master toctree document.
|
74 |
| -master_doc = 'index' |
| 77 | +master_doc = "index" |
75 | 78 |
|
76 | 79 | # General information about the project.
|
77 |
| -project = 'RAMP' |
78 |
| -copyright = '2015 - 2019, Paris-Saclay Center for Data Science' |
| 80 | +project = "RAMP" |
| 81 | +copyright = "2015 - 2019, Paris-Saclay Center for Data Science" |
79 | 82 |
|
80 | 83 | # The version info for the project you're documenting, acts as replacement for
|
81 | 84 | # |version| and |release|, also used in various other places throughout the
|
82 | 85 | # built documents.
|
83 | 86 | #
|
84 | 87 | # The short X.Y version.
|
85 | 88 | from ramp_database import __version__
|
| 89 | + |
86 | 90 | version = __version__
|
87 | 91 | # The full version, including alpha/beta/rc tags.
|
88 | 92 | release = __version__
|
|
99 | 103 |
|
100 | 104 | # List of patterns, relative to source directory, that match files and
|
101 | 105 | # directories to ignore when looking for source files.
|
102 |
| -exclude_patterns = ['_build', '_templates'] |
| 106 | +exclude_patterns = ["_build", "_templates"] |
103 | 107 |
|
104 | 108 | # The reST default role (used for this markup: `text`) to use for all
|
105 | 109 | # documents.
|
106 |
| -default_role = 'literal' |
| 110 | +default_role = "literal" |
107 | 111 |
|
108 | 112 | # If true, '()' will be appended to :func: etc. cross-reference text.
|
109 | 113 | add_function_parentheses = False
|
|
117 | 121 | # show_authors = False
|
118 | 122 |
|
119 | 123 | # The name of the Pygments (syntax highlighting) style to use.
|
120 |
| -pygments_style = 'sphinx' |
| 124 | +pygments_style = "sphinx" |
121 | 125 |
|
122 | 126 | # Custom style
|
123 |
| -html_style = 'css/ramp.css' |
| 127 | +html_style = "css/ramp.css" |
124 | 128 |
|
125 | 129 | # A list of ignored prefixes for module index sorting.
|
126 | 130 | # modindex_common_prefix = []
|
|
132 | 136 |
|
133 | 137 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
134 | 138 | # a list of builtin themes.
|
135 |
| -html_theme = 'sphinx_rtd_theme' |
| 139 | +html_theme = "sphinx_rtd_theme" |
136 | 140 |
|
137 | 141 | # Theme options are theme-specific and customize the look and feel of a theme
|
138 | 142 | # further. For a list of options available for each theme, see the
|
|
161 | 165 | # Add any paths that contain custom static files (such as style sheets) here,
|
162 | 166 | # relative to this directory. They are copied after the builtin static files,
|
163 | 167 | # so a file named "default.css" will overwrite the builtin "default.css".
|
164 |
| -html_static_path = ['_static'] |
| 168 | +html_static_path = ["_static"] |
165 | 169 |
|
166 | 170 | # Add any extra paths that contain custom files (such as robots.txt or
|
167 | 171 | # .htaccess) here, relative to this directory. These files are copied
|
|
210 | 214 | # html_file_suffix = None
|
211 | 215 |
|
212 | 216 | # Output file base name for HTML help builder.
|
213 |
| -htmlhelp_basename = 'ramp-learndoc' |
| 217 | +htmlhelp_basename = "ramp-learndoc" |
214 | 218 |
|
215 | 219 | # -- Options for LaTeX output ---------------------------------------------
|
216 | 220 |
|
217 | 221 | latex_elements = {
|
218 | 222 | # The paper size ('letterpaper' or 'a4paper').
|
219 | 223 | # 'papersize': 'letterpaper',
|
220 |
| - |
221 | 224 | # The font size ('10pt', '11pt' or '12pt').
|
222 | 225 | # 'pointsize': '10pt',
|
223 |
| - |
224 | 226 | # Additional stuff for the LaTeX preamble.
|
225 | 227 | # 'preamble': '',
|
226 | 228 | }
|
|
229 | 231 | # (source start file, target name, title,
|
230 | 232 | # author, documentclass [howto, manual, or own class]).
|
231 | 233 | latex_documents = [
|
232 |
| - ('index', 'ramp.tex', 'RAMP Documentation', |
233 |
| - 'Paris-Saclay Center for Data Science', 'manual'), |
| 234 | + ( |
| 235 | + "index", |
| 236 | + "ramp.tex", |
| 237 | + "RAMP Documentation", |
| 238 | + "Paris-Saclay Center for Data Science", |
| 239 | + "manual", |
| 240 | + ), |
234 | 241 | ]
|
235 | 242 |
|
236 | 243 | # The name of an image file (relative to this directory) to place at the top of
|
|
252 | 259 |
|
253 | 260 | # intersphinx configuration
|
254 | 261 | intersphinx_mapping = {
|
255 |
| - 'python': ('https://docs.python.org/{.major}'.format( |
256 |
| - sys.version_info), None), |
257 |
| - 'numpy': ('https://docs.scipy.org/doc/numpy/', None), |
258 |
| - 'scipy': ('https://docs.scipy.org/doc/scipy/reference', None), |
259 |
| - 'matplotlib': ('https://matplotlib.org/', None), |
260 |
| - 'sklearn': ('http://scikit-learn.org/stable', None) |
| 262 | + "python": ( |
| 263 | + "https://docs.python.org/{.major}".format(sys.version_info), |
| 264 | + None, |
| 265 | + ), |
| 266 | + "numpy": ("https://docs.scipy.org/doc/numpy/", None), |
| 267 | + "scipy": ("https://docs.scipy.org/doc/scipy/reference", None), |
| 268 | + "matplotlib": ("https://matplotlib.org/", None), |
| 269 | + "sklearn": ("http://scikit-learn.org/stable", None), |
261 | 270 | }
|
262 | 271 |
|
263 | 272 | # -- Options for manual page output ---------------------------------------
|
|
268 | 277 |
|
269 | 278 | # One entry per manual page. List of tuples
|
270 | 279 | # (source start file, name, description, authors, manual section).
|
271 |
| -man_pages = [('index', 'RAMP', 'RAMP Documentation', |
272 |
| - ['Paris-Saclay Center for Data Science'], 1)] |
| 280 | +man_pages = [ |
| 281 | + ( |
| 282 | + "index", |
| 283 | + "RAMP", |
| 284 | + "RAMP Documentation", |
| 285 | + ["Paris-Saclay Center for Data Science"], |
| 286 | + 1, |
| 287 | + ) |
| 288 | +] |
273 | 289 |
|
274 | 290 | # If true, show URL addresses after external links.
|
275 | 291 | # man_show_urls = False
|
|
280 | 296 | # (source start file, target name, title, author,
|
281 | 297 | # dir menu entry, description, category)
|
282 | 298 | texinfo_documents = [
|
283 |
| - ('index', 'RAMP', 'RAMP Documentation', |
284 |
| - 'Paris-Saclay Center for Data Science', 'RAMP', |
285 |
| - 'Rapid Analytics and Model Prototyping', 'Machine Learning'), |
| 299 | + ( |
| 300 | + "index", |
| 301 | + "RAMP", |
| 302 | + "RAMP Documentation", |
| 303 | + "Paris-Saclay Center for Data Science", |
| 304 | + "RAMP", |
| 305 | + "Rapid Analytics and Model Prototyping", |
| 306 | + "Machine Learning", |
| 307 | + ), |
286 | 308 | ]
|
287 | 309 |
|
288 | 310 |
|
|
298 | 320 |
|
299 | 321 | # Config for sphinx_issues
|
300 | 322 |
|
301 |
| -issues_uri = 'https://github.com/paris-saclay-cds/ramp-board/issues/{issue}' |
302 |
| -issues_github_path = 'paris-saclay-cds/ramp-board' |
303 |
| -issues_user_uri = 'https://github.com/{user}' |
| 323 | +issues_uri = "https://github.com/paris-saclay-cds/ramp-board/issues/{issue}" |
| 324 | +issues_github_path = "paris-saclay-cds/ramp-board" |
| 325 | +issues_user_uri = "https://github.com/{user}" |
304 | 326 |
|
305 | 327 |
|
306 | 328 | # Temporary work-around for spacing problem between parameter and parameter
|
|
310 | 332 | # In an ideal world, this would get fixed in this PR:
|
311 | 333 | # https://github.com/readthedocs/sphinx_rtd_theme/pull/747/files
|
312 | 334 | def setup(app):
|
313 |
| - app.add_javascript('js/copybutton.js') |
| 335 | + app.add_javascript("js/copybutton.js") |
314 | 336 | app.add_stylesheet("basic.css")
|
315 | 337 | # app.connect('autodoc-process-docstring', generate_example_rst)
|
316 | 338 |
|
|
0 commit comments