diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6977a9..79c85bf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + name: Build CI on: [pull_request, push] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 18efb9c..6d0015a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + name: Release Actions on: diff --git a/.gitignore b/.gitignore index 066d563..2c6ddfd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,14 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + *.mpy .idea __pycache__ _build *.pyc .env +.python-version build*/ bundles *.DS_Store diff --git a/.pylintrc b/.pylintrc index d8f0ee8..54a9d35 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + [MASTER] # A comma-separated list of package or module names from where C extensions may diff --git a/.readthedocs.yml b/.readthedocs.yml index f4243ad..a1e2575 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + python: version: 3 requirements_file: requirements.txt diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 134d510..d15b728 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,9 @@ + # Adafruit Community Code of Conduct ## Our Pledge diff --git a/README.rst b/README.rst index e385bb2..a3c47df 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,11 @@ Introduction :target: https://github.com/adafruit/Adafruit_CircuitPython_CLUE/actions :alt: Build Status -A high level library representing all the features of the Adafruit CLUE. +.. image:: https://img.shields.io/badge/code%20style-black-000000.svg + :target: https://github.com/psf/black + :alt: Code Style: Black + +A high level library representing all the features of the Adafruit CLUE Dependencies diff --git a/README.rst.license b/README.rst.license new file mode 100644 index 0000000..11cd75d --- /dev/null +++ b/README.rst.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries + +SPDX-License-Identifier: MIT diff --git a/adafruit_clue.py b/adafruit_clue.py index 509fc99..5786830 100644 --- a/adafruit_clue.py +++ b/adafruit_clue.py @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright (c) 2020 Kattni Rembor for Adafruit Industries +# +# SPDX-License-Identifier: MIT # The MIT License (MIT) # # Copyright (c) 2020 Kattni Rembor for Adafruit Industries @@ -65,7 +68,7 @@ import adafruit_apds9960.apds9960 import adafruit_bmp280 import adafruit_lis3mdl -import adafruit_lsm6ds +import adafruit_lsm6ds.lsm6ds33 import adafruit_sht31d import audiobusio import audiopwmio @@ -238,7 +241,7 @@ def __init__(self): # Define sensors: # Accelerometer/gyroscope: - self._accelerometer = adafruit_lsm6ds.LSM6DS33(self._i2c) + self._accelerometer = adafruit_lsm6ds.lsm6ds33.LSM6DS33(self._i2c) # Magnetometer: self._magnetometer = adafruit_lis3mdl.LIS3MDL(self._i2c) diff --git a/disabled.pre-commit-config.yaml b/disabled.pre-commit-config.yaml new file mode 100644 index 0000000..6cd77e3 --- /dev/null +++ b/disabled.pre-commit-config.yaml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò +# +# SPDX-License-Identifier: Unlicense + +repos: +- repo: https://github.com/python/black + rev: 19.10b0 + hooks: + - id: black +- repo: https://github.com/fsfe/reuse-tool + rev: latest + hooks: + - id: reuse +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace diff --git a/docs/_static/accelerometer.jpg.license b/docs/_static/accelerometer.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/accelerometer.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/button_a.jpg.license b/docs/_static/button_a.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/button_a.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/button_b.jpg.license b/docs/_static/button_b.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/button_b.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/display_clue_data.jpg.license b/docs/_static/display_clue_data.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/display_clue_data.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/favicon.ico.license b/docs/_static/favicon.ico.license new file mode 100644 index 0000000..86a3fbf --- /dev/null +++ b/docs/_static/favicon.ico.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2018 Phillip Torrone for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/humidity.jpg.license b/docs/_static/humidity.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/humidity.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/magnetometer.jpg.license b/docs/_static/magnetometer.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/magnetometer.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/microphone.jpg.license b/docs/_static/microphone.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/microphone.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/neopixel.jpg.license b/docs/_static/neopixel.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/neopixel.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/pad_0.jpg.license b/docs/_static/pad_0.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/pad_0.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/pad_1.jpg.license b/docs/_static/pad_1.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/pad_1.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/pad_2.jpg.license b/docs/_static/pad_2.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/pad_2.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/pressure.jpg.license b/docs/_static/pressure.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/pressure.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/proximity.jpg.license b/docs/_static/proximity.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/proximity.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/red_led.jpg.license b/docs/_static/red_led.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/red_led.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/speaker.jpg.license b/docs/_static/speaker.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/speaker.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/_static/white_leds.jpg.license b/docs/_static/white_leds.jpg.license new file mode 100644 index 0000000..08077c8 --- /dev/null +++ b/docs/_static/white_leds.jpg.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/docs/api.rst.license b/docs/api.rst.license new file mode 100644 index 0000000..11cd75d --- /dev/null +++ b/docs/api.rst.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries + +SPDX-License-Identifier: MIT diff --git a/docs/conf.py b/docs/conf.py index d8e9a6a..2bb48ec 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + import os import sys diff --git a/docs/examples.rst.license b/docs/examples.rst.license new file mode 100644 index 0000000..11cd75d --- /dev/null +++ b/docs/examples.rst.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries + +SPDX-License-Identifier: MIT diff --git a/docs/index.rst.license b/docs/index.rst.license new file mode 100644 index 0000000..11cd75d --- /dev/null +++ b/docs/index.rst.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries + +SPDX-License-Identifier: MIT diff --git a/examples/advanced_examples/clue_ams_remote_advanced.py b/examples/advanced_examples/clue_ams_remote_advanced.py index 2c64397..ed8f80c 100644 --- a/examples/advanced_examples/clue_ams_remote_advanced.py +++ b/examples/advanced_examples/clue_ams_remote_advanced.py @@ -18,9 +18,9 @@ from adafruit_ble.advertising.standard import SolicitServicesAdvertisement from adafruit_ble_apple_media import AppleMediaService from adafruit_ble_apple_media import UnsupportedCommand -from adafruit_clue import clue from adafruit_bitmap_font import bitmap_font from adafruit_display_shapes.rect import Rect +from adafruit_clue import clue # PyLint can't find BLERadio for some reason so special case it here. diff --git a/examples/clue_ble_color_patchwork.py b/examples/clue_ble_color_patchwork.py index c026169..8159ddd 100644 --- a/examples/clue_ble_color_patchwork.py +++ b/examples/clue_ble_color_patchwork.py @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense """ Circuit Python BLE Color Patchwork This demo uses advertising to broadcast a color of the users choice. @@ -11,10 +14,10 @@ import displayio from adafruit_display_text import label import terminalio -from adafruit_clue import clue from adafruit_ble import BLERadio from adafruit_ble.advertising.adafruit import AdafruitColor from adafruit_display_shapes.rect import Rect +from adafruit_clue import clue MODE_COLOR_SELECT = 0 MODE_SHOW_PATCHWORK = 1 diff --git a/examples/clue_display_sensor_data.py b/examples/clue_display_sensor_data.py index 0fca0bb..8a3f551 100644 --- a/examples/clue_display_sensor_data.py +++ b/examples/clue_display_sensor_data.py @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense from adafruit_clue import clue clue.sea_level_pressure = 1020 diff --git a/examples/clue_height_calculator.py b/examples/clue_height_calculator.py index d35be15..64f0b27 100755 --- a/examples/clue_height_calculator.py +++ b/examples/clue_height_calculator.py @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense """Calculate the height of an object. Press button A to reset initial height and then lift the CLUE to find the height.""" from adafruit_clue import clue diff --git a/examples/clue_simpletest.py b/examples/clue_simpletest.py index 410ddb0..12ec856 100644 --- a/examples/clue_simpletest.py +++ b/examples/clue_simpletest.py @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense from adafruit_clue import clue clue.sea_level_pressure = 1020 diff --git a/examples/clue_slideshow.py b/examples/clue_slideshow.py index 3bbed92..59230b0 100755 --- a/examples/clue_slideshow.py +++ b/examples/clue_slideshow.py @@ -1,11 +1,14 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense """Display a series of bitmaps using the buttons to advance through the list. To use: place supported bitmap files on your CIRCUITPY drive, then press the buttons on your CLUE to advance through them. Requires the Adafruit CircuitPython Slideshow library!""" -from adafruit_clue import clue from adafruit_slideshow import SlideShow, PlayBackDirection +from adafruit_clue import clue slideshow = SlideShow(clue.display, auto_advance=False) diff --git a/examples/clue_spirit_level.py b/examples/clue_spirit_level.py index 79d6b6b..8fd38c6 100755 --- a/examples/clue_spirit_level.py +++ b/examples/clue_spirit_level.py @@ -1,8 +1,11 @@ +# SPDX-FileCopyrightText: 2019 Kattni Rembor, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense """CLUE Spirit Level Demo""" import board import displayio -from adafruit_clue import clue from adafruit_display_shapes.circle import Circle +from adafruit_clue import clue display = board.DISPLAY clue_group = displayio.Group(max_size=4) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f3c35ae --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò +# +# SPDX-License-Identifier: Unlicense + +[tool.black] +target-version = ['py35'] diff --git a/requirements.txt b/requirements.txt index 87c0152..de1a06f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# SPDX-FileCopyrightText: Copyright (c) 2020 Kattni Rembor for Adafruit Industries +# +# SPDX-License-Identifier: MIT + Adafruit-Blinka adafruit-circuitpython-busdevice adafruit-circuitpython-register diff --git a/setup.py.disabled b/setup.py.disabled index a80b9bf..f9485df 100644 --- a/setup.py.disabled +++ b/setup.py.disabled @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# SPDX-FileCopyrightText: Copyright (c) 2020 Kattni Rembor for Adafruit Industries +# +# SPDX-License-Identifier: MIT """ This library is not deployed to PyPI. It is either a board-specific helper library, or does not make sense for use on or is incompatible with single board computers and Linux.