|
1 | 1 | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries |
2 | 2 | # |
3 | 3 | # SPDX-License-Identifier: MIT |
4 | | -# |
5 | | -# Adafruit AMG88xx Library documentation build configuration file, created by |
6 | | -# sphinx-quickstart on Fri Nov 11 07:42:21 2016. |
7 | | -# |
8 | | -# This file is execfile()d with the current directory set to its |
9 | | -# containing dir. |
10 | | -# |
11 | | -# Note that not all possible configuration values are present in this |
12 | | -# autogenerated file. |
13 | | -# |
14 | | -# All configuration values have a default; values that are commented out |
15 | | -# serve to show the default. |
16 | 4 |
|
17 | | -# If extensions (or modules to document with autodoc) are in another directory, |
18 | | -# add these directories to sys.path here. If the directory is relative to the |
19 | | -# documentation root, use os.path.abspath to make it absolute, like shown here. |
20 | | -# |
21 | 5 | import datetime |
22 | 6 | import os |
23 | 7 | import sys |
|
26 | 10 |
|
27 | 11 | # -- General configuration ------------------------------------------------ |
28 | 12 |
|
29 | | -# If your documentation needs a minimal Sphinx version, state it here. |
30 | | -# |
31 | | -# needs_sphinx = '1.0' |
32 | | - |
33 | 13 | # Add any Sphinx extension module names here, as strings. They can be |
34 | 14 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
35 | 15 | # ones. |
36 | 16 | extensions = [ |
37 | 17 | "sphinx.ext.autodoc", |
38 | 18 | "sphinxcontrib.jquery", |
39 | 19 | "sphinx.ext.intersphinx", |
40 | | - "sphinx.ext.viewcode", |
| 20 | + "sphinx.ext.napoleon", |
| 21 | + "sphinx.ext.todo", |
41 | 22 | ] |
42 | 23 |
|
| 24 | +# TODO: Please Read! |
43 | 25 | # Uncomment the below if you use native CircuitPython modules such as |
44 | 26 | # digitalio, micropython and busio. List the modules you use. Without it, the |
45 | 27 | # autodoc module docs will fail to generate with a warning. |
46 | | -# autodoc_mock_imports = ["adafruit_bus_device", "micropython", "adafruit_register"] |
| 28 | +# autodoc_mock_imports = ["digitalio", "busio"] |
| 29 | + |
| 30 | +autodoc_preserve_defaults = True |
| 31 | + |
| 32 | + |
| 33 | +intersphinx_mapping = { |
| 34 | + "python": ("https://docs.python.org/3", None), |
| 35 | + "BusDevice": ("https://docs.circuitpython.org/projects/busdevice/en/latest/", None), |
| 36 | + "CircuitPython": ("https://docs.circuitpython.org/en/latest/", None), |
| 37 | +} |
| 38 | + |
| 39 | +# Show the docstring from both the class and its __init__() method. |
| 40 | +autoclass_content = "both" |
47 | 41 |
|
48 | 42 | # Add any paths that contain templates here, relative to this directory. |
49 | 43 | templates_path = ["_templates"] |
50 | 44 |
|
51 | | -# The suffix(es) of source filenames. |
52 | | -# You can specify multiple suffix as a list of string: |
53 | | -# |
54 | | -# source_suffix = ['.rst', '.md'] |
55 | 45 | source_suffix = ".rst" |
56 | 46 |
|
57 | | -# The encoding of source files. |
58 | | -# |
59 | | -# source_encoding = 'utf-8-sig' |
60 | | - |
61 | 47 | # The master toctree document. |
62 | 48 | master_doc = "index" |
63 | 49 |
|
|
87 | 73 | # Usually you set "language" from the command line for these cases. |
88 | 74 | language = "en" |
89 | 75 |
|
90 | | -# There are two options for replacing |today|: either, you set today to some |
91 | | -# non-false value, then it is used: |
92 | | -# |
93 | | -# today = '' |
94 | | -# |
95 | | -# Else, today_fmt is used as the format for a strftime call. |
96 | | -# |
97 | | -# today_fmt = '%B %d, %Y' |
98 | | - |
99 | 76 | # List of patterns, relative to source directory, that match files and |
100 | 77 | # directories to ignore when looking for source files. |
101 | 78 | # This patterns also effect to html_static_path and html_extra_path |
102 | | -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"] |
| 79 | +exclude_patterns = [ |
| 80 | + "_build", |
| 81 | + "Thumbs.db", |
| 82 | + ".DS_Store", |
| 83 | + ".env", |
| 84 | + "CODE_OF_CONDUCT.md", |
| 85 | +] |
103 | 86 |
|
104 | 87 | # The reST default role (used for this markup: `text`) to use for all |
105 | 88 | # documents. |
|
108 | 91 |
|
109 | 92 | # If true, '()' will be appended to :func: etc. cross-reference text. |
110 | 93 | # |
111 | | -# add_function_parentheses = True |
112 | | - |
113 | | -# If true, the current module name will be prepended to all description |
114 | | -# unit titles (such as .. function::). |
115 | | -# |
116 | | -# add_module_names = True |
117 | | - |
118 | | -# If true, sectionauthor and moduleauthor directives will be shown in the |
119 | | -# output. They are ignored by default. |
120 | | -# |
121 | | -# show_authors = False |
| 94 | +add_function_parentheses = True |
122 | 95 |
|
123 | 96 | # The name of the Pygments (syntax highlighting) style to use. |
124 | 97 | pygments_style = "sphinx" |
|
129 | 102 | # If this is True, todo emits a warning for each TODO entries. The default is False. |
130 | 103 | todo_emit_warnings = True |
131 | 104 |
|
132 | | -# A list of ignored prefixes for module index sorting. |
133 | | -# modindex_common_prefix = [] |
134 | | - |
135 | | -# If true, keep warnings as "system message" paragraphs in the built documents. |
136 | | -# keep_warnings = False |
137 | | - |
138 | | -# If true, `todo` and `todoList` produce output, else they produce nothing. |
139 | | -todo_include_todos = False |
140 | | - |
| 105 | +napoleon_numpy_docstring = False |
141 | 106 |
|
142 | 107 | # -- Options for HTML output ---------------------------------------------- |
143 | 108 |
|
144 | 109 | # The theme to use for HTML and HTML Help pages. See the documentation for |
145 | 110 | # a list of builtin themes. |
146 | 111 | # |
147 | | -on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
148 | | - |
149 | | -if not on_rtd: # only import and set the theme if we're building docs locally |
150 | | - try: |
151 | | - import sphinx_rtd_theme |
152 | | - |
153 | | - html_theme = "sphinx_rtd_theme" |
154 | | - except ImportError: |
155 | | - html_theme = "default" |
156 | | - html_theme_path = ["."] |
157 | | -else: |
158 | | - html_theme_path = ["."] |
159 | | - |
160 | | -# Theme options are theme-specific and customize the look and feel of a theme |
161 | | -# further. For a list of options available for each theme, see the |
162 | | -# documentation. |
163 | | -# |
164 | | -# html_theme_options = {} |
165 | | - |
166 | | -# Add any paths that contain custom themes here, relative to this directory. |
167 | | -# html_theme_path = [] |
168 | | - |
169 | | -# The name for this set of Sphinx documents. |
170 | | -# "<project> v<release> documentation" by default. |
171 | | -# |
172 | | -# html_title = u'Adafruit AMG88xx Library v1.0' |
173 | | - |
174 | | -# A shorter title for the navigation bar. Default is the same as html_title. |
175 | | -# |
176 | | -# html_short_title = None |
| 112 | +import sphinx_rtd_theme |
177 | 113 |
|
178 | | -# The name of an image file (relative to this directory) to place at the top |
179 | | -# of the sidebar. |
180 | | -# |
181 | | -# html_logo = None |
182 | | - |
183 | | -# The name of an image file (relative to this directory) to use as a favicon of |
184 | | -# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
185 | | -# pixels large. |
186 | | -# |
187 | | -# html_favicon = None |
| 114 | +html_theme = "sphinx_rtd_theme" |
188 | 115 |
|
189 | 116 | # Add any paths that contain custom static files (such as style sheets) here, |
190 | 117 | # relative to this directory. They are copied after the builtin static files, |
191 | 118 | # so a file named "default.css" will overwrite the builtin "default.css". |
192 | 119 | html_static_path = ["_static"] |
193 | 120 |
|
194 | | -# Add any extra paths that contain custom files (such as robots.txt or |
195 | | -# .htaccess) here, relative to this directory. These files are copied |
196 | | -# directly to the root of the documentation. |
197 | | -# |
198 | | -# html_extra_path = [] |
199 | | - |
200 | | -# If not None, a 'Last updated on:' timestamp is inserted at every page |
201 | | -# bottom, using the given strftime format. |
202 | | -# The empty string is equivalent to '%b %d, %Y'. |
203 | | -# |
204 | | -# html_last_updated_fmt = None |
205 | | - |
206 | | -# If true, SmartyPants will be used to convert quotes and dashes to |
207 | | -# typographically correct entities. |
208 | | -# |
209 | | -# html_use_smartypants = True |
210 | | - |
211 | | -# Custom sidebar templates, maps document names to template names. |
212 | | -# |
213 | | -# html_sidebars = {} |
214 | | - |
215 | | -# Additional templates that should be rendered to pages, maps page names to |
216 | | -# template names. |
217 | | -# |
218 | | -# html_additional_pages = {} |
219 | | - |
220 | | -# If false, no module index is generated. |
221 | | -# |
222 | | -# html_domain_indices = True |
223 | | - |
224 | | -# If false, no index is generated. |
225 | | -# |
226 | | -# html_use_index = True |
227 | | - |
228 | | -# If true, the index is split into individual pages for each letter. |
229 | | -# |
230 | | -# html_split_index = False |
231 | | - |
232 | | -# If true, links to the reST sources are added to the pages. |
233 | | -# |
234 | | -# html_show_sourcelink = True |
235 | | - |
236 | | -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
237 | | -# |
238 | | -# html_show_sphinx = True |
239 | | - |
240 | | -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
241 | | -# |
242 | | -# html_show_copyright = True |
243 | | - |
244 | | -# If true, an OpenSearch description file will be output, and all pages will |
245 | | -# contain a <link> tag referring to it. The value of this option must be the |
246 | | -# base URL from which the finished HTML is served. |
247 | | -# |
248 | | -# html_use_opensearch = '' |
249 | | - |
250 | | -# This is the file name suffix for HTML files (e.g. ".xhtml"). |
251 | | -# html_file_suffix = None |
252 | | - |
253 | | -# Language to be used for generating the HTML full-text search index. |
254 | | -# Sphinx supports the following languages: |
255 | | -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' |
256 | | -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh' |
257 | | -# |
258 | | -# html_search_language = 'en' |
259 | | - |
260 | | -# A dictionary with options for the search language support, empty by default. |
261 | | -# 'ja' uses this config value. |
262 | | -# 'zh' user can custom change `jieba` dictionary path. |
263 | | -# |
264 | | -# html_search_options = {'type': 'default'} |
265 | | - |
266 | | -# The name of a javascript file (relative to the configuration directory) that |
267 | | -# implements a search results scorer. If empty, the default will be used. |
| 121 | +# The name of an image file (relative to this directory) to use as a favicon of |
| 122 | +# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| 123 | +# pixels large. |
268 | 124 | # |
269 | | -# html_search_scorer = 'scorer.js' |
| 125 | +html_favicon = "_static/favicon.ico" |
270 | 126 |
|
271 | 127 | # Output file base name for HTML help builder. |
272 | | -htmlhelp_basename = "AdafruitAMG88xxLibrarydoc" |
| 128 | +htmlhelp_basename = "Adafruit_CircuitPython_AMG8xx_Librarydoc" |
273 | 129 |
|
274 | 130 | # -- Options for LaTeX output --------------------------------------------- |
275 | 131 |
|
276 | 132 | latex_elements = { |
277 | 133 | # The paper size ('letterpaper' or 'a4paper'). |
278 | | - # |
279 | 134 | # 'papersize': 'letterpaper', |
280 | 135 | # The font size ('10pt', '11pt' or '12pt'). |
281 | | - # |
282 | 136 | # 'pointsize': '10pt', |
283 | 137 | # Additional stuff for the LaTeX preamble. |
284 | | - # |
285 | 138 | # 'preamble': '', |
286 | 139 | # Latex figure (float) alignment |
287 | | - # |
288 | 140 | # 'figure_align': 'htbp', |
289 | 141 | } |
290 | 142 |
|
|
294 | 146 | latex_documents = [ |
295 | 147 | ( |
296 | 148 | master_doc, |
297 | | - "AdafruitAMG88xxLibrary.tex", |
298 | | - "Adafruit AMG88xx Library Documentation", |
299 | | - "Dean Miller", |
| 149 | + "Adafruit_CircuitPython_AMG88xx_Library.tex", |
| 150 | + "Adafruit CircuitPython AMG88xx Library Documentation", |
| 151 | + author, |
300 | 152 | "manual", |
301 | 153 | ), |
302 | 154 | ] |
303 | 155 |
|
304 | | -# The name of an image file (relative to this directory) to place at the top of |
305 | | -# the title page. |
306 | | -# |
307 | | -# latex_logo = None |
308 | | - |
309 | | -# For "manual" documents, if this is true, then toplevel headings are parts, |
310 | | -# not chapters. |
311 | | -# |
312 | | -# latex_use_parts = False |
313 | | - |
314 | | -# If true, show page references after internal links. |
315 | | -# |
316 | | -# latex_show_pagerefs = False |
317 | | - |
318 | | -# If true, show URL addresses after external links. |
319 | | -# |
320 | | -# latex_show_urls = False |
321 | | - |
322 | | -# Documents to append as an appendix to all manuals. |
323 | | -# |
324 | | -# latex_appendices = [] |
325 | | - |
326 | | -# It false, will not define \strong, \code, itleref, \crossref ... but only |
327 | | -# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added |
328 | | -# packages. |
329 | | -# |
330 | | -# latex_keep_old_macro_names = True |
331 | | - |
332 | | -# If false, no module index is generated. |
333 | | -# |
334 | | -# latex_domain_indices = True |
335 | | - |
336 | | - |
337 | 156 | # -- Options for manual page output --------------------------------------- |
338 | 157 |
|
339 | 158 | # One entry per manual page. List of tuples |
|
345 | 164 | "Adafruit AMG88xx Library Documentation", |
346 | 165 | [author], |
347 | 166 | 1, |
348 | | - ) |
| 167 | + ), |
349 | 168 | ] |
350 | 169 |
|
351 | | -# If true, show URL addresses after external links. |
352 | | -# |
353 | | -# man_show_urls = False |
354 | | - |
355 | | - |
356 | 170 | # -- Options for Texinfo output ------------------------------------------- |
357 | 171 |
|
358 | 172 | # Grouping the document tree into Texinfo files. List of tuples |
|
369 | 183 | "Miscellaneous", |
370 | 184 | ), |
371 | 185 | ] |
372 | | - |
373 | | -# Documents to append as an appendix to all manuals. |
374 | | -# |
375 | | -# texinfo_appendices = [] |
376 | | - |
377 | | -# If false, no module index is generated. |
378 | | -# |
379 | | -# texinfo_domain_indices = True |
380 | | - |
381 | | -# How to display URL addresses: 'footnote', 'no', or 'inline'. |
382 | | -# |
383 | | -# texinfo_show_urls = 'footnote' |
384 | | - |
385 | | -# If true, do not generate a @detailmenu in the "Top" node's menu. |
386 | | -# |
387 | | -# texinfo_no_detailmenu = False |
388 | | - |
389 | | -intersphinx_mapping = { |
390 | | - "python": ("https://docs.python.org/3", None), |
391 | | - "CircuitPython": ("https://docs.circuitpython.org/en/latest/", None), |
392 | | -} |
0 commit comments