Skip to content

Commit 0353b22

Browse files
committed
add docs
1 parent b7a0b61 commit 0353b22

7 files changed

Lines changed: 117 additions & 28 deletions

File tree

docs/api.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
.. If you created a package, create one automodule per module in the package.
3+
4+
.. If your library file(s) are nested in a directory (e.g. /adafruit_foo/foo.py)
5+
.. use this format as the module name: "adafruit_foo.foo"
6+
7+
.. automodule:: circuitpython_fake_bme280
8+
:members:

docs/api.rst.license

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
SPDX-FileCopyrightText: Copyright (c) 2024 Brent Rubell for Adafruit Industries
3+
4+
SPDX-License-Identifier: MIT

docs/conf.py

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
3+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
44
#
55
# SPDX-License-Identifier: MIT
66

@@ -19,19 +19,27 @@
1919
"sphinx.ext.autodoc",
2020
"sphinxcontrib.jquery",
2121
"sphinx.ext.intersphinx",
22-
"sphinx.ext.viewcode",
22+
"sphinx.ext.napoleon",
23+
"sphinx.ext.todo",
2324
]
2425

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+
2635
intersphinx_mapping = {
2736
"python": ("https://docs.python.org/3", None),
28-
"BusDevice": (
29-
"https://docs.circuitpython.org/projects/busdevice/en/latest/",
30-
None,
31-
),
3237
"CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
3338
}
3439

40+
# Show the docstring from both the class and its __init__() method.
41+
autoclass_content = "both"
42+
3543
# Add any paths that contain templates here, relative to this directory.
3644
templates_path = ["_templates"]
3745

@@ -41,16 +49,16 @@
4149
master_doc = "index"
4250

4351
# 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"
4654
current_year = str(datetime.datetime.now().year)
4755
year_duration = (
4856
current_year
4957
if current_year == creation_year
5058
else creation_year + " - " + current_year
5159
)
52-
copyright = year_duration + " ladyada"
53-
author = "ladyada"
60+
copyright = year_duration + " Brent Rubell"
61+
author = "Brent Rubell"
5462

5563
# The version info for the project you're documenting, acts as replacement for
5664
# |version| and |release|, also used in various other places throughout the
@@ -71,7 +79,13 @@
7179
# List of patterns, relative to source directory, that match files and
7280
# directories to ignore when looking for source files.
7381
# 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+
]
7589

7690
# The reST default role (used for this markup: `text`) to use for all
7791
# documents.
@@ -91,6 +105,7 @@
91105
# If this is True, todo emits a warning for each TODO entries. The default is False.
92106
todo_emit_warnings = True
93107

108+
napoleon_numpy_docstring = False
94109

95110
# -- Options for HTML output ----------------------------------------------
96111

@@ -114,22 +129,18 @@
114129
html_favicon = "_static/favicon.ico"
115130

116131
# Output file base name for HTML help builder.
117-
htmlhelp_basename = "AdafruitBME280Librarydoc"
132+
htmlhelp_basename = "CircuitPython_Circuitpython_fake_bme280_Librarydoc"
118133

119134
# -- Options for LaTeX output ---------------------------------------------
120135

121136
latex_elements = {
122137
# The paper size ('letterpaper' or 'a4paper').
123-
#
124138
# 'papersize': 'letterpaper',
125139
# The font size ('10pt', '11pt' or '12pt').
126-
#
127140
# 'pointsize': '10pt',
128141
# Additional stuff for the LaTeX preamble.
129-
#
130142
# 'preamble': '',
131143
# Latex figure (float) alignment
132-
#
133144
# 'figure_align': 'htbp',
134145
}
135146

@@ -139,8 +150,8 @@
139150
latex_documents = [
140151
(
141152
master_doc,
142-
"AdafruitBME280Library.tex",
143-
"Adafruit BME280 Library Documentation",
153+
"CircuitPython_CircuitPython_Fake_BME280_Library.tex",
154+
"CircuitPython CircuitPython Fake BME280 Library Documentation",
144155
author,
145156
"manual",
146157
),
@@ -153,11 +164,11 @@
153164
man_pages = [
154165
(
155166
master_doc,
156-
"adafruitBME280library",
157-
"Adafruit BME280 Library Documentation",
167+
"CircuitPython_CircuitPython_Fake_BME280_Library",
168+
"CircuitPython CircuitPython Fake BME280 Library Documentation",
158169
[author],
159170
1,
160-
)
171+
),
161172
]
162173

163174
# -- Options for Texinfo output -------------------------------------------
@@ -168,14 +179,11 @@
168179
texinfo_documents = [
169180
(
170181
master_doc,
171-
"AdafruitBME280Library",
172-
"Adafruit BME280 Library Documentation",
182+
"CircuitPython_CircuitPython_Fake_BME280_Library",
183+
"CircuitPython CircuitPython Fake BME280 Library Documentation",
173184
author,
174-
"AdafruitBME280Library",
185+
"CircuitPython_CircuitPython_Fake_BME280_Library",
175186
"One line description of project.",
176187
"Miscellaneous",
177188
),
178189
]
179-
180-
# API docs fix
181-
autodoc_mock_imports = ["micropython"]

docs/examples.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Simple test
2+
------------
3+
4+
Ensure your device works with this simple test.
5+
6+
.. literalinclude:: ../examples/circuitpython_fake_bme280_simpletest.py
7+
:caption: examples/circuitpython_fake_bme280_simpletest.py
8+
:linenos:

docs/examples.rst.license

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
SPDX-FileCopyrightText: Copyright (c) 2024 Brent Rubell for Adafruit Industries
3+
4+
SPDX-License-Identifier: MIT

docs/index.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
.. include:: ../README.rst
3+
4+
Table of Contents
5+
=================
6+
7+
.. toctree::
8+
:maxdepth: 4
9+
:hidden:
10+
11+
self
12+
13+
.. toctree::
14+
:caption: Examples
15+
16+
examples
17+
18+
.. toctree::
19+
:caption: API Reference
20+
:maxdepth: 3
21+
22+
api
23+
24+
.. toctree::
25+
:caption: Tutorials
26+
27+
.. todo:: Add any Learn guide links here. If there are none, then simply delete this todo and leave
28+
the toctree above for use later.
29+
30+
.. toctree::
31+
:caption: Related Products
32+
33+
.. todo:: Add any product links here. If there are none, then simply delete this todo and leave
34+
the toctree above for use later.
35+
36+
.. toctree::
37+
:caption: Other Links
38+
39+
Download from GitHub <https://github.com/brentru/CircuitPython_CircuitPython_Fake_BME280/releases/latest>
40+
Download Library Bundle <https://circuitpython.org/libraries>
41+
CircuitPython Reference Documentation <https://docs.circuitpython.org>
42+
CircuitPython Support Forum <https://forums.adafruit.com/viewforum.php?f=60>
43+
Discord Chat <https://adafru.it/discord>
44+
Adafruit Learning System <https://learn.adafruit.com>
45+
Adafruit Blog <https://blog.adafruit.com>
46+
Adafruit Store <https://www.adafruit.com>
47+
48+
Indices and tables
49+
==================
50+
51+
* :ref:`genindex`
52+
* :ref:`modindex`
53+
* :ref:`search`

docs/index.rst.license

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
SPDX-FileCopyrightText: Copyright (c) 2024 Brent Rubell for Adafruit Industries
3+
4+
SPDX-License-Identifier: MIT

0 commit comments

Comments
 (0)