Skip to content

Commit 61ffe92

Browse files
committed
Remove inline LICENSE info and improve some minor doc gen stuff
1 parent 6f3ce14 commit 61ffe92

File tree

4 files changed

+25
-138
lines changed

4 files changed

+25
-138
lines changed

doc/conf.py

+18-74
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,4 @@
1-
#!/usr/bin/env python
2-
# The MIT License (MIT)
3-
# Copyright (c) 2020 Karl-Petter Lindegaard
4-
#
5-
# smbus3 documentation build configuration file.
6-
#
7-
# This file is execfile()d with the current directory set to its
8-
# containing dir.
9-
#
10-
# Note that not all possible configuration values are present in this
11-
# autogenerated file.
12-
#
13-
# All configuration values have a default; values that are commented out
14-
# serve to show the default.
15-
16-
# If extensions (or modules to document with autodoc) are in another directory,
17-
# add these directories to sys.path here. If the directory is relative to the
18-
# documentation root, use os.path.abspath to make it absolute, like shown here.
19-
#
1+
#!/usr/bin/env python3
202
import os
213
import sys
224

@@ -25,10 +7,7 @@
257
from smbus3 import __version__
268

279
# -- General configuration ------------------------------------------------
28-
29-
# If your documentation needs a minimal Sphinx version, state it here.
30-
#
31-
# needs_sphinx = '1.0'
10+
needs_sphinx = "7.0"
3211

3312
# Add any Sphinx extension module names here, as strings. They can be
3413
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -39,9 +18,6 @@
3918
templates_path = ["_templates"]
4019

4120
# The suffix(es) of source filenames.
42-
# You can specify multiple suffix as a list of string:
43-
#
44-
# source_suffix = ['.rst', '.md']
4521
source_suffix = ".rst"
4622

4723
# The master toctree document.
@@ -50,36 +26,28 @@
5026
# General information about the project.
5127
project = "smbus3"
5228
doc_title = f"{project} Documentation"
53-
author = "Karl-Petter Lindegaard"
54-
copyright = f"2017-2024, {author}"
55-
56-
# The version info for the project you're documenting, acts as replacement for
57-
# |version| and |release|, also used in various other places throughout the
58-
# built documents.
59-
#
29+
author = "Elliott Indiran"
30+
copyright = f"2024, {author}"
6031
# The short X.Y version.
6132
version = __version__
6233
# The full version, including alpha/beta/rc tags.
6334
release = __version__
64-
65-
# The language for content autogenerated by Sphinx. Refer to documentation
66-
# for a list of supported languages.
67-
#
68-
# This is also used if you do content translation via gettext catalogs.
69-
# Usually you set "language" from the command line for these cases.
35+
ol_description = (
36+
"smbus3 is a drop-in replacement for smbus2, smbus-cffi, smbus-python "
37+
+ "written in pure Python, intended for use with Python 3.9+"
38+
)
39+
gr_category = "Miscellaneous"
40+
# The language for content autogenerated by Sphinx.
7041
language = "en"
7142

7243
# List of patterns, relative to source directory, that match files and
7344
# directories to ignore when looking for source files.
7445
# This patterns also effect to html_static_path and html_extra_path
7546
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
76-
7747
# The name of the Pygments (syntax highlighting) style to use.
7848
pygments_style = "sphinx"
79-
8049
# If true, `todo` and `todoList` produce output, else they produce nothing.
8150
todo_include_todos = False
82-
8351
autodoc_default_options = {
8452
"members": True,
8553
"member-order": "bysource",
@@ -91,25 +59,8 @@
9159

9260
# -- Options for HTML output ----------------------------------------------
9361

94-
# The theme to use for HTML and HTML Help pages. See the documentation for
95-
# a list of builtin themes.
96-
#
62+
# The theme to use for HTML and HTML Help pages.
9763
html_theme = "alabaster"
98-
99-
# Theme options are theme-specific and customize the look and feel of a theme
100-
# further. For a list of options available for each theme, see the
101-
# documentation.
102-
#
103-
# html_theme_options = {}
104-
105-
# Add any paths that contain custom static files (such as style sheets) here,
106-
# relative to this directory. They are copied after the builtin static files,
107-
# so a file named "default.css" will overwrite the builtin "default.css".
108-
# html_static_path = ['_static']
109-
110-
# Custom sidebar templates, must be a dictionary that maps document names
111-
# to template names.
112-
#
11364
# This is required for the alabaster theme
11465
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
11566
html_sidebars = {
@@ -119,28 +70,20 @@
11970
]
12071
}
12172

