Skip to content

Commit 08ccbd7

Browse files
committed
Ran pre-commit, added licenses
1 parent dc405f1 commit 08ccbd7

27 files changed

+470
-94
lines changed

.github/workflows/build.yml

+25-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
name: Build CI
26

37
on: [pull_request, push]
@@ -38,20 +42,36 @@ jobs:
3842
# (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
3943
run: |
4044
source actions-ci/install.sh
41-
- name: Pip install pylint, black, & Sphinx
45+
- name: Pip install pylint, Sphinx, pre-commit
4246
run: |
43-
pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
47+
pip install --force-reinstall pylint Sphinx sphinx-rtd-theme pre-commit
4448
- name: Library version
4549
run: git describe --dirty --always --tags
50+
- name: Pre-commit hooks
51+
run: |
52+
pre-commit run --all-files
4653
- name: PyLint
4754
run: |
4855
pylint $( find . -path './adafruit*.py' )
4956
([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" ))
50-
- name: Check formatting
51-
run: |
52-
black --check --target-version=py35 .
5357
- name: Build assets
5458
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
59+
- name: Archive bundles
60+
uses: actions/upload-artifact@v2
61+
with:
62+
name: bundles
63+
path: ${{ github.workspace }}/bundles/
5564
- name: Build docs
5665
working-directory: docs
5766
run: sphinx-build -E -W -b html . _build/html
67+
- name: Check For setup.py
68+
id: need-pypi
69+
run: |
70+
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
71+
- name: Build Python package
72+
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
73+
run: |
74+
pip install --upgrade setuptools wheel twine readme_renderer testresources
75+
python setup.py sdist
76+
python setup.py bdist_wheel --universal
77+
twine check dist/*

.github/workflows/release.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
name: Release Actions
26

37
on:

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
*.mpy
26
.idea
37
__pycache__

.pylintrc

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
[MASTER]
26

37
# A comma-separated list of package or module names from where C extensions may

.readthedocs.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
python:
26
version: 3
37
requirements_file: requirements.txt

CODE_OF_CONDUCT.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2014 Coraline Ada Ehmke
3+
SPDX-FileCopyrightText: 2019 Kattni Rembor for Adafruit Industries
4+
SPDX-License-Identifier: CC-BY-4.0
5+
-->
6+
17
# Adafruit Community Code of Conduct
28

39
## Our Pledge

LICENSES/CC-BY-4.0.txt

+324
Large diffs are not rendered by default.

LICENSES/MIT.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
MIT License Copyright (c) <year> <copyright holders>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice (including the next
11+
paragraph) shall be included in all copies or substantial portions of the
12+
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, FITNESS
16+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
17+
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
19+
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

LICENSES/Unlicense.txt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
This is free and unencumbered software released into the public domain.
2+
3+
Anyone is free to copy, modify, publish, use, compile, sell, or distribute
4+
this software, either in source code form or as a compiled binary, for any
5+
purpose, commercial or non-commercial, and by any means.
6+
7+
In jurisdictions that recognize copyright laws, the author or authors of this
8+
software dedicate any and all copyright interest in the software to the public
9+
domain. We make this dedication for the benefit of the public at large and
10+
to the detriment of our heirs and successors. We intend this dedication to
11+
be an overt act of relinquishment in perpetuity of all present and future
12+
rights to this software under copyright law.
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, FITNESS
16+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
17+
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
19+
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information,
20+
please refer to <https://unlicense.org/>

README.rst.license

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
3+
SPDX-License-Identifier: MIT

adafruit_fona/adafruit_fona.py

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

adafruit_fona/adafruit_fona_network.py

+3-20
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
1-
# The MIT License (MIT)
1+
# SPDX-FileCopyrightText: 2020 Brent Rubell for Adafruit Industries
22
#
3-
# Copyright (c) 2020 Brent Rubell for Adafruit Industries
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
13-
# all 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
21-
# THE SOFTWARE.
3+
# SPDX-License-Identifier: MIT
4+
225
"""
236
`adafruit_fona_network`
247
=================================================================================

adafruit_fona/adafruit_fona_socket.py

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

225208
def available(self):
226-
"""Returns how many bytes are available to be read from the socket.
227-
228-
"""
209+
"""Returns how many bytes are available to be read from the socket."""
229210
return _the_interface.socket_available(self._socknum)
230211

231212
def settimeout(self, value):

adafruit_fona/fona_3g.py

+5-23
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
1-
# The MIT License (MIT)
1+
# SPDX-FileCopyrightText: Limor Fried/Ladyada for Adafruit Industries
2+
# SPDX-FileCopyrightText: 2020 Brent Rubell for Adafruit Industries
23
#
3-
# Copyright Limor Fried/Ladyada for Adafruit Industries
4-
# Copyright (c) 2020 Brent Rubell for Adafruit Industries
5-
#
6-
# Permission is hereby granted, free of charge, to any person obtaining a copy
7-
# of this software and associated documentation files (the "Software"), to deal
8-
# in the Software without restriction, including without limitation the rights
9-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
# copies of the Software, and to permit persons to whom the Software is
11-
# furnished to do so, subject to the following conditions:
12-
#
13-
# The above copyright notice and this permission notice shall be included in
14-
# all copies or substantial portions of the Software.
15-
#
16-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22-
# THE SOFTWARE.
4+
# SPDX-License-Identifier: MIT
5+
236
"""
247
:py:class:`~adafruit_fona.fona_3g.FONA3G`
258
`adafruit_fona_3g`
@@ -254,8 +237,7 @@ def socket_connect(self, sock_num, dest, port, conn_mode=0):
254237
return True
255238

256239
def remote_ip(self, sock_num):
257-
"""Returns the IP address of the remote connection.
258-
"""
240+
"""Returns the IP address of the remote connection."""
259241
self._read_line()
260242
assert (
261243
sock_num < FONA_MAX_SOCKETS

docs/_static/favicon.ico.license

+3
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
:members:
99

1010
.. automodule:: adafruit_fona.adafruit_fona_socket
11-
:members:
11+
:members:

docs/api.rst.license

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2020 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT

docs/conf.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# -*- coding: utf-8 -*-
22

3+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
4+
#
5+
# SPDX-License-Identifier: MIT
6+
37
import os
48
import sys
59

docs/examples.rst.license

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2020 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT

docs/index.rst.license

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2020 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT

examples/fona_aio_post.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
14
# pylint: disable=unused-import
25
import time
36
import board

examples/fona_cheerlights.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
14
# pylint: disable=unused-import
25
import time
36
import board

examples/fona_simpletest.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
14
# pylint: disable=unused-import
25
import time
36
import board

examples/fona_sms.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
14
# pylint: disable=unused-import
25
import time
36
import board

examples/fona_sms_response.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
14
# pylint: disable=unused-import
25
import time
36
import board

requirements.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
Adafruit-Blinka
26
adafruit-circuitpython-busdevice
37
adafruit-circuitpython-simpleio

setup.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
"""A setuptools based setup module.
26
37
See:

0 commit comments

Comments
 (0)