|
1 | 1 | # -*- coding: utf-8 -*- |
2 | 2 |
|
3 | | -# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries |
| 3 | +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries |
4 | 4 | # |
5 | 5 | # SPDX-License-Identifier: MIT |
6 | 6 |
|
|
19 | 19 | "sphinx.ext.autodoc", |
20 | 20 | "sphinxcontrib.jquery", |
21 | 21 | "sphinx.ext.intersphinx", |
22 | | - "sphinx.ext.viewcode", |
| 22 | + "sphinx.ext.napoleon", |
| 23 | + "sphinx.ext.todo", |
23 | 24 | ] |
24 | 25 |
|
25 | | -# API docs fix |
| 26 | +# TODO: Please Read! |
| 27 | +# Uncomment the below if you use native CircuitPython modules such as |
| 28 | +# digitalio, micropython and busio. List the modules you use. Without it, the |
| 29 | +# autodoc module docs will fail to generate with a warning. |
| 30 | +# autodoc_mock_imports = ["digitalio", "busio"] |
| 31 | + |
| 32 | +autodoc_preserve_defaults = True |
| 33 | + |
| 34 | + |
26 | 35 | intersphinx_mapping = { |
27 | 36 | "python": ("https://docs.python.org/3", None), |
28 | | - "BusDevice": ( |
29 | | - "https://docs.circuitpython.org/projects/busdevice/en/latest/", |
30 | | - None, |
31 | | - ), |
32 | 37 | "CircuitPython": ("https://docs.circuitpython.org/en/latest/", None), |
33 | 38 | } |
34 | 39 |
|
| 40 | +# Show the docstring from both the class and its __init__() method. |
| 41 | +autoclass_content = "both" |
| 42 | + |
35 | 43 | # Add any paths that contain templates here, relative to this directory. |
36 | 44 | templates_path = ["_templates"] |
37 | 45 |
|
|
41 | 49 | master_doc = "index" |
42 | 50 |
|
43 | 51 | # General information about the project. |
44 | | -project = "Adafruit BME280 Library" |
45 | | -creation_year = "2017" |
| 52 | +project = "CircuitPython CircuitPython Fake BME280 Library" |
| 53 | +creation_year = "2024" |
46 | 54 | current_year = str(datetime.datetime.now().year) |
47 | 55 | year_duration = ( |
48 | 56 | current_year |
49 | 57 | if current_year == creation_year |
50 | 58 | else creation_year + " - " + current_year |
51 | 59 | ) |
52 | | -copyright = year_duration + " ladyada" |
53 | | -author = "ladyada" |
| 60 | +copyright = year_duration + " Brent Rubell" |
| 61 | +author = "Brent Rubell" |
54 | 62 |
|
55 | 63 | # The version info for the project you're documenting, acts as replacement for |
56 | 64 | # |version| and |release|, also used in various other places throughout the |
|
71 | 79 | # List of patterns, relative to source directory, that match files and |
72 | 80 | # directories to ignore when looking for source files. |
73 | 81 | # This patterns also effect to html_static_path and html_extra_path |
74 | | -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"] |
| 82 | +exclude_patterns = [ |
| 83 | + "_build", |
| 84 | + "Thumbs.db", |
| 85 | + ".DS_Store", |
| 86 | + ".env", |
| 87 | + "CODE_OF_CONDUCT.md", |
| 88 | +] |
75 | 89 |
|
76 | 90 | # The reST default role (used for this markup: `text`) to use for all |
77 | 91 | # documents. |
|
91 | 105 | # If this is True, todo emits a warning for each TODO entries. The default is False. |
92 | 106 | todo_emit_warnings = True |
93 | 107 |
|
| 108 | +napoleon_numpy_docstring = False |
94 | 109 |
|
95 | 110 | # -- Options for HTML output ---------------------------------------------- |
96 | 111 |
|
|
114 | 129 | html_favicon = "_static/favicon.ico" |
115 | 130 |
|
116 | 131 | # Output file base name for HTML help builder. |
117 | | -htmlhelp_basename = "AdafruitBME280Librarydoc" |
| 132 | +htmlhelp_basename = "CircuitPython_Circuitpython_fake_bme280_Librarydoc" |
118 | 133 |
|
119 | 134 | # -- Options for LaTeX output --------------------------------------------- |
120 | 135 |
|
121 | 136 | latex_elements = { |
122 | 137 | # The paper size ('letterpaper' or 'a4paper'). |
123 | | - # |
124 | 138 | # 'papersize': 'letterpaper', |
125 | 139 | # The font size ('10pt', '11pt' or '12pt'). |
126 | | - # |
127 | 140 | # 'pointsize': '10pt', |
128 | 141 | # Additional stuff for the LaTeX preamble. |
129 | | - # |
130 | 142 | # 'preamble': '', |
131 | 143 | # Latex figure (float) alignment |
132 | | - # |
133 | 144 | # 'figure_align': 'htbp', |
134 | 145 | } |
135 | 146 |
|
|
139 | 150 | latex_documents = [ |
140 | 151 | ( |
141 | 152 | master_doc, |
142 | | - "AdafruitBME280Library.tex", |
143 | | - "Adafruit BME280 Library Documentation", |
| 153 | + "CircuitPython_CircuitPython_Fake_BME280_Library.tex", |
| 154 | + "CircuitPython CircuitPython Fake BME280 Library Documentation", |
144 | 155 | author, |
145 | 156 | "manual", |
146 | 157 | ), |
|
153 | 164 | man_pages = [ |
154 | 165 | ( |
155 | 166 | master_doc, |
156 | | - "adafruitBME280library", |
157 | | - "Adafruit BME280 Library Documentation", |
| 167 | + "CircuitPython_CircuitPython_Fake_BME280_Library", |
| 168 | + "CircuitPython CircuitPython Fake BME280 Library Documentation", |
158 | 169 | [author], |
159 | 170 | 1, |
160 | | - ) |
| 171 | + ), |
161 | 172 | ] |
162 | 173 |
|
163 | 174 | # -- Options for Texinfo output ------------------------------------------- |
|
168 | 179 | texinfo_documents = [ |
169 | 180 | ( |
170 | 181 | master_doc, |
171 | | - "AdafruitBME280Library", |
172 | | - "Adafruit BME280 Library Documentation", |
| 182 | + "CircuitPython_CircuitPython_Fake_BME280_Library", |
| 183 | + "CircuitPython CircuitPython Fake BME280 Library Documentation", |
173 | 184 | author, |
174 | | - "AdafruitBME280Library", |
| 185 | + "CircuitPython_CircuitPython_Fake_BME280_Library", |
175 | 186 | "One line description of project.", |
176 | 187 | "Miscellaneous", |
177 | 188 | ), |
178 | 189 | ] |
179 | | - |
180 | | -# API docs fix |
181 | | -autodoc_mock_imports = ["micropython"] |
|
0 commit comments