|
8 | 8 | # All configuration values have a default; values that are commented out |
9 | 9 | # serve to show the default. |
10 | 10 |
|
11 | | -import os |
12 | | -import sys |
13 | 11 | import inspect |
| 12 | +import os |
14 | 13 | import shutil |
| 14 | +import sys |
15 | 15 |
|
16 | | -__location__ = os.path.join(os.getcwd(), os.path.dirname( |
17 | | - inspect.getfile(inspect.currentframe()))) |
| 16 | +__location__ = os.path.join( |
| 17 | + os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe())) |
| 18 | +) |
18 | 19 |
|
19 | 20 | # If extensions (or modules to document with autodoc) are in another directory, |
20 | 21 | # add these directories to sys.path here. If the directory is relative to the |
21 | 22 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
22 | | -sys.path.insert(0, os.path.join(__location__, '../src')) |
| 23 | +sys.path.insert(0, os.path.join(__location__, "../src")) |
23 | 24 |
|
24 | 25 | # -- Run sphinx-apidoc ------------------------------------------------------ |
25 | 26 | # This hack is necessary since RTD does not issue `sphinx-apidoc` before running |
|
49 | 50 | cmd_line = cmd_line_template.format(outputdir=output_dir, moduledir=module_dir) |
50 | 51 |
|
51 | 52 | args = cmd_line.split(" ") |
52 | | - if parse_version(sphinx.__version__) >= parse_version('1.7'): |
| 53 | + if parse_version(sphinx.__version__) >= parse_version("1.7"): |
53 | 54 | args = args[1:] |
54 | 55 |
|
55 | 56 | apidoc.main(args) |
|
63 | 64 |
|
64 | 65 | # Add any Sphinx extension module names here, as strings. They can be extensions |
65 | 66 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
66 | | -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', |
67 | | - 'sphinx.ext.autosummary', 'sphinx.ext.viewcode', 'sphinx.ext.coverage', |
68 | | - 'sphinx.ext.doctest', 'sphinx.ext.ifconfig', 'sphinx.ext.mathjax', |
69 | | - 'sphinx.ext.napoleon', 'sphinxcontrib.plantuml'] |
| 67 | +extensions = [ |
| 68 | + "sphinx.ext.autodoc", |
| 69 | + "sphinx.ext.intersphinx", |
| 70 | + "sphinx.ext.todo", |
| 71 | + "sphinx.ext.autosummary", |
| 72 | + "sphinx.ext.viewcode", |
| 73 | + "sphinx.ext.coverage", |
| 74 | + "sphinx.ext.doctest", |
| 75 | + "sphinx.ext.ifconfig", |
| 76 | + "sphinx.ext.mathjax", |
| 77 | + "sphinx.ext.napoleon", |
| 78 | + "sphinxcontrib.plantuml", |
| 79 | +] |
70 | 80 |
|
71 | 81 | # plantuml = 'java -jar docs/plantuml.jar' |
72 | 82 |
|
73 | 83 | # Add any paths that contain templates here, relative to this directory. |
74 | | -templates_path = ['_templates'] |
| 84 | +templates_path = ["_templates"] |
75 | 85 |
|
76 | 86 | # The suffix of source filenames. |
77 | | -source_suffix = '.rst' |
| 87 | +source_suffix = ".rst" |
78 | 88 |
|
79 | 89 | # The encoding of source files. |
80 | 90 | # source_encoding = 'utf-8-sig' |
81 | 91 |
|
82 | 92 | # The master toctree document. |
83 | | -master_doc = 'index' |
| 93 | +master_doc = "index" |
84 | 94 |
|
85 | 95 | # General information about the project. |
86 | | -project = u'aleph-sdk-python' |
87 | | -copyright = u'2019, Aleph.im' |
| 96 | +project = "aleph-sdk-python" |
| 97 | +copyright = "2019, Aleph.im" |
88 | 98 |
|
89 | 99 | # The version info for the project you're documenting, acts as replacement for |
90 | 100 | # |version| and |release|, also used in various other places throughout the |
91 | 101 | # built documents. |
92 | 102 | # |
93 | 103 | # The short X.Y version. |
94 | | -version = '' # Is set by calling `setup.py docs` |
| 104 | +version = "" # Is set by calling `setup.py docs` |
95 | 105 | # The full version, including alpha/beta/rc tags. |
96 | | -release = '' # Is set by calling `setup.py docs` |
| 106 | +release = "" # Is set by calling `setup.py docs` |
97 | 107 |
|
98 | 108 | # The language for content autogenerated by Sphinx. Refer to documentation |
99 | 109 | # for a list of supported languages. |
|
107 | 117 |
|
108 | 118 | # List of patterns, relative to source directory, that match files and |
109 | 119 | # directories to ignore when looking for source files. |
110 | | -exclude_patterns = ['_build'] |
| 120 | +exclude_patterns = ["_build"] |
111 | 121 |
|
112 | 122 | # The reST default role (used for this markup: `text`) to use for all documents. |
113 | 123 | # default_role = None |
|
124 | 134 | # show_authors = False |
125 | 135 |
|
126 | 136 | # The name of the Pygments (syntax highlighting) style to use. |
127 | | -pygments_style = 'sphinx' |
| 137 | +pygments_style = "sphinx" |
128 | 138 |
|
129 | 139 | # A list of ignored prefixes for module index sorting. |
130 | 140 | # modindex_common_prefix = [] |
|
137 | 147 |
|
138 | 148 | # The theme to use for HTML and HTML Help pages. See the documentation for |
139 | 149 | # a list of builtin themes. |
140 | | -html_theme = 'alabaster' |
| 150 | +html_theme = "alabaster" |
141 | 151 |
|
142 | 152 | # Theme options are theme-specific and customize the look and feel of a theme |
143 | 153 | # further. For a list of options available for each theme, see the |
144 | 154 | # documentation. |
145 | 155 | html_theme_options = { |
146 | 156 | #'sidebar_width': '300px', |
147 | 157 | #'page_width': '1200px' |
148 | | - 'logo': 'logo.svg', |
149 | | - 'description': 'Aleph Network Client', |
150 | | - 'github_user': 'aleph-im', |
151 | | - 'github_repo': 'aleph-sdk-python', |
152 | | - 'github_button': True, |
153 | | - 'github_type': 'star', |
154 | | - 'github_banner': True, |
155 | | - 'travis_button': True, |
156 | | - 'codecov_button': True, |
157 | | - 'pre_bg': '#FFF6E5', |
158 | | - 'note_bg': '#E5ECD1', |
159 | | - 'note_border': '#BFCF8C', |
160 | | - 'body_text': '#482C0A', |
161 | | - 'sidebar_text': '#49443E', |
162 | | - 'sidebar_header': '#4B4032', |
163 | | - 'sidebar_collapse': False, |
| 158 | + "logo": "logo.svg", |
| 159 | + "description": "Aleph Network Client", |
| 160 | + "github_user": "aleph-im", |
| 161 | + "github_repo": "aleph-sdk-python", |
| 162 | + "github_button": True, |
| 163 | + "github_type": "star", |
| 164 | + "github_banner": True, |
| 165 | + "travis_button": True, |
| 166 | + "codecov_button": True, |
| 167 | + "pre_bg": "#FFF6E5", |
| 168 | + "note_bg": "#E5ECD1", |
| 169 | + "note_border": "#BFCF8C", |
| 170 | + "body_text": "#482C0A", |
| 171 | + "sidebar_text": "#49443E", |
| 172 | + "sidebar_header": "#4B4032", |
| 173 | + "sidebar_collapse": False, |
164 | 174 | } |
165 | 175 |
|
166 | 176 | # Add any paths that contain custom themes here, relative to this directory. |
|
190 | 200 | # Add any paths that contain custom static files (such as style sheets) here, |
191 | 201 | # relative to this directory. They are copied after the builtin static files, |
192 | 202 | # so a file named "default.css" will overwrite the builtin "default.css". |
193 | | -html_static_path = ['_static'] |
| 203 | +html_static_path = ["_static"] |
194 | 204 |
|
195 | 205 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
196 | 206 | # using the given strftime format. |
|
234 | 244 | # html_file_suffix = None |
235 | 245 |
|
236 | 246 | # Output file base name for HTML help builder. |
237 | | -htmlhelp_basename = 'aleph_client-doc' |
| 247 | +htmlhelp_basename = "aleph_client-doc" |
238 | 248 |
|
239 | 249 |
|
240 | 250 | # -- Options for LaTeX output -------------------------------------------------- |
241 | 251 |
|
242 | 252 | latex_elements = { |
243 | | -# The paper size ('letterpaper' or 'a4paper'). |
244 | | -# 'papersize': 'letterpaper', |
245 | | - |
246 | | -# The font size ('10pt', '11pt' or '12pt'). |
247 | | -# 'pointsize': '10pt', |
248 | | - |
249 | | -# Additional stuff for the LaTeX preamble. |
250 | | -# 'preamble': '', |
| 253 | + # The paper size ('letterpaper' or 'a4paper'). |
| 254 | + # 'papersize': 'letterpaper', |
| 255 | + # The font size ('10pt', '11pt' or '12pt'). |
| 256 | + # 'pointsize': '10pt', |
| 257 | + # Additional stuff for the LaTeX preamble. |
| 258 | + # 'preamble': '', |
251 | 259 | } |
252 | 260 |
|
253 | 261 | # Grouping the document tree into LaTeX files. List of tuples |
254 | 262 | # (source start file, target name, title, author, documentclass [howto/manual]). |
255 | 263 | latex_documents = [ |
256 | | - ('index', 'user_guide.tex', u'aleph-sdk-python Documentation', |
257 | | - u'Aleph.im', 'manual'), |
| 264 | + ("index", "user_guide.tex", "aleph-sdk-python Documentation", "Aleph.im", "manual"), |
258 | 265 | ] |
259 | 266 |
|
260 | 267 | # The name of an image file (relative to this directory) to place at the top of |
|
278 | 285 | # latex_domain_indices = True |
279 | 286 |
|
280 | 287 | # -- External mapping ------------------------------------------------------------ |
281 | | -python_version = '.'.join(map(str, sys.version_info[0:2])) |
| 288 | +python_version = ".".join(map(str, sys.version_info[0:2])) |
282 | 289 | intersphinx_mapping = { |
283 | | - 'sphinx': ('http://www.sphinx-doc.org/en/stable', None), |
284 | | - 'python': ('https://docs.python.org/' + python_version, None), |
285 | | - 'matplotlib': ('https://matplotlib.org', None), |
286 | | - 'numpy': ('https://docs.scipy.org/doc/numpy', None), |
287 | | - 'sklearn': ('http://scikit-learn.org/stable', None), |
288 | | - 'pandas': ('http://pandas.pydata.org/pandas-docs/stable', None), |
289 | | - 'scipy': ('https://docs.scipy.org/doc/scipy/reference', None), |
| 290 | + "sphinx": ("http://www.sphinx-doc.org/en/stable", None), |
| 291 | + "python": ("https://docs.python.org/" + python_version, None), |
| 292 | + "matplotlib": ("https://matplotlib.org", None), |
| 293 | + "numpy": ("https://docs.scipy.org/doc/numpy", None), |
| 294 | + "sklearn": ("http://scikit-learn.org/stable", None), |
| 295 | + "pandas": ("http://pandas.pydata.org/pandas-docs/stable", None), |
| 296 | + "scipy": ("https://docs.scipy.org/doc/scipy/reference", None), |
290 | 297 | } |
0 commit comments