From 2b8cafd3d2449798db6322c147efe3999fec10c0 Mon Sep 17 00:00:00 2001 From: dherrada Date: Thu, 4 Feb 2021 14:42:19 -0500 Subject: [PATCH 1/2] Ran pre-commit, added licenses --- .github/workflows/build.yml | 24 +- .gitignore | 4 + .pylintrc | 4 + .readthedocs.yml | 4 + CODE_OF_CONDUCT.md | 14 +- LICENSES/CC-BY-4.0.txt | 324 ++++++++++++++++++ LICENSES/MIT.txt | 19 + LICENSES/Unlicense.txt | 20 ++ adafruit_clue.py | 32 +- docs/api.rst.license | 6 +- docs/conf.py | 4 + docs/examples.rst.license | 6 +- docs/index.rst.license | 6 +- .../clue_ams_remote_advanced.py | 2 + examples/clue_ams_remote.py | 3 + examples/clue_ble_color_patchwork.py | 3 + examples/clue_display_sensor_data.py | 3 + examples/clue_height_calculator.py | 3 + examples/clue_simpletest.py | 3 + examples/clue_slideshow.py | 3 + examples/clue_spirit_level.py | 3 + examples/clue_temperature_humidity_monitor.py | 3 + requirements.txt | 4 + 23 files changed, 454 insertions(+), 43 deletions(-) create mode 100644 LICENSES/CC-BY-4.0.txt create mode 100644 LICENSES/MIT.txt create mode 100644 LICENSES/Unlicense.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79c85bf..59baa53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,20 +42,36 @@ jobs: # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.) run: | source actions-ci/install.sh - - name: Pip install pylint, black, & Sphinx + - name: Pip install pylint, Sphinx, pre-commit run: | - pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme + pip install --force-reinstall pylint Sphinx sphinx-rtd-theme pre-commit - name: Library version run: git describe --dirty --always --tags - - name: Check formatting + - name: Pre-commit hooks run: | - black --check --target-version=py35 . + pre-commit run --all-files - name: PyLint run: | pylint $( find . -path './adafruit*.py' ) ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" )) - name: Build assets run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . + - name: Archive bundles + uses: actions/upload-artifact@v2 + with: + name: bundles + path: ${{ github.workspace }}/bundles/ - name: Build docs working-directory: docs run: sphinx-build -E -W -b html . _build/html + - name: Check For setup.py + id: need-pypi + run: | + echo ::set-output name=setup-py::$( find . -wholename './setup.py' ) + - name: Build Python package + if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') + run: | + pip install --upgrade setuptools wheel twine readme_renderer testresources + python setup.py sdist + python setup.py bdist_wheel --universal + twine check dist/* diff --git a/.gitignore b/.gitignore index 2c6ddfd..a5bd757 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries # # SPDX-License-Identifier: Unlicense diff --git a/.pylintrc b/.pylintrc index 54a9d35..4175c4e 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries # # SPDX-License-Identifier: Unlicense diff --git a/.readthedocs.yml b/.readthedocs.yml index a1e2575..498b42a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries # # SPDX-License-Identifier: Unlicense diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d15b728..7f5aebd 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,9 @@ + + -