Skip to content

Commit d691567

Browse files
authored
Merge pull request #7 from kattni/driver-rename
Renaming driver/class to match product/repo name.
2 parents 769ce04 + b94edb7 commit d691567

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ install:
2525
- pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme
2626
- pip install --force-reinstall pylint==1.9.2
2727
script:
28-
- pylint adafruit_sht31.py
28+
- pylint adafruit_sht31d.py
2929
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace
3030
examples/*.py)
31-
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-sht31 --library_location
31+
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-sht31d --library_location
3232
.
3333
- cd docs && sphinx-build -E -W -b html . _build/html && cd ..

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You must import the library to use it:
3434

3535
.. code:: python
3636
37-
import adafruit_sht31
37+
import adafruit_sht31d
3838
3939
This driver takes an instantiated and active I2C object (from the `busio` or
4040
the `bitbangio` library) as an argument to its constructor. The way to create
@@ -53,7 +53,7 @@ the sensor object:
5353

5454
.. code:: python
5555
56-
sensor = adafruit_sht31.SHT31(i2c)
56+
sensor = adafruit_sht31d.SHT31D(i2c)
5757
5858
5959
And then you can start measuring the temperature and humidity:
@@ -67,7 +67,7 @@ Contributing
6767
============
6868

6969
Contributions are welcome! Please read our `Code of Conduct
70-
<https://github.com/adafruit/Adafruit_CircuitPython_sht31/blob/master/CODE_OF_CONDUCT.md>`_
70+
<https://github.com/adafruit/Adafruit_CircuitPython_SHT31D/blob/master/CODE_OF_CONDUCT.md>`_
7171
before contributing to help this project stay welcoming.
7272

7373
Building locally
@@ -92,7 +92,7 @@ Then run the build:
9292

9393
.. code-block:: shell
9494
95-
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-sht31 --library_location .
95+
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-sht31d --library_location .
9696
9797
Sphinx documentation
9898
-----------------------
@@ -115,4 +115,4 @@ Now, once you have the virtual environment activated:
115115
116116
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
117117
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
118-
locally verify it will pass.
118+
locally verify it will pass.

adafruit_sht31.py renamed to adafruit_sht31d.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
# THE SOFTWARE.
2222
"""
23-
`adafruit_sht31`
23+
`adafruit_sht31d`
2424
====================================================
2525
2626
This is a CircuitPython driver for the SHT31-D temperature and humidity sensor.
@@ -50,11 +50,11 @@
5050

5151
import time
5252

53-
from adafruit_bus_device.i2c_device import I2CDevice
5453
from micropython import const
54+
from adafruit_bus_device.i2c_device import I2CDevice
5555

5656
__version__ = "0.0.0-auto.0"
57-
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_sht31.git"
57+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_SHT31D.git"
5858

5959

6060
SHT31_DEFAULT_ADDR = const(0x44)
@@ -84,7 +84,7 @@ def _crc(data):
8484
return crc
8585

8686

87-
class SHT31:
87+
class SHT31D:
8888
"""
8989
A driver for the SHT31-D temperature and humidity sensor.
9090

docs/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
.. If you created a package, create one automodule per module in the package.
33
4-
.. automodule:: adafruit_sht31
4+
.. automodule:: adafruit_sht31d
55
:members:

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
master_doc = 'index'
3232

3333
# General information about the project.
34-
project = u'Adafruit sht31 Library'
34+
project = u'Adafruit SHT31D Library'
3535
copyright = u'2017 Jerry Needell'
3636
author = u'Jerry Needell'
3737

docs/examples.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Simple test
33

44
Ensure your device works with this simple test.
55

6-
.. literalinclude:: ../examples/sht31_simpletest.py
7-
:caption: examples/sht31_simpletest.py
6+
.. literalinclude:: ../examples/sht31d_simpletest.py
7+
:caption: examples/sht31d_simpletest.py
88
:linenos:

examples/sht31_simpletest.py renamed to examples/sht31d_simpletest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import time
22
import board
33
import busio
4-
import adafruit_sht31
4+
import adafruit_sht31d
55

66
# Create library object using our Bus I2C port
77
i2c = busio.I2C(board.SCL, board.SDA)
8-
sensor = adafruit_sht31.SHT31(i2c)
8+
sensor = adafruit_sht31d.SHT31D(i2c)
99

1010
loopcount = 0
1111
while True:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@
5757

5858
# You can just specify the packages manually here if your project is
5959
# simple. Or you can use find_packages().
60-
py_modules=['adafruit_sht31'],
60+
py_modules=['adafruit_sht31d'],
6161
)

0 commit comments

Comments
 (0)