|
1 | 1 | # -*- coding: utf-8 -*-
|
2 | 2 |
|
| 3 | +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries |
| 4 | +# |
| 5 | +# SPDX-License-Identifier: MIT |
| 6 | + |
3 | 7 | import os
|
4 | 8 | import sys
|
5 |
| -sys.path.insert(0, os.path.abspath('..')) |
| 9 | + |
| 10 | +sys.path.insert(0, os.path.abspath("..")) |
6 | 11 |
|
7 | 12 | # -- General configuration ------------------------------------------------
|
8 | 13 |
|
9 | 14 | # Add any Sphinx extension module names here, as strings. They can be
|
10 | 15 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
11 | 16 | # ones.
|
12 | 17 | extensions = [
|
13 |
| - 'sphinx.ext.autodoc', |
14 |
| - 'sphinx.ext.intersphinx', |
15 |
| - 'sphinx.ext.napoleon', |
16 |
| - 'sphinx.ext.todo', |
| 18 | + "sphinx.ext.autodoc", |
| 19 | + "sphinx.ext.intersphinx", |
| 20 | + "sphinx.ext.napoleon", |
| 21 | + "sphinx.ext.todo", |
17 | 22 | ]
|
18 | 23 |
|
19 |
| -autodoc_mock_imports = ["digitalio", "busio"] |
| 24 | +# TODO: Please Read! |
| 25 | +# Uncomment the below if you use native CircuitPython modules such as |
| 26 | +# digitalio, micropython and busio. List the modules you use. Without it, the |
| 27 | +# autodoc module docs will fail to generate with a warning. |
| 28 | +# autodoc_mock_imports = ["digitalio", "busio"] |
20 | 29 |
|
21 | 30 |
|
22 |
| -intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)} |
| 31 | +intersphinx_mapping = { |
| 32 | + "python": ("https://docs.python.org/3.4", None),"BusDevice": ("https://circuitpython.readthedocs.io/projects/busdevice/en/latest/", None), |
| 33 | + |
| 34 | + "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), |
| 35 | +} |
| 36 | + |
| 37 | +# Show the docstring from both the class and its __init__() method. |
| 38 | +autoclass_content = "both" |
23 | 39 |
|
24 | 40 | # Add any paths that contain templates here, relative to this directory.
|
25 |
| -templates_path = ['_templates'] |
| 41 | +templates_path = ["_templates"] |
26 | 42 |
|
27 |
| -source_suffix = '.rst' |
| 43 | +source_suffix = ".rst" |
28 | 44 |
|
29 | 45 | # The master toctree document.
|
30 |
| -master_doc = 'index' |
| 46 | +master_doc = "index" |
31 | 47 |
|
32 | 48 | # General information about the project.
|
33 |
| -project = u'Sparkfun QwiicAS3935 Library' |
34 |
| -copyright = u'2019 Gaston Williams' |
35 |
| -author = u'Gaston Williams' |
| 49 | +project = "Sparkfun CircuitPython QwiicAS3935 Library" |
| 50 | +copyright = "2021 Gaston Williams" |
| 51 | +author = "Gaston Williams" |
36 | 52 |
|
37 | 53 | # The version info for the project you're documenting, acts as replacement for
|
38 | 54 | # |version| and |release|, also used in various other places throughout the
|
39 | 55 | # built documents.
|
40 | 56 | #
|
41 | 57 | # The short X.Y version.
|
42 |
| -version = u'1.0' |
| 58 | +version = "1.0" |
43 | 59 | # The full version, including alpha/beta/rc tags.
|
44 |
| -release = u'1.0' |
| 60 | +release = "1.0" |
45 | 61 |
|
46 | 62 | # The language for content autogenerated by Sphinx. Refer to documentation
|
47 | 63 | # for a list of supported languages.
|
|
53 | 69 | # List of patterns, relative to source directory, that match files and
|
54 | 70 | # directories to ignore when looking for source files.
|
55 | 71 | # This patterns also effect to html_static_path and html_extra_path
|
56 |
| -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.env', 'CODE_OF_CONDUCT.md'] |
| 72 | +exclude_patterns = [ |
| 73 | + "_build", |
| 74 | + "Thumbs.db", |
| 75 | + ".DS_Store", |
| 76 | + ".env", |
| 77 | + "CODE_OF_CONDUCT.md", |
| 78 | +] |
57 | 79 |
|
58 | 80 | # The reST default role (used for this markup: `text`) to use for all
|
59 | 81 | # documents.
|
|
65 | 87 | add_function_parentheses = True
|
66 | 88 |
|
67 | 89 | # The name of the Pygments (syntax highlighting) style to use.
|
68 |
| -pygments_style = 'sphinx' |
| 90 | +pygments_style = "sphinx" |
69 | 91 |
|
70 | 92 | # If true, `todo` and `todoList` produce output, else they produce nothing.
|
71 | 93 | todo_include_todos = False
|
|
80 | 102 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
81 | 103 | # a list of builtin themes.
|
82 | 104 | #
|
83 |
| -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' |
| 105 | +on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
84 | 106 |
|
85 | 107 | if not on_rtd: # only import and set the theme if we're building docs locally
|
86 | 108 | try:
|
87 | 109 | import sphinx_rtd_theme
|
88 |
| - html_theme = 'sphinx_rtd_theme' |
89 |
| - html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.'] |
| 110 | + |
| 111 | + html_theme = "sphinx_rtd_theme" |
| 112 | + html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] |
90 | 113 | except:
|
91 |
| - html_theme = 'default' |
92 |
| - html_theme_path = ['.'] |
| 114 | + html_theme = "default" |
| 115 | + html_theme_path = ["."] |
93 | 116 | else:
|
94 |
| - html_theme_path = ['.'] |
| 117 | + html_theme_path = ["."] |
95 | 118 |
|
96 | 119 | # Add any paths that contain custom static files (such as style sheets) here,
|
97 | 120 | # relative to this directory. They are copied after the builtin static files,
|
98 | 121 | # so a file named "default.css" will overwrite the builtin "default.css".
|
99 |
| -html_static_path = ['_static'] |
| 122 | +html_static_path = ["_static"] |
100 | 123 |
|
101 | 124 | # The name of an image file (relative to this directory) to use as a favicon of
|
102 | 125 | # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
103 | 126 | # pixels large.
|
104 | 127 | #
|
105 |
| -html_favicon = '_static/favicon.ico' |
| 128 | +html_favicon = "_static/favicon.ico" |
106 | 129 |
|
107 | 130 | # Output file base name for HTML help builder.
|
108 |
| -htmlhelp_basename = 'SparkfunQwiicas3935Librarydoc' |
| 131 | +htmlhelp_basename = "Sparkfun_CircuitPython_Qwiicas3935_Librarydoc" |
109 | 132 |
|
110 | 133 | # -- Options for LaTeX output ---------------------------------------------
|
111 | 134 |
|
112 | 135 | latex_elements = {
|
113 |
| - # The paper size ('letterpaper' or 'a4paper'). |
114 |
| - # |
115 |
| - # 'papersize': 'letterpaper', |
116 |
| - |
117 |
| - # The font size ('10pt', '11pt' or '12pt'). |
118 |
| - # |
119 |
| - # 'pointsize': '10pt', |
120 |
| - |
121 |
| - # Additional stuff for the LaTeX preamble. |
122 |
| - # |
123 |
| - # 'preamble': '', |
124 |
| - |
125 |
| - # Latex figure (float) alignment |
126 |
| - # |
127 |
| - # 'figure_align': 'htbp', |
| 136 | + # The paper size ('letterpaper' or 'a4paper'). |
| 137 | + # 'papersize': 'letterpaper', |
| 138 | + # The font size ('10pt', '11pt' or '12pt'). |
| 139 | + # 'pointsize': '10pt', |
| 140 | + # Additional stuff for the LaTeX preamble. |
| 141 | + # 'preamble': '', |
| 142 | + # Latex figure (float) alignment |
| 143 | + # 'figure_align': 'htbp', |
128 | 144 | }
|
129 | 145 |
|
130 | 146 | # Grouping the document tree into LaTeX files. List of tuples
|
131 | 147 | # (source start file, target name, title,
|
132 | 148 | # author, documentclass [howto, manual, or own class]).
|
133 | 149 | latex_documents = [
|
134 |
| - (master_doc, 'SparkfunQwiicAS3935Library.tex', u'SparkfunQwiicAS3935 Library Documentation', |
135 |
| - author, 'manual'), |
| 150 | + ( |
| 151 | + master_doc, |
| 152 | + "Sparkfun_CircuitPython_QwiicAS3935_Library.tex", |
| 153 | + "Sparkfun CircuitPython QwiicAS3935 Library Documentation", |
| 154 | + author, |
| 155 | + "manual", |
| 156 | + ), |
136 | 157 | ]
|
137 | 158 |
|
138 | 159 | # -- Options for manual page output ---------------------------------------
|
139 | 160 |
|
140 | 161 | # One entry per manual page. List of tuples
|
141 | 162 | # (source start file, name, description, authors, manual section).
|
142 | 163 | man_pages = [
|
143 |
| - (master_doc, 'SparkfunQwiicAS3935library', u'Sparkfun QwiicAS3935 Library Documentation', |
144 |
| - [author], 1) |
| 164 | + ( |
| 165 | + master_doc, |
| 166 | + "Sparkfun_CircuitPython_QwiicAS3935_Library", |
| 167 | + "Sparkfun CircuitPython QwiicAS3935 Library Documentation", |
| 168 | + [author], |
| 169 | + 1, |
| 170 | + ), |
145 | 171 | ]
|
146 | 172 |
|
147 | 173 | # -- Options for Texinfo output -------------------------------------------
|
|
150 | 176 | # (source start file, target name, title, author,
|
151 | 177 | # dir menu entry, description, category)
|
152 | 178 | texinfo_documents = [
|
153 |
| - (master_doc, 'SparkfunQwiicAS3935Library', u'Sparkfun QwiicAS3935 Library Documentation', |
154 |
| - author, 'SparkfunQwiicAS3935Library', 'One line description of project.', |
155 |
| - 'Miscellaneous'), |
| 179 | + ( |
| 180 | + master_doc, |
| 181 | + "Sparkfun_CircuitPython_QwiicAS3935_Library", |
| 182 | + "Sparkfun CircuitPython QwiicAS3935 Library Documentation", |
| 183 | + author, |
| 184 | + "Sparkfun_CircuitPython_QwiicAS3935_Library", |
| 185 | + "One line description of project.", |
| 186 | + "Miscellaneous", |
| 187 | + ), |
156 | 188 | ]
|
0 commit comments