Skip to content

Commit 6130554

Browse files
committed
Updated docs and examples
1 parent b07ae25 commit 6130554

15 files changed

+131
-50
lines changed

docs/_static/favicon.ico.license

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SPDX-FileCopyrightText: 2018 Phillip Torrone for Adafruit Industries
2+
3+
SPDX-License-Identifier: CC-BY-4.0

docs/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
.. use this format as the module name: "adafruit_foo.foo"
66
77
.. automodule:: sparkfun_qwiicas3935
8-
:members:
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) 2021 Gaston Williams
3+
4+
SPDX-License-Identifier: MIT

docs/conf.py

Lines changed: 80 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,63 @@
11
# -*- coding: utf-8 -*-
22

3+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
4+
#
5+
# SPDX-License-Identifier: MIT
6+
37
import os
48
import sys
5-
sys.path.insert(0, os.path.abspath('..'))
9+
10+
sys.path.insert(0, os.path.abspath(".."))
611

712
# -- General configuration ------------------------------------------------
813

914
# Add any Sphinx extension module names here, as strings. They can be
1015
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
1116
# ones.
1217
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",
1722
]
1823

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"]
2029

2130

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"
2339

2440
# Add any paths that contain templates here, relative to this directory.
25-
templates_path = ['_templates']
41+
templates_path = ["_templates"]
2642

27-
source_suffix = '.rst'
43+
source_suffix = ".rst"
2844

2945
# The master toctree document.
30-
master_doc = 'index'
46+
master_doc = "index"
3147

3248
# 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"
3652

3753
# The version info for the project you're documenting, acts as replacement for
3854
# |version| and |release|, also used in various other places throughout the
3955
# built documents.
4056
#
4157
# The short X.Y version.
42-
version = u'1.0'
58+
version = "1.0"
4359
# The full version, including alpha/beta/rc tags.
44-
release = u'1.0'
60+
release = "1.0"
4561

4662
# The language for content autogenerated by Sphinx. Refer to documentation
4763
# for a list of supported languages.
@@ -53,7 +69,13 @@
5369
# List of patterns, relative to source directory, that match files and
5470
# directories to ignore when looking for source files.
5571
# 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+
]
5779

5880
# The reST default role (used for this markup: `text`) to use for all
5981
# documents.
@@ -65,7 +87,7 @@
6587
add_function_parentheses = True
6688

6789
# The name of the Pygments (syntax highlighting) style to use.
68-
pygments_style = 'sphinx'
90+
pygments_style = "sphinx"
6991

7092
# If true, `todo` and `todoList` produce output, else they produce nothing.
7193
todo_include_todos = False
@@ -80,68 +102,72 @@
80102
# The theme to use for HTML and HTML Help pages. See the documentation for
81103
# a list of builtin themes.
82104
#
83-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
105+
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
84106

85107
if not on_rtd: # only import and set the theme if we're building docs locally
86108
try:
87109
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(), "."]
90113
except:
91-
html_theme = 'default'
92-
html_theme_path = ['.']
114+
html_theme = "default"
115+
html_theme_path = ["."]
93116
else:
94-
html_theme_path = ['.']
117+
html_theme_path = ["."]
95118

96119
# Add any paths that contain custom static files (such as style sheets) here,
97120
# relative to this directory. They are copied after the builtin static files,
98121
# so a file named "default.css" will overwrite the builtin "default.css".
99-
html_static_path = ['_static']
122+
html_static_path = ["_static"]
100123

101124
# The name of an image file (relative to this directory) to use as a favicon of
102125
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
103126
# pixels large.
104127
#
105-
html_favicon = '_static/favicon.ico'
128+
html_favicon = "_static/favicon.ico"
106129

107130
# Output file base name for HTML help builder.
108-
htmlhelp_basename = 'SparkfunQwiicas3935Librarydoc'
131+
htmlhelp_basename = "Sparkfun_CircuitPython_Qwiicas3935_Librarydoc"
109132

110133
# -- Options for LaTeX output ---------------------------------------------
111134

112135
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',
128144
}
129145

130146
# Grouping the document tree into LaTeX files. List of tuples
131147
# (source start file, target name, title,
132148
# author, documentclass [howto, manual, or own class]).
133149
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+
),
136157
]
137158

138159
# -- Options for manual page output ---------------------------------------
139160

140161
# One entry per manual page. List of tuples
141162
# (source start file, name, description, authors, manual section).
142163
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+
),
145171
]
146172

147173
# -- Options for Texinfo output -------------------------------------------
@@ -150,7 +176,13 @@
150176
# (source start file, target name, title, author,
151177
# dir menu entry, description, category)
152178
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+
),
156188
]

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) 2021 Gaston Williams
3+
4+
SPDX-License-Identifier: MIT

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ Table of Contents
3333
.. toctree::
3434
:caption: Other Links
3535

36-
Download <https://github.com/fourstix/Sparkfun_CircuitPython_QwiicAS3935/releases/latest>
36+
Download from GitHub <https://github.com/fourstix/Sparkfun_CircuitPython_QwiicAS3935/releases/latest>
37+
Download Library Bundle <https://circuitpython.org/libraries>
3738
CircuitPython Reference Documentation <https://circuitpython.readthedocs.io>
3839
CircuitPython Support Forum <https://forums.adafruit.com/viewforum.php?f=60>
3940
Discord Chat <https://adafru.it/discord>

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) 2021 Gaston Williams
3+
4+
SPDX-License-Identifier: MIT

docs/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
5+
sphinx>=4.0.0

examples/example1_basic_lightning_i2c.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Gaston Williams
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
# This is example is for the SparkFun Qwiic AS3935 Lightning Detector.
26
# SparkFun sells these at its website: www.sparkfun.com
37
# Do you like this library? Help support SparkFun. Buy a board!

examples/example1_basic_lightning_spi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Gaston Williams
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
# This is example is for the SparkFun Qwiic AS3935 Lightning Detector.
26
# SparkFun sells these at its website: www.sparkfun.com
37
# Do you like this library? Help support SparkFun. Buy a board!

examples/example2_more_lightning_features_i2c.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Gaston Williams
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
# This is example is for the SparkFun Qwiic AS3935 Lightning Detector.
26
# SparkFun sells these at its website: www.sparkfun.com
37
# Do you like this library? Help support SparkFun. Buy a board!

examples/example2_more_lightning_features_spi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Gaston Williams
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
# This is example is for the SparkFun Qwiic AS3935 Lightning Detector.
26
# SparkFun sells these at its website: www.sparkfun.com
37
# Do you like this library? Help support SparkFun. Buy a board!

examples/example3_tune_antenna_i2c.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Gaston Williams
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
# This is example is for the SparkFun Qwiic AS3935 Lightning Detector.
26
# SparkFun sells these at its website: www.sparkfun.com
37
# Do you like this library? Help support SparkFun. Buy a board!

examples/example3_tune_antenna_spi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Gaston Williams
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
# This is example is for the SparkFun Qwiic AS3935 Lightning Detector.
26
# SparkFun sells these at its website: www.sparkfun.com
37
# Do you like this library? Help support SparkFun. Buy a board!

examples/qwiicas3935_simpletest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Gaston Williams
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
# This is example is for the SparkFun Qwiic Relay.
26
# SparkFun sells these at its website: www.sparkfun.com
37
# Do you like this library? Help support SparkFun. Buy a board!

0 commit comments

Comments
 (0)