Skip to content

Commit 4afdf30

Browse files
committed
update docs conf
1 parent 020b340 commit 4afdf30

File tree

1 file changed

+19
-234
lines changed

1 file changed

+19
-234
lines changed

docs/conf.py

Lines changed: 19 additions & 234 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
11
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
22
#
33
# SPDX-License-Identifier: MIT
4-
#
5-
# Adafruit's DS3231 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.
164

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-
#
215
import datetime
226
import os
237
import sys
@@ -26,21 +10,18 @@
2610

2711
# -- General configuration ------------------------------------------------
2812

29-
# If your documentation needs a minimal Sphinx version, state it here.
30-
#
31-
# needs_sphinx = '1.0'
32-
3313
# Add any Sphinx extension module names here, as strings. They can be
3414
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3515
# ones.
3616
extensions = [
3717
"sphinx.ext.autodoc",
3818
"sphinxcontrib.jquery",
39-
"sphinx.ext.todo",
40-
"sphinx.ext.viewcode",
4119
"sphinx.ext.intersphinx",
20+
"sphinx.ext.napoleon",
21+
"sphinx.ext.todo",
4222
]
4323

24+
# TODO: Please Read!
4425
# Uncomment the below if you use native CircuitPython modules such as
4526
# digitalio, micropython and busio. List the modules you use. Without it, the
4627
# autodoc module docs will fail to generate with a warning.
@@ -59,18 +40,13 @@
5940
"CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
6041
}
6142

43+
# Show the docstring from both the class and its __init__() method.
44+
autoclass_content = "both"
45+
6246
# Add any paths that contain templates here, relative to this directory.
6347
templates_path = ["_templates"]
6448

65-
# The suffix(es) of source filenames.
66-
# You can specify multiple suffix as a list of string:
67-
#
68-
source_suffix = [".rst", ".md"]
69-
# source_suffix = '.rst'
70-
71-
# The encoding of source files.
72-
#
73-
# source_encoding = 'utf-8-sig'
49+
source_suffix = ".rst"
7450

7551
# The master toctree document.
7652
master_doc = "index"
@@ -101,19 +77,16 @@
10177
# Usually you set "language" from the command line for these cases.
10278
language = "en"
10379

104-
# There are two options for replacing |today|: either, you set today to some
105-
# non-false value, then it is used:
106-
#
107-
# today = ''
108-
#
109-
# Else, today_fmt is used as the format for a strftime call.
110-
#
111-
# today_fmt = '%B %d, %Y'
112-
11380
# List of patterns, relative to source directory, that match files and
11481
# directories to ignore when looking for source files.
11582
# This patterns also effect to html_static_path and html_extra_path
116-
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"]
83+
exclude_patterns = [
84+
"_build",
85+
"Thumbs.db",
86+
".DS_Store",
87+
".env",
88+
"CODE_OF_CONDUCT.md",
89+
]
11790

11891
# The reST default role (used for this markup: `text`) to use for all
11992
# documents.
@@ -124,78 +97,25 @@
12497
#
12598
add_function_parentheses = True
12699

127-
# If true, the current module name will be prepended to all description
128-
# unit titles (such as .. function::).
129-
#
130-
# add_module_names = True
131-
132-
# If true, sectionauthor and moduleauthor directives will be shown in the
133-
# output. They are ignored by default.
134-
#
135-
# show_authors = False
136-
137100
# The name of the Pygments (syntax highlighting) style to use.
138101
pygments_style = "sphinx"
139102

140-
# A list of ignored prefixes for module index sorting.
141-
# modindex_common_prefix = []
142-
143-
# If true, keep warnings as "system message" paragraphs in the built documents.
144-
# keep_warnings = False
145-
146103
# If true, `todo` and `todoList` produce output, else they produce nothing.
147-
todo_include_todos = True
104+
todo_include_todos = False
148105

149106
# If this is True, todo emits a warning for each TODO entries. The default is False.
150107
todo_emit_warnings = True
151108

109+
napoleon_numpy_docstring = False
152110

153111
# -- Options for HTML output ----------------------------------------------
154112

155113
# The theme to use for HTML and HTML Help pages. See the documentation for
156114
# a list of builtin themes.
157115
#
158-
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
159-
160-
if not on_rtd: # only import and set the theme if we're building docs locally
161-
try:
162-
import sphinx_rtd_theme
163-
164-
html_theme = "sphinx_rtd_theme"
165-
except ImportError:
166-
html_theme = "default"
167-
html_theme_path = ["."]
168-
else:
169-
html_theme_path = ["."]
170-
171-
# Theme options are theme-specific and customize the look and feel of a theme
172-
# further. For a list of options available for each theme, see the
173-
# documentation.
174-
#
175-
# html_theme_options = {}
176-
177-
# Add any paths that contain custom themes here, relative to this directory.
178-
# html_theme_path = []
179-
180-
# The name for this set of Sphinx documents.
181-
# "<project> v<release> documentation" by default.
182-
#
183-
# html_title = u'Adafruit\'s DS3231 RTC Library v1.0'
184-
185-
# A shorter title for the navigation bar. Default is the same as html_title.
186-
#
187-
# html_short_title = None
116+
import sphinx_rtd_theme
188117

189-
# The name of an image file (relative to this directory) to place at the top
190-
# of the sidebar.
191-
#
192-
# html_logo = None
193-
194-
# The name of an image file (relative to this directory) to use as a favicon of
195-
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
196-
# pixels large.
197-
#
198-
# html_favicon = None
118+
html_theme = "sphinx_rtd_theme"
199119

