Skip to content

Commit a3d8131

Browse files
authored
RF24Network, RF24Mesh, and RXing BLE (#33)
1 parent 6cef461 commit a3d8131

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+6400
-3183
lines changed

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
*.py text eol=lf
7+
*.rst text eol=lf

.github/workflows/build.yml

Lines changed: 83 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,90 @@
11
name: Build CI
22

3-
on: [pull_request, push]
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
push:
47

58
jobs:
69
test:
710
runs-on: ubuntu-latest
811
steps:
9-
- name: Dump GitHub context
10-
env:
11-
GITHUB_CONTEXT: ${{ toJson(github) }}
12-
run: echo "$GITHUB_CONTEXT"
13-
- name: Translate Repo Name For Build Tools filename_prefix
14-
id: repo-name
15-
run: |
16-
echo ::set-output name=repo-name::$(
17-
echo ${{ github.repository }} |
18-
awk -F '\/' '{ print tolower($2) }' |
19-
tr '_' '-'
20-
)
21-
- name: Translate Repo Name For Build Tools package_prefix
22-
id: pkg-name
23-
run: |
24-
echo ::set-output name=pkg-name::$(
25-
echo ${{ github.repository }} |
26-
awk -F '\/' '{ print tolower($2) }' |
27-
tr '-' '_'
28-
)
29-
- name: Set up Python 3.7
30-
uses: actions/setup-python@v1
31-
with:
32-
python-version: 3.7
33-
- name: Versions
34-
run: |
35-
python3 --version
36-
- name: Checkout Current Repo
37-
uses: actions/checkout@v1
38-
with:
39-
submodules: true
40-
- name: Checkout tools repo
41-
uses: actions/checkout@v2
42-
with:
43-
repository: adafruit/actions-ci-circuitpython-libs
44-
path: actions-ci
45-
- name: Install deps
46-
run: |
47-
source actions-ci/install.sh
48-
49-
- name: Pip install pylint, black, & Sphinx stuff
50-
run: |
51-
pip install pylint black
52-
pip install -r docs/requirements.txt
53-
- name: Library version
54-
run: git describe --dirty --always --tags
55-
- name: PyLint
56-
run: |
57-
pylint --disable=too-many-instance-attributes,too-many-public-methods,duplicate-code circuitpython_nrf24l01/*.py
58-
([[ ! -d "examples" ]] || pylint --disable=invalid-name,duplicate-code $( find . -path "./examples/*.py" ))
59-
- name: Build assets
60-
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . --package_folder_prefix ${{ steps.pkg-name.outputs.pkg-name }}
61-
- name: Archive bundles
62-
uses: actions/upload-artifact@v2
63-
with:
64-
name: bundles
65-
path: ${{ github.workspace }}/bundles/
66-
- name: Build docs
67-
working-directory: docs
68-
run: sphinx-build -E -W -b html . _build/html
12+
- name: Dump GitHub context
13+
env:
14+
GITHUB_CONTEXT: ${{ toJson(github) }}
15+
run: echo "$GITHUB_CONTEXT"
16+
17+
- name: Translate Repo Name For Build Tools filename_prefix
18+
id: repo-name
19+
run: |
20+
echo ::set-output name=repo-name::$(
21+
echo ${{ github.repository }} |
22+
awk -F '\/' '{ print tolower($2) }' |
23+
tr '_' '-'
24+
)
25+
26+
- name: Translate Repo Name For Build Tools package_prefix
27+
id: pkg-name
28+
run: |
29+
echo ::set-output name=pkg-name::$(
30+
echo ${{ github.repository }} |
31+
awk -F '\/' '{ print tolower($2) }' |
32+
tr '-' '_'
33+
)
34+
35+
- name: Set up Python 3.7
36+
uses: actions/setup-python@v1
37+
with:
38+
python-version: 3.7
39+
40+
- name: Versions
41+
run: |
42+
python3 --version
43+
44+
- name: Checkout Current Repo
45+
uses: actions/checkout@v1
46+
with:
47+
submodules: true
48+
49+
- name: Checkout tools repo
50+
uses: actions/checkout@v2
51+
with:
52+
repository: adafruit/actions-ci-circuitpython-libs
53+
path: actions-ci
54+
55+
- name: Install deps
56+
run: |
57+
source actions-ci/install.sh
58+
59+
- name: Pip install pylint & Sphinx stuff (and graphviz)
60+
run: |
61+
pip install --upgrade setuptools twine wheel pylint
62+
pip install -r docs/requirements.txt
63+
sudo apt install graphviz
64+
65+
66+
- name: Library version
67+
run: git describe --dirty --always --tags
68+
69+
- name: PyLint
70+
run: |
71+
pylint circuitpython_nrf24l01/*.py circuitpython_nrf24l01/*/*.py
72+
pylint --disable=c-extension-no-member examples/*.py
73+
74+
- name: Build assets
75+
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . --package_folder_prefix ${{ steps.pkg-name.outputs.pkg-name }}
76+
77+
- name: Archive bundles
78+
uses: actions/upload-artifact@v2
79+
with:
80+
name: bundles
81+
path: ${{ github.workspace }}/bundles/
82+
83+
- name: Build docs
84+
working-directory: docs
85+
run: sphinx-build -E -W -b html . _build/html
86+
87+
- name: Check package distribution
88+
run: |
89+
python setup.py sdist
90+
twine check dist/*

.pylintrc

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,16 @@ confidence=
5151
# --enable=similarities". If you want to run only the classes checker, but have
5252
# no Warning level messages displayed, use"--disable=all --enable=classes
5353
# --disable=W"
54-
# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call
55-
disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error
54+
disable=print-statement,
55+
duplicate-code,
56+
import-error,
57+
bad-whitespace,
58+
bad-continuation,
59+
consider-using-f-string,
60+
too-few-public-methods,
61+
too-many-instance-attributes,
62+
too-many-public-methods,
63+
unnecessary-dict-index-lookup
5664

5765
# Enable the message, report, category or checker with the given id(s). You can
5866
# either give multiple identifier separated by comma (,) or put this option
@@ -156,7 +164,7 @@ ignored-classes=optparse.Values,thread._local,_thread._local
156164
# (useful for modules/projects where namespaces are manipulated during runtime
157165
# and thus existing member attributes cannot be deduced by static analysis. It
158166
# supports qualified module names, as well as Unix pattern matching.
159-
ignored-modules=board
167+
ignored-modules=board,micropython
160168

161169
# Show a hint with possible names when a member name was not found. The aspect
162170
# of finding the hint is based on edit distance.
@@ -182,7 +190,7 @@ allow-global-unused-variables=yes
182190

183191
# List of strings which can identify a callback function by name. A callback
184192
# name must start or end with one of those strings.
185-
callbacks=cb_,_cb
193+
callbacks=cb_,_cb,_callback
186194

187195
# A regular expression matching the name of dummy variables (i.e. expectedly
188196
# not used).
@@ -217,7 +225,7 @@ indent-after-paren=4
217225
indent-string=' '
218226

219227
# Maximum number of characters on a single line.
220-
max-line-length=100
228+
max-line-length=88
221229

222230
# Maximum number of lines in a module
223231
max-module-lines=1000
@@ -395,7 +403,7 @@ valid-metaclass-classmethod-first-arg=mcs
395403
[DESIGN]
396404

397405
# Maximum number of arguments for function / method
398-
max-args=5
406+
max-args=6
399407

400408
# Maximum number of attributes for a class (see R0902).
401409
# max-attributes=7

.readthedocs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ python:
44
version: 3.7
55
install:
66
- requirements: docs/requirements.txt
7-
- requirements: requirements.txt
7+
- requirements: requirements.txt
8+
9+
# Build PDF & ePub
10+
formats:
11+
- epub
12+
- pdf

README.rst

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
1-
2-
.. image:: https://readthedocs.org/projects/circuitpython-nrf24l01/badge/?version=stable
3-
:target: https://circuitpython-nrf24l01.readthedocs.io/en/stable/
4-
:alt: Documentation Status
5-
6-
.. image:: https://github.com/2bndy5/CircuitPython_nRF24L01/workflows/Build%20CI/badge.svg
7-
:target: https://github.com/2bndy5/CircuitPython_nRF24L01/actions?query=workflow%3A%22Build+CI%22
8-
:alt: Build Status
9-
10-
.. image:: https://img.shields.io/pypi/v/circuitpython-nrf24l01.svg
11-
:target: https://pypi.python.org/pypi/circuitpython-nrf24l01
12-
:alt: latest version on PyPI
13-
14-
.. image:: https://static.pepy.tech/personalized-badge/circuitpython-nrf24l01?period=total&units=international_system&left_color=grey&right_color=blue&left_text=PyPi%20Downloads
15-
:target: https://pepy.tech/project/circuitpython-nrf24l01
16-
:alt: Total PyPI downloads
17-
18-
Read The Docs
19-
=============
20-
21-
Documentation for this library is hosted at
22-
`ReadTheDocs.org <http://circuitpython-nrf24l01.rtfd.io/>`_
23-
24-
About this Library
25-
==================
26-
27-
This is a Circuitpython driver library for the nRF24L01 transceiver.
28-
29-
Originally this code was a Micropython module written by Damien P. George
30-
& Peter Hinch which can still be found `here
31-
<https://github.com/micropython/micropython/tree/master/drivers/nrf24l01>`_
32-
33-
The Micropython source has since been rewritten to expose all the nRF24L01's
34-
features and for Circuitpython compatible devices (including linux-based
35-
SoC computers like the Raspberry Pi).
36-
Modified by Brendan Doherty & Rhys Thomas.
37-
38-
* Authors: Damien P. George, Peter Hinch, Rhys Thomas, Brendan Doherty
1+
2+
.. image:: https://readthedocs.org/projects/circuitpython-nrf24l01/badge/?version=stable
3+
:target: https://circuitpython-nrf24l01.readthedocs.io/en/stable/
4+
:alt: Documentation Status
5+
6+
.. image:: https://github.com/2bndy5/CircuitPython_nRF24L01/workflows/Build%20CI/badge.svg
7+
:target: https://github.com/2bndy5/CircuitPython_nRF24L01/actions?query=workflow%3A%22Build+CI%22
8+
:alt: Build Status
9+
10+
.. image:: https://img.shields.io/pypi/v/circuitpython-nrf24l01.svg
11+
:target: https://pypi.python.org/pypi/circuitpython-nrf24l01
12+
:alt: latest version on PyPI
13+
14+
.. image:: https://static.pepy.tech/personalized-badge/circuitpython-nrf24l01?period=total&units=international_system&left_color=grey&right_color=blue&left_text=PyPi%20Downloads
15+
:target: https://pepy.tech/project/circuitpython-nrf24l01
16+
:alt: Total PyPI downloads
17+
18+
Read The Docs
19+
=============
20+
21+
Documentation for this library is hosted at https://circuitpython-nrf24l01.rtfd.io/
22+
23+
About this Library
24+
==================
25+
26+
This is a Circuitpython driver library for the nRF24L01 transceiver.
27+
28+
Originally this code was a Micropython module written by Damien P. George
29+
& Peter Hinch which can still be found `here
30+
<https://github.com/micropython/micropython/tree/master/drivers/nrf24l01>`_
31+
32+
The Micropython source has since been rewritten to expose all the nRF24L01's
33+
features and for Circuitpython compatible devices (including linux-based
34+
SoC computers like the Raspberry Pi).
35+
Modified by Brendan Doherty & Rhys Thomas.
36+
37+
* Authors: Damien P. George, Peter Hinch, Rhys Thomas, Brendan Doherty

0 commit comments

Comments
 (0)