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