200120
# Add any paths that contain custom static files (such as style sheets) here,
201121
# relative to this directory. They are copied after the builtin static files,
@@ -208,100 +128,19 @@
208128
#
209129
html_favicon = "_static/favicon.ico"
210130

211-
# Add any extra paths that contain custom files (such as robots.txt or
212-
# .htaccess) here, relative to this directory. These files are copied
213-
# directly to the root of the documentation.
214-
#
215-
# html_extra_path = []
216-
217-
# If not None, a 'Last updated on:' timestamp is inserted at every page
218-
# bottom, using the given strftime format.
219-
# The empty string is equivalent to '%b %d, %Y'.
220-
#
221-
# html_last_updated_fmt = None
222-
223-
# If true, SmartyPants will be used to convert quotes and dashes to
224-
# typographically correct entities.
225-
#
226-
# html_use_smartypants = True
227-
228-
# Custom sidebar templates, maps document names to template names.
229-
#
230-
# html_sidebars = {}
231-
232-
# Additional templates that should be rendered to pages, maps page names to
233-
# template names.
234-
#
235-
# html_additional_pages = {}
236-
237-
# If false, no module index is generated.
238-
#
239-
# html_domain_indices = True
240-
241-
# If false, no index is generated.
242-
#
243-
# html_use_index = True
244-
245-
# If true, the index is split into individual pages for each letter.
246-
#
247-
# html_split_index = False
248-
249-
# If true, links to the reST sources are added to the pages.
250-
#
251-
# html_show_sourcelink = True
252-
253-
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
254-
#
255-
# html_show_sphinx = True
256-
257-
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
258-
#
259-
# html_show_copyright = True
260-
261-
# If true, an OpenSearch description file will be output, and all pages will
262-
# contain a <link> tag referring to it. The value of this option must be the
263-
# base URL from which the finished HTML is served.
264-
#
265-
# html_use_opensearch = ''
266-
267-
# This is the file name suffix for HTML files (e.g. ".xhtml").
268-
# html_file_suffix = None
269-
270-
# Language to be used for generating the HTML full-text search index.
271-
# Sphinx supports the following languages:
272-
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
273-
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'
274-
#
275-
# html_search_language = 'en'
276-
277-
# A dictionary with options for the search language support, empty by default.
278-
# 'ja' uses this config value.
279-
# 'zh' user can custom change `jieba` dictionary path.
280-
#
281-
# html_search_options = {'type': 'default'}
282-
283-
# The name of a javascript file (relative to the configuration directory) that
284-
# implements a search results scorer. If empty, the default will be used.
285-
#
286-
# html_search_scorer = 'scorer.js'
287-
288131
# Output file base name for HTML help builder.
289132
htmlhelp_basename = "AdafruitsDS3231RTCLibrarydoc"
290133

291134
# -- Options for LaTeX output ---------------------------------------------
292135

293136
latex_elements = {
294137
# The paper size ('letterpaper' or 'a4paper').
295-
#
296138
# 'papersize': 'letterpaper',
297139
# The font size ('10pt', '11pt' or '12pt').
298-
#
299140
# 'pointsize': '10pt',
300141
# Additional stuff for the LaTeX preamble.
301-
#
302142
# 'preamble': '',
303143
# Latex figure (float) alignment
304-
#
305144
# 'figure_align': 'htbp',
306145
}
307146

@@ -318,39 +157,6 @@
318157
),
319158
]
320159

321-
# The name of an image file (relative to this directory) to place at the top of
322-
# the title page.
323-
#
324-
# latex_logo = None
325-
326-
# For "manual" documents, if this is true, then toplevel headings are parts,
327-
# not chapters.
328-
#
329-
# latex_use_parts = False
330-
331-
# If true, show page references after internal links.
332-
#
333-
# latex_show_pagerefs = False
334-
335-
# If true, show URL addresses after external links.
336-
#
337-
# latex_show_urls = False
338-
339-
# Documents to append as an appendix to all manuals.
340-
#
341-
# latex_appendices = []
342-
343-
# It false, will not define \strong, \code, itleref, \crossref ... but only
344-
# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
345-
# packages.
346-
#
347-
# latex_keep_old_macro_names = True
348-
349-
# If false, no module index is generated.
350-
#
351-
# latex_domain_indices = True
352-
353-
354160
# -- Options for manual page output ---------------------------------------
355161

356162
# One entry per manual page. List of tuples
@@ -362,14 +168,9 @@
362168
"Adafruit's DS3231 RTC Library Documentation",
363169
[author],
364170
1,
365-
)
171+
),
366172
]
367173

368-
# If true, show URL addresses after external links.
369-
#
370-
# man_show_urls = False
371-
372-
373174
# -- Options for Texinfo output -------------------------------------------
374175

375176
# Grouping the document tree into Texinfo files. List of tuples
@@ -386,19 +187,3 @@
386187
"Miscellaneous",
387188
),
388189
]
389-
390-
# Documents to append as an appendix to all manuals.
391-
#
392-
# texinfo_appendices = []
393-
394-
# If false, no module index is generated.
395-
#
396-
# texinfo_domain_indices = True
397-
398-
# How to display URL addresses: 'footnote', 'no', or 'inline'.
399-
#
400-
# texinfo_show_urls = 'footnote'
401-
402-
# If true, do not generate a @detailmenu in the "Top" node's menu.
403-
#
404-
# texinfo_no_detailmenu = False

0 commit comments

Comments
 (0)