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