122-
12373
# -- Options for HTMLHelp output ------------------------------------------
12474

12575
# Output file base name for HTML help builder.
12676
htmlhelp_basename = "smbus3doc"
12777

128-
12978
# -- Options for LaTeX output ---------------------------------------------
13079

13180
latex_elements = {
13281
# The paper size ('letterpaper' or 'a4paper').
133-
#
134-
# 'papersize': 'letterpaper',
82+
"papersize": "letterpaper",
13583
# The font size ('10pt', '11pt' or '12pt').
136-
#
137-
# 'pointsize': '10pt',
138-
# Additional stuff for the LaTeX preamble.
139-
#
140-
# 'preamble': '',
84+
"pointsize": "10pt",
14185
# Latex figure (float) alignment
142-
#
143-
# 'figure_align': 'htbp',
86+
"figure_align": "htbp",
14487
}
14588

14689
# Grouping the document tree into LaTeX files. List of tuples
@@ -154,7 +97,8 @@
15497

15598
# One entry per manual page. List of tuples
15699
# (source start file, name, description, authors, manual section).
157-
man_pages = [(master_doc, project, doc_title, [author], 1)]
100+
man_section = 1
101+
man_pages = [(master_doc, project, doc_title, [author], man_section)]
158102

159103

160104
# -- Options for Texinfo output -------------------------------------------
@@ -169,8 +113,8 @@
169113
doc_title,
170114
author,
171115
project,
172-
"One line description of project.",
173-
"Miscellaneous",
116+
ol_description,
117+
gr_category,
174118
),
175119
]
176120

smbus3/__init__.py

+4-22
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,8 @@
1-
"""smbus3 - A drop-in replacement for smbus-cffi/smbus-python"""
2-
# The MIT License (MIT)
3-
# Copyright (c) 2020 Karl-Petter Lindegaard
4-
#
5-
# Permission is hereby granted, free of charge, to any person obtaining a copy
6-
# of this software and associated documentation files (the "Software"), to deal
7-
# in the Software without restriction, including without limitation the rights
8-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
# copies of the Software, and to permit persons to whom the Software is
10-
# furnished to do so, subject to the following conditions:
11-
#
12-
# The above copyright notice and this permission notice shall be included in all
13-
# copies or substantial portions of the Software.
14-
#
15-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
# SOFTWARE.
1+
"""
2+
smbus3 - A drop-in replacement for smbus2/smbus-cffi/smbus-python
3+
"""
224

235
from .smbus3 import I2cFunc, SMBus, i2c_msg
246

25-
__version__ = "0.4.3"
7+
__version__ = "0.5.0"
268
__all__ = ["SMBus", "i2c_msg", "I2cFunc"]

smbus3/smbus3.py

+3-21
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
1-
"""smbus3 - A drop-in replacement for smbus-cffi/smbus-python"""
2-
# The MIT License (MIT)
3-
# Copyright (c) 2020 Karl-Petter Lindegaard
4-
#
5-
# Permission is hereby granted, free of charge, to any person obtaining a copy
6-
# of this software and associated documentation files (the "Software"), to deal
7-
# in the Software without restriction, including without limitation the rights
8-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
# copies of the Software, and to permit persons to whom the Software is
10-
# furnished to do so, subject to the following conditions:
11-
#
12-
# The above copyright notice and this permission notice shall be included in all
13-
# copies or substantial portions of the Software.
14-
#
15-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
# SOFTWARE.
1+
"""
2+
smbus3 - A drop-in replacement for smbus2/smbus-cffi/smbus-python
3+
"""
224

235
import os
246
from ctypes import (

tests/test_datatypes.py

-21
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
# The MIT License (MIT)
2-
# Copyright (c) 2020 Karl-Petter Lindegaard
3-
#
4-
# Permission is hereby granted, free of charge, to any person obtaining a copy
5-
# of this software and associated documentation files (the "Software"), to deal
6-
# in the Software without restriction, including without limitation the rights
7-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8-
# copies of the Software, and to permit persons to whom the Software is
9-
# furnished to do so, subject to the following conditions:
10-
#
11-
# The above copyright notice and this permission notice shall be included in all
12-
# copies or substantial portions of the Software.
13-
#
14-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20-
# SOFTWARE.
21-
221
import unittest
232

243
from smbus3.smbus3 import ( # noqa: F401

0 commit comments

Comments
 (0)