Skip to content

Commit 0ae62e9

Browse files
committed
update docs config
1 parent fb92e23 commit 0ae62e9

File tree

1 file changed

+20
-244
lines changed

1 file changed

+20
-244
lines changed

docs/conf.py

Lines changed: 20 additions & 244 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,6 @@
22
#
33
# SPDX-License-Identifier: MIT
44

5-
# Adafruit's CCS811 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-
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,48 +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",
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.
4728
# autodoc_mock_imports = ["micropython", "adafruit_bus_device", "adafruit_register"]
4829

4930
intersphinx_mapping = {
5031
"python": ("https://docs.python.org/3", None),
51-
"BusDevice": (
52-
"https://docs.circuitpython.org/projects/busdevice/en/latest/",
53-
None,
54-
),
5532
"CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
5633
}
5734

35+
# Show the docstring from both the class and its __init__() method.
36+
autoclass_content = "both"
37+
5838
# Add any paths that contain templates here, relative to this directory.
5939
templates_path = ["_templates"]
6040

61-
# The suffix(es) of source filenames.
62-
# You can specify multiple suffix as a list of string:
63-
#
64-
# source_suffix = ['.rst', '.md']
6541
source_suffix = ".rst"
6642

67-
# The encoding of source files.
68-
#
69-
# source_encoding = 'utf-8-sig'
70-
7143
# The master toctree document.
7244
master_doc = "index"
7345

@@ -97,19 +69,16 @@
9769
# Usually you set "language" from the command line for these cases.
9870
language = "en"
9971

100-
# There are two options for replacing |today|: either, you set today to some
101-
# non-false value, then it is used:
102-
#
103-
# today = ''
104-
#
105-
# Else, today_fmt is used as the format for a strftime call.
106-
#
107-
# today_fmt = '%B %d, %Y'
108-
10972
# List of patterns, relative to source directory, that match files and
11073
# directories to ignore when looking for source files.
11174
# This patterns also effect to html_static_path and html_extra_path
112-
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"]
75+
exclude_patterns = [
76+
"_build",
77+
"Thumbs.db",
78+
".DS_Store",
79+
".env",
80+
"CODE_OF_CONDUCT.md",
81+
]
11382

11483
# The reST default role (used for this markup: `text`) to use for all
11584
# documents.
@@ -118,80 +87,27 @@
11887

11988
# If true, '()' will be appended to :func: etc. cross-reference text.
12089
#
121-
# add_function_parentheses = True
122-
123-
# If true, the current module name will be prepended to all description
124-
# unit titles (such as .. function::).
125-
#
126-
# add_module_names = True
127-
128-
# If true, sectionauthor and moduleauthor directives will be shown in the
129-
# output. They are ignored by default.
130-
#
131-
# show_authors = False
90+
add_function_parentheses = True
13291

13392
# The name of the Pygments (syntax highlighting) style to use.
13493
pygments_style = "sphinx"
13594

136-
# A list of ignored prefixes for module index sorting.
137-
# modindex_common_prefix = []
138-
139-
# If true, keep warnings as "system message" paragraphs in the built documents.
140-
# keep_warnings = False
141-
14295
# If true, `todo` and `todoList` produce output, else they produce nothing.
143-
todo_include_todos = True
96+
todo_include_todos = False
14497

14598
# If this is True, todo emits a warning for each TODO entries. The default is False.
14699
todo_emit_warnings = True
147100

101+
napoleon_numpy_docstring = False
148102

149103
# -- Options for HTML output ----------------------------------------------
150104

151105
# The theme to use for HTML and HTML Help pages. See the documentation for
152106
# a list of builtin themes.
153107
#
154-
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
155-
156-
if not on_rtd: # only import and set the theme if we're building docs locally
157-
try:
158-
import sphinx_rtd_theme
159-
160-
html_theme = "sphinx_rtd_theme"
161-
except ImportError:
162-
html_theme = "default"
163-
html_theme_path = ["."]
164-
else:
165-
html_theme_path = ["."]
166-
167-
# Theme options are theme-specific and customize the look and feel of a theme
168-
# further. For a list of options available for each theme, see the
169-
# documentation.
170-
#
171-
# html_theme_options = {}
172-
173-
# Add any paths that contain custom themes here, relative to this directory.
174-
# html_theme_path = []
175-
176-
# The name for this set of Sphinx documents.
177-
# "<project> v<release> documentation" by default.
178-
#
179-
# html_title = u'Adafruit\'s CCS811 Library v1.0'
108+
import sphinx_rtd_theme
180109

181-
# A shorter title for the navigation bar. Default is the same as html_title.
182-
#
183-
# html_short_title = None
184-
185-
# The name of an image file (relative to this directory) to place at the top
186-
# of the sidebar.
187-
#
188-
# html_logo = None
189-
190-
# The name of an image file (relative to this directory) to use as a favicon of
191-
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
192-
# pixels large.
193-
#
194-
# html_favicon = None
110+
html_theme = "sphinx_rtd_theme"
195111

196112
# Add any paths that contain custom static files (such as style sheets) here,
197113
# relative to this directory. They are copied after the builtin static files,
@@ -204,100 +120,19 @@
204120
#
205121
html_favicon = "_static/favicon.ico"
206122

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

287126
# -- Options for LaTeX output ---------------------------------------------
288127

289128
latex_elements = {
290129
# The paper size ('letterpaper' or 'a4paper').
291-
#
292130
# 'papersize': 'letterpaper',
293131
# The font size ('10pt', '11pt' or '12pt').
294-
#
295132
# 'pointsize': '10pt',
296133
# Additional stuff for the LaTeX preamble.
297-
#
298134
# 'preamble': '',
299135
# Latex figure (float) alignment
300-
#
301136
# 'figure_align': 'htbp',
302137
}
303138

@@ -314,39 +149,6 @@
314149
),
315150
]
316151

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

352154
# One entry per manual page. List of tuples
@@ -358,14 +160,9 @@
358160
"Adafruit's CCS811 Library Documentation",
359161
[author],
360162
1,
361-
)
163+
),
362164
]
363165

364-
# If true, show URL addresses after external links.
365-
#
366-
# man_show_urls = False
367-
368-
369166
# -- Options for Texinfo output -------------------------------------------
370167

371168
# Grouping the document tree into Texinfo files. List of tuples
@@ -382,24 +179,3 @@
382179
"Miscellaneous",
383180
),
384181
]
385-
386-
# Documents to append as an appendix to all manuals.
387-
#
388-
# texinfo_appendices = []
389-
390-
# If false, no module index is generated.
391-
#
392-
# texinfo_domain_indices = True
393-
394-
# How to display URL addresses: 'footnote', 'no', or 'inline'.
395-
#
396-
# texinfo_show_urls = 'footnote'
397-
398-
# If true, do not generate a @detailmenu in the "Top" node's menu.
399-
#
400-
# texinfo_no_detailmenu = False
401-
402-
intersphinx_mapping = {
403-
"python": ("https://docs.python.org/3", None),
404-
"CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
405-
}

0 commit comments

Comments
 (0)