|
17 | 17 | "sphinx.ext.autodoc",
|
18 | 18 | "sphinxcontrib.jquery",
|
19 | 19 | "sphinx.ext.intersphinx",
|
20 |
| - "sphinx.ext.viewcode", |
| 20 | + "sphinx.ext.napoleon", |
| 21 | + "sphinx.ext.todo", |
21 | 22 | ]
|
22 | 23 |
|
| 24 | +# TODO: Please Read! |
23 | 25 | # Uncomment the below if you use native CircuitPython modules such as
|
24 | 26 | # digitalio, micropython and busio. List the modules you use. Without it, the
|
25 | 27 | # autodoc module docs will fail to generate with a warning.
|
|
34 | 36 | "CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
|
35 | 37 | }
|
36 | 38 |
|
| 39 | +# Show the docstring from both the class and its __init__() method. |
| 40 | +autoclass_content = "both" |
| 41 | + |
37 | 42 | # Add any paths that contain templates here, relative to this directory.
|
38 | 43 | templates_path = ["_templates"]
|
39 | 44 |
|
|
71 | 76 | # List of patterns, relative to source directory, that match files and
|
72 | 77 | # directories to ignore when looking for source files.
|
73 | 78 | # 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"] |
| 79 | +exclude_patterns = [ |
| 80 | + "_build", |
| 81 | + "Thumbs.db", |
| 82 | + ".DS_Store", |
| 83 | + ".env", |
| 84 | + "CODE_OF_CONDUCT.md", |
| 85 | +] |
75 | 86 |
|
76 | 87 | # The reST default role (used for this markup: `text`) to use for all
|
77 | 88 | # documents.
|
|
91 | 102 | # If this is True, todo emits a warning for each TODO entries. The default is False.
|
92 | 103 | todo_emit_warnings = True
|
93 | 104 |
|
| 105 | +napoleon_numpy_docstring = False |
94 | 106 |
|
95 | 107 | # -- Options for HTML output ----------------------------------------------
|
96 | 108 |
|
97 | 109 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
98 | 110 | # a list of builtin themes.
|
99 | 111 | #
|
100 |
| -on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
| 112 | +import sphinx_rtd_theme |
101 | 113 |
|
102 |
| -if not on_rtd: # only import and set the theme if we're building docs locally |
103 |
| - try: |
104 |
| - import sphinx_rtd_theme |
105 |
| - |
106 |
| - html_theme = "sphinx_rtd_theme" |
107 |
| - except ImportError: |
108 |
| - html_theme = "default" |
109 |
| - html_theme_path = ["."] |
110 |
| -else: |
111 |
| - html_theme_path = ["."] |
| 114 | +html_theme = "sphinx_rtd_theme" |
112 | 115 |
|
113 | 116 | # Add any paths that contain custom static files (such as style sheets) here,
|
114 | 117 | # relative to this directory. They are copied after the builtin static files,
|
|
128 | 131 |
|
129 | 132 | latex_elements = {
|
130 | 133 | # The paper size ('letterpaper' or 'a4paper').
|
131 |
| - # |
132 | 134 | # 'papersize': 'letterpaper',
|
133 | 135 | # The font size ('10pt', '11pt' or '12pt').
|
134 |
| - # |
135 | 136 | # 'pointsize': '10pt',
|
136 | 137 | # Additional stuff for the LaTeX preamble.
|
137 |
| - # |
138 | 138 | # 'preamble': '',
|
139 | 139 | # Latex figure (float) alignment
|
140 |
| - # |
141 | 140 | # 'figure_align': 'htbp',
|
142 | 141 | }
|
143 | 142 |
|
|
165 | 164 | "Adafruit FXOS8700 Library Documentation",
|
166 | 165 | [author],
|
167 | 166 | 1,
|
168 |
| - ) |
| 167 | + ), |
169 | 168 | ]
|
170 | 169 |
|
171 | 170 | # -- Options for Texinfo output -------------------------------------------
|
|
0 commit comments