Skip to content

Commit

Permalink
RF24Network, RF24Mesh, and RXing BLE (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 authored Nov 23, 2021
1 parent 6cef461 commit a3d8131
Show file tree
Hide file tree
Showing 49 changed files with 6,400 additions and 3,183 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.py text eol=lf
*.rst text eol=lf
144 changes: 83 additions & 61 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,90 @@
name: Build CI

on: [pull_request, push]
on:
pull_request:
types: [opened, reopened]
push:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Translate Repo Name For Build Tools filename_prefix
id: repo-name
run: |
echo ::set-output name=repo-name::$(
echo ${{ github.repository }} |
awk -F '\/' '{ print tolower($2) }' |
tr '_' '-'
)
- name: Translate Repo Name For Build Tools package_prefix
id: pkg-name
run: |
echo ::set-output name=pkg-name::$(
echo ${{ github.repository }} |
awk -F '\/' '{ print tolower($2) }' |
tr '-' '_'
)
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Versions
run: |
python3 --version
- name: Checkout Current Repo
uses: actions/checkout@v1
with:
submodules: true
- name: Checkout tools repo
uses: actions/checkout@v2
with:
repository: adafruit/actions-ci-circuitpython-libs
path: actions-ci
- name: Install deps
run: |
source actions-ci/install.sh
- name: Pip install pylint, black, & Sphinx stuff
run: |
pip install pylint black
pip install -r docs/requirements.txt
- name: Library version
run: git describe --dirty --always --tags
- name: PyLint
run: |
pylint --disable=too-many-instance-attributes,too-many-public-methods,duplicate-code circuitpython_nrf24l01/*.py
([[ ! -d "examples" ]] || pylint --disable=invalid-name,duplicate-code $( find . -path "./examples/*.py" ))
- name: Build assets
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . --package_folder_prefix ${{ steps.pkg-name.outputs.pkg-name }}
- 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: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"

- name: Translate Repo Name For Build Tools filename_prefix
id: repo-name
run: |
echo ::set-output name=repo-name::$(
echo ${{ github.repository }} |
awk -F '\/' '{ print tolower($2) }' |
tr '_' '-'
)
- name: Translate Repo Name For Build Tools package_prefix
id: pkg-name
run: |
echo ::set-output name=pkg-name::$(
echo ${{ github.repository }} |
awk -F '\/' '{ print tolower($2) }' |
tr '-' '_'
)
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Versions
run: |
python3 --version
- name: Checkout Current Repo
uses: actions/checkout@v1
with:
submodules: true

- name: Checkout tools repo
uses: actions/checkout@v2
with:
repository: adafruit/actions-ci-circuitpython-libs
path: actions-ci

- name: Install deps
run: |
source actions-ci/install.sh
- name: Pip install pylint & Sphinx stuff (and graphviz)
run: |
pip install --upgrade setuptools twine wheel pylint
pip install -r docs/requirements.txt
sudo apt install graphviz
- name: Library version
run: git describe --dirty --always --tags

- name: PyLint
run: |
pylint circuitpython_nrf24l01/*.py circuitpython_nrf24l01/*/*.py
pylint --disable=c-extension-no-member examples/*.py
- name: Build assets
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . --package_folder_prefix ${{ steps.pkg-name.outputs.pkg-name }}

- 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 package distribution
run: |
python setup.py sdist
twine check dist/*
20 changes: 14 additions & 6 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,16 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
# 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
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
disable=print-statement,
duplicate-code,
import-error,
bad-whitespace,
bad-continuation,
consider-using-f-string,
too-few-public-methods,
too-many-instance-attributes,
too-many-public-methods,
unnecessary-dict-index-lookup

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

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

# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,_cb
callbacks=cb_,_cb,_callback

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

# Maximum number of characters on a single line.
max-line-length=100
max-line-length=88

# Maximum number of lines in a module
max-module-lines=1000
Expand Down Expand Up @@ -395,7 +403,7 @@ valid-metaclass-classmethod-first-arg=mcs
[DESIGN]

# Maximum number of arguments for function / method
max-args=5
max-args=6

# Maximum number of attributes for a class (see R0902).
# max-attributes=7
Expand Down
7 changes: 6 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ python:
version: 3.7
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt
- requirements: requirements.txt

# Build PDF & ePub
formats:
- epub
- pdf
75 changes: 37 additions & 38 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@

.. image:: https://readthedocs.org/projects/circuitpython-nrf24l01/badge/?version=stable
:target: https://circuitpython-nrf24l01.readthedocs.io/en/stable/
:alt: Documentation Status

.. image:: https://github.com/2bndy5/CircuitPython_nRF24L01/workflows/Build%20CI/badge.svg
:target: https://github.com/2bndy5/CircuitPython_nRF24L01/actions?query=workflow%3A%22Build+CI%22
:alt: Build Status

.. image:: https://img.shields.io/pypi/v/circuitpython-nrf24l01.svg
:target: https://pypi.python.org/pypi/circuitpython-nrf24l01
:alt: latest version on PyPI

.. image:: https://static.pepy.tech/personalized-badge/circuitpython-nrf24l01?period=total&units=international_system&left_color=grey&right_color=blue&left_text=PyPi%20Downloads
:target: https://pepy.tech/project/circuitpython-nrf24l01
:alt: Total PyPI downloads

Read The Docs
=============

Documentation for this library is hosted at
`ReadTheDocs.org <http://circuitpython-nrf24l01.rtfd.io/>`_

About this Library
==================

This is a Circuitpython driver library for the nRF24L01 transceiver.

Originally this code was a Micropython module written by Damien P. George
& Peter Hinch which can still be found `here
<https://github.com/micropython/micropython/tree/master/drivers/nrf24l01>`_

The Micropython source has since been rewritten to expose all the nRF24L01's
features and for Circuitpython compatible devices (including linux-based
SoC computers like the Raspberry Pi).
Modified by Brendan Doherty & Rhys Thomas.

* Authors: Damien P. George, Peter Hinch, Rhys Thomas, Brendan Doherty

.. image:: https://readthedocs.org/projects/circuitpython-nrf24l01/badge/?version=stable
:target: https://circuitpython-nrf24l01.readthedocs.io/en/stable/
:alt: Documentation Status

.. image:: https://github.com/2bndy5/CircuitPython_nRF24L01/workflows/Build%20CI/badge.svg
:target: https://github.com/2bndy5/CircuitPython_nRF24L01/actions?query=workflow%3A%22Build+CI%22
:alt: Build Status

.. image:: https://img.shields.io/pypi/v/circuitpython-nrf24l01.svg
:target: https://pypi.python.org/pypi/circuitpython-nrf24l01
:alt: latest version on PyPI

.. image:: https://static.pepy.tech/personalized-badge/circuitpython-nrf24l01?period=total&units=international_system&left_color=grey&right_color=blue&left_text=PyPi%20Downloads
:target: https://pepy.tech/project/circuitpython-nrf24l01
:alt: Total PyPI downloads

Read The Docs
=============

Documentation for this library is hosted at https://circuitpython-nrf24l01.rtfd.io/

About this Library
==================

This is a Circuitpython driver library for the nRF24L01 transceiver.

Originally this code was a Micropython module written by Damien P. George
& Peter Hinch which can still be found `here
<https://github.com/micropython/micropython/tree/master/drivers/nrf24l01>`_

The Micropython source has since been rewritten to expose all the nRF24L01's
features and for Circuitpython compatible devices (including linux-based
SoC computers like the Raspberry Pi).
Modified by Brendan Doherty & Rhys Thomas.

* Authors: Damien P. George, Peter Hinch, Rhys Thomas, Brendan Doherty
Loading

0 comments on commit a3d8131

Please sign in to comment.