Skip to content

Commit d57762c

Browse files
committed
update docs conf
1 parent 3025236 commit d57762c

File tree

1 file changed

+30
-235
lines changed

1 file changed

+30
-235
lines changed

docs/conf.py

Lines changed: 30 additions & 235 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 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.
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,37 +10,36 @@
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",
4019
"sphinx.ext.intersphinx",
20+
"sphinx.ext.napoleon",
21+
"sphinx.ext.todo",
4122
]
4223

24+
# TODO: Please Read!
4325
# Uncomment the below if you use native CircuitPython modules such as
4426
# digitalio, micropython and busio. List the modules you use. Without it, the
4527
# autodoc module docs will fail to generate with a warning.
4628
autodoc_mock_imports = ["adafruit_bus_device", "adafruit_register"]
4729

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+
4839
# Add any paths that contain templates here, relative to this directory.
4940
templates_path = ["_templates"]
5041

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"
6043

6144
# The master toctree document.
6245
master_doc = "index"
@@ -87,19 +70,16 @@
8770
# Usually you set "language" from the command line for these cases.
8871
language = "en"
8972

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-
9973
# List of patterns, relative to source directory, that match files and
10074
# directories to ignore when looking for source files.
10175
# 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+
]
10383

10484
# The reST default role (used for this markup: `text`) to use for all
10585
# documents.
@@ -108,160 +88,38 @@
10888

10989
# If true, '()' will be appended to :func: etc. cross-reference text.
11090
#
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
12292

12393
# The name of the Pygments (syntax highlighting) style to use.
12494
pygments_style = "sphinx"
12595

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-
13296
# If true, `todo` and `todoList` produce output, else they produce nothing.
13397
todo_include_todos = False
13498

13599
# If this is True, todo emits a warning for each TODO entries. The default is False.
136100
todo_emit_warnings = True
137101

102+
napoleon_numpy_docstring = False
103+
138104
# -- Options for HTML output ----------------------------------------------
139105

140106
# The theme to use for HTML and HTML Help pages. See the documentation for
141107
# a list of builtin themes.
142108
#
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
178110

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"
183112

184113
# Add any paths that contain custom static files (such as style sheets) here,
185114
# relative to this directory. They are copied after the builtin static files,
186115
# so a file named "default.css" will overwrite the builtin "default.css".
187116
html_static_path = ["_static"]
188117

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.
263121
#
264-
# html_search_scorer = 'scorer.js'
122+
html_favicon = "_static/favicon.ico"
265123

266124
# Output file base name for HTML help builder.
267125
# htmlhelp_basename = 'AdafruitsPCF8523RTCLibrarydoc'
@@ -270,16 +128,12 @@
270128

271129
latex_elements = {
272130
# The paper size ('letterpaper' or 'a4paper').
273-
#
274131
# 'papersize': 'letterpaper',
275132
# The font size ('10pt', '11pt' or '12pt').
276-
#
277133
# 'pointsize': '10pt',
278134
# Additional stuff for the LaTeX preamble.
279-
#
280135
# 'preamble': '',
281136
# Latex figure (float) alignment
282-
#
283137
# 'figure_align': 'htbp',
284138
}
285139

@@ -296,39 +150,6 @@
296150
),
297151
]
298152

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-
332153
# -- Options for manual page output ---------------------------------------
333154

334155
# One entry per manual page. List of tuples
@@ -340,14 +161,9 @@
340161
"Adafruit PCF8523 RTC Library Documentation",
341162
[author],
342163
1,
343-
)
164+
),
344165
]
345166

346-
# If true, show URL addresses after external links.
347-
#
348-
# man_show_urls = False
349-
350-
351167
# -- Options for Texinfo output -------------------------------------------
352168

353169
# Grouping the document tree into Texinfo files. List of tuples
@@ -364,24 +180,3 @@
364180
"Miscellaneous",
365181
),
366182
]
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

Comments
 (0)