Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RF24Network, RF24Mesh, and RXing BLE #33

Merged
merged 300 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
300 commits
Select commit Hold shift + click to select a range
0d0c752
revert rf24.py; let user pass a digitalio obj
2bndy5 Feb 18, 2021
1973102
fix typos and adapted fake_ble_test for
2bndy5 Feb 18, 2021
7745244
fix docs and print less in file_transfer.py
2bndy5 Feb 18, 2021
682ef29
think I broke _reg_write somehow
2bndy5 Feb 19, 2021
ae97e6d
adapting rf24.py for Linux
2bndy5 Feb 19, 2021
efc2e2c
address "too-many-branches" from pylint
2bndy5 Feb 19, 2021
e4b98ba
make examples pass a pin as dio obj
2bndy5 Feb 19, 2021
13d6c76
remove unused imports
2bndy5 Feb 19, 2021
6bd8a53
fix bad indent
2bndy5 Feb 22, 2021
928f901
forgot to OR 0x20 with reg cmd
2bndy5 Feb 23, 2021
cfd6241
duplicate code is unavoidable for lite ver
2bndy5 Feb 23, 2021
9341758
of course examples will have duplicate code
2bndy5 Feb 23, 2021
98d0ab9
network class attributes are instance attributes
2bndy5 Feb 25, 2021
581340d
remove logger from RF24; slowed everything down
2bndy5 Mar 1, 2021
0ca217d
remove logger from FakeBLE
2bndy5 Mar 1, 2021
6a5548c
fix docs
2bndy5 Mar 1, 2021
1e8f0bd
bus_device will be part of CirPy FW in 6.2.0
2bndy5 Mar 1, 2021
c23f351
minor tweaks to code layout
2bndy5 Mar 2, 2021
91663bf
fix some docstr that were too long
2bndy5 Mar 2, 2021
7263de7
shorten a long comment in all examples
2bndy5 Mar 2, 2021
3af24e1
missed a long line in network_simple_test
2bndy5 Mar 2, 2021
4a76396
fix RF24Network._pipe_address()
2bndy5 Mar 6, 2021
eea5c3b
half-ported; need queue implemented
2bndy5 Mar 8, 2021
c944076
setting dyn_pl always write to FEATURE register
2bndy5 May 1, 2021
d9f9955
add some type hinting
2bndy5 Jun 14, 2021
9882550
finish type hinting
2bndy5 Jun 15, 2021
abac60b
fix some type hints saying optional but aren't
2bndy5 Jun 15, 2021
6ed26cf
remove unused import
2bndy5 Jun 15, 2021
3876c9e
undo type hinting; network example receives
2bndy5 Jun 18, 2021
b01725c
Update rf24.py
bhartung May 5, 2021
f83060d
undo type hinting in fake_ble.py
2bndy5 Jun 18, 2021
3267188
network example's master() runs (not well)
2bndy5 Jun 18, 2021
e91c9aa
network example works!!
2bndy5 Jun 19, 2021
b88b102
explicitly use LF for linendings
2bndy5 Jun 19, 2021
409ebd0
ran black on *.py
2bndy5 Jun 19, 2021
a69ef0f
cleanup docs and some code
2bndy5 Jun 19, 2021
8b3dfdc
RX FIFO not fetched fast enough for 5(+)-frag msgs
2bndy5 Jun 20, 2021
71f4321
fix fragmented transmitting
2bndy5 Jun 20, 2021
7bc8172
update network example & network debug in update()
2bndy5 Jun 21, 2021
989ebc1
[avoid mem leak] only cache 1 frag'd msg at a time
2bndy5 Jun 21, 2021
4de543c
speed up install by explicitly specifying pkg
2bndy5 Jun 21, 2021
f5a56e5
[setup.py] revert last change
2bndy5 Jun 21, 2021
79845f4
[setup.py] no faster than using find_packages()
2bndy5 Jun 21, 2021
d642e5a
normalize line endings
2bndy5 Jun 27, 2021
6683b3c
[no ci] add copyright & some type hinting
2bndy5 Jun 27, 2021
9c37744
revised network example
2bndy5 Jun 27, 2021
06637be
add an optional reverse param to addr_repr()
2bndy5 Jun 27, 2021
23e01cd
fix auto-routing msgs
2bndy5 Jun 28, 2021
d99973a
fix a line too long
2bndy5 Jun 28, 2021
fd73637
[network example] allow user to choose destination
2bndy5 Jun 28, 2021
f6144da
[network] review update() & multicasting
2bndy5 Jun 28, 2021
24c2003
organize docs and examples
2bndy5 Jun 30, 2021
61786ab
fix timeouts; don't alter fwd'd msg's origin addr
2bndy5 Jun 30, 2021
44758a4
_write_frag waits on retries; fix logging on Linux
2bndy5 Jun 30, 2021
59617aa
don't do time.sleep() in frag retries
2bndy5 Jun 30, 2021
b1c2b32
don't flush_rx() on TX operations
2bndy5 Jun 30, 2021
b7a5314
fix "too-many-branches" pylint warning
2bndy5 Jun 30, 2021
34f56e6
use pylint on sub-pkgs also
2bndy5 Jun 30, 2021
9908fa7
add line numbers back into docs examples
2bndy5 Jun 30, 2021
1d5c81e
[no ci] version bump
2bndy5 Jun 30, 2021
837b0fe
admonition lib additions in docs
2bndy5 Jun 30, 2021
364c31b
enable/disable frag cache if frag is enabled
2bndy5 Jul 1, 2021
f90a8a0
skip setting tx addr if no change in tx addr
2bndy5 Jul 2, 2021
35e94a1
revise network example, update(), _is_addr_valid()
2bndy5 Jul 2, 2021
a4f18c5
abstract temp logger stuff for semi-easy removal
2bndy5 Jul 2, 2021
f5b8a11
remove logging stuff from docs
2bndy5 Jul 2, 2021
1e9584c
update docs and network example prompt
2bndy5 Jul 2, 2021
468ea79
add RF24Mesh
2bndy5 Jul 4, 2021
1e06603
add mesh simple example; revised docs
2bndy5 Jul 4, 2021
fded94b
update constants.rst
2bndy5 Jul 4, 2021
2ab6481
RF24Mesh is broken
2bndy5 Jul 5, 2021
defde66
Create CONTRIBUTING.md
2bndy5 Jul 5, 2021
6f44690
[fake_ble] add service data getters
2bndy5 Jul 5, 2021
6cc7313
@salembream FakeBLE can receive now
2bndy5 Jul 6, 2021
8bcb60c
pleasing pylint
2bndy5 Jul 6, 2021
b83fe3a
ignore too-many-branches in fake_ble_test
2bndy5 Jul 6, 2021
ef1979a
fix crc checking in Fake_BLE.available()
2bndy5 Jul 6, 2021
d563a5d
add units to BLE scan; remove useless param
2bndy5 Jul 6, 2021
90227d7
[no ci] adjust debug statement
2bndy5 Jul 6, 2021
ed37d5a
proofread BLE docs; don't access private members
2bndy5 Jul 6, 2021
ac5642f
need a better way to handle decoding BLE flags
2bndy5 Jul 6, 2021
4eb822e
ignore BLE flags (for now)
2bndy5 Jul 6, 2021
17535b1
found another edge case to handle
2bndy5 Jul 6, 2021
c56dd1a
[BLE RX] taking a dif approach to decoding data
2bndy5 Jul 7, 2021
d072b0f
update docs
2bndy5 Jul 7, 2021
40a7dfb
note version added for QueueElement class
2bndy5 Jul 7, 2021
62b03ce
add repr on ServiceData obj; show buf of BLE flags
2bndy5 Jul 8, 2021
755af65
pleasing pylint
2bndy5 Jul 8, 2021
349ad1c
RF24Mesh relies a lot on network.write()
2bndy5 Jul 9, 2021
035ca82
MULTICAST_ADDR only used in RF24Network
2bndy5 Jul 9, 2021
6301bb5
only do extra wait time if not powered up
2bndy5 Jul 9, 2021
74668b1
is mesh new addr check working; update examples
2bndy5 Jul 9, 2021
c5f3321
fixing docs
2bndy5 Jul 9, 2021
eb08751
update warning in whiten()
2bndy5 Jul 9, 2021
2f66a13
store inverted self._addr_mask
2bndy5 Jul 9, 2021
eb3c90d
update docs
2bndy5 Jul 10, 2021
bc9d254
add topology page
2bndy5 Jul 10, 2021
256a69e
add graphviz to build CI workflow
2bndy5 Jul 10, 2021
f20d4cb
update topology.rst
2bndy5 Jul 10, 2021
f930ddf
speed up setting auto_ack on RF24Network
2bndy5 Jul 10, 2021
44a487b
fix topology graphs
2bndy5 Jul 10, 2021
75ffe51
add hex_upper() helper for address_repr()
2bndy5 Jul 11, 2021
3fffb0a
undo changes to code snippet in troubleshooting
2bndy5 Jul 11, 2021
79e7f12
[speedup] use self._status instead of attributes
2bndy5 Jul 11, 2021
a9a07f1
squash bugs in last commit
2bndy5 Jul 11, 2021
544ee2c
update greetings.rst
2bndy5 Jul 12, 2021
413d275
update docs a bit; move update() & use const
2bndy5 Jul 12, 2021
0e10fdb
Update rf24_network.py
2bndy5 Jul 15, 2021
b75dad7
utilize Queue obj more/better
2bndy5 Jul 16, 2021
c3e3dfe
too many branches while still logging debug stuff
2bndy5 Jul 16, 2021
50e4b52
update Queue docs and c'tor call in __init__()
2bndy5 Jul 16, 2021
a1bd120
Update structs.rst
2bndy5 Jul 16, 2021
106d879
fix docs about peek*()
2bndy5 Jul 16, 2021
537a217
[no ci] update chapter titles for peek*()
2bndy5 Jul 16, 2021
ee69129
add peek_message_length()
2bndy5 Jul 16, 2021
6a429f7
[no ci] fix doc typo
2bndy5 Jul 17, 2021
88346c0
revise structures' docs for repetition
2bndy5 Jul 17, 2021
690dc71
interlink Logical address refs
2bndy5 Jul 17, 2021
0018d0b
fix from_node docstr
2bndy5 Jul 17, 2021
bbae5c4
fix to_node docstr
2bndy5 Jul 17, 2021
bb52a26
less debug output = faster exec time
2bndy5 Jul 17, 2021
21f297e
filling in the docs
2bndy5 Jul 18, 2021
2b2c129
fix mesh example master()
2bndy5 Jul 18, 2021
a8300e0
add power attribute to shared net API
2bndy5 Jul 18, 2021
834725b
try another fix for _logical_to_physical()
2bndy5 Jul 18, 2021
9452fdc
bad logic in last commit
2bndy5 Jul 18, 2021
e7e41dd
mesh master node code works
2bndy5 Jul 18, 2021
0341d28
reuse frame_cache a lil
2bndy5 Jul 19, 2021
b879964
forgot dict.items() again
2bndy5 Jul 19, 2021
eda52c3
fix frame_cache.message out of scope
2bndy5 Jul 19, 2021
8cc012c
re-write write() for _pre_write()
2bndy5 Jul 20, 2021
ab312dc
ammend traffic_direct value
2bndy5 Jul 20, 2021
b4e13ba
use twine check on build CI
2bndy5 Jul 25, 2021
44af75a
ignore yet another pylint false-positive
2bndy5 Jul 25, 2021
a87d8cf
fixing frag out
2bndy5 Jul 26, 2021
e5131f5
better duplicate frame filtering in queue
2bndy5 Jul 26, 2021
e317fa3
queue copied frames not references
2bndy5 Jul 26, 2021
194d07d
fix pipe 0 address between TX/RX modes
2bndy5 Jul 26, 2021
3f47d7c
optimize mem for fragging
2bndy5 Jul 26, 2021
dd47f80
back to debugging rf24mesh
2bndy5 Jul 26, 2021
42cb012
[pylint] ignore temporary unused imports
2bndy5 Jul 26, 2021
765ac33
RF24Mesh example works!!!
2bndy5 Jul 26, 2021
c67dcd7
mesh still can't connect to C++ mesh master
2bndy5 Jul 26, 2021
c3f25bb
adjust mesh example and new_addr check
2bndy5 Jul 26, 2021
52663cf
OOPS make sure that SpiDev is installed on Linux
2bndy5 Jul 26, 2021
d7b50ac
testing NETWORK_ACK msgs
2bndy5 Jul 27, 2021
d563669
expose print_pipes() & update docs
2bndy5 Jul 27, 2021
f13bd70
some more speed ups
2bndy5 Jul 27, 2021
504c55f
do conditional wait in listen
2bndy5 Jul 27, 2021
c48590a
improve changes to open_tx_pipe()
2bndy5 Jul 27, 2021
394d4a4
make write() return `not irq_df`
2bndy5 Jul 27, 2021
cae75a5
Revert "make write() return `not irq_df`"
2bndy5 Jul 27, 2021
49098e9
as fast as i can go
2bndy5 Jul 28, 2021
e2be296
un-breaking linux
2bndy5 Jul 28, 2021
051edf1
finally, this feels like solid networking
2bndy5 Jul 28, 2021
05f3669
[no ci] don't hide is_addr_valid() in docs
2bndy5 Jul 28, 2021
106480d
[no ci] fill out docs for is_addr_valid()
2bndy5 Jul 28, 2021
617db2c
refactoring
2bndy5 Jul 29, 2021
19305d9
fix network.send(); multicast_relay off by default
2bndy5 Jul 29, 2021
1b88663
[topology.rst] learned enough to hate graphviz
2bndy5 Jul 30, 2021
6c50689
remove RPi.GPIO wrapper
2bndy5 Jul 30, 2021
5ea0cfa
improve network.print_details()
2bndy5 Jul 31, 2021
2c095db
print_details output DHCP list on master nodes
2bndy5 Jul 31, 2021
3557397
[no ci] adjust DHCP list's output
2bndy5 Jul 31, 2021
0c3862c
Mesh only inherits what it needs; abstract docs
2bndy5 Jul 31, 2021
cacbb82
remove native logging; fix network examples
2bndy5 Jul 31, 2021
5a56f99
fix auto-dhcp
2bndy5 Aug 1, 2021
bbab86c
slimming it down more
2bndy5 Aug 1, 2021
26c5602
fix allow_children and make dhcp() private
2bndy5 Aug 1, 2021
f8ba4f4
revise examples, intro MESH_NO_MASTER
2bndy5 Aug 2, 2021
5d075eb
ignore pylint false-positive
2bndy5 Aug 2, 2021
f258611
try ext data q; test RF24 write() vs send()
2bndy5 Aug 2, 2021
4d26bed
use same queue 4 ext data; make no-ack send faster
2bndy5 Aug 3, 2021
260efb3
add tx-delay b4 going back to RX
2bndy5 Aug 3, 2021
ae9b6db
move tx_delay to RF24.listen = True
2bndy5 Aug 4, 2021
43e1a2b
revert to 1 lvl TX FIFO due to bad time resolution
2bndy5 Aug 4, 2021
a414f04
remove unused RF24.tx_delay
2bndy5 Aug 4, 2021
c99c2fc
I'm ready for a PR now
2bndy5 Aug 4, 2021
7670014
Merge branch 'master' into rf24-network
2bndy5 Aug 4, 2021
b3fa017
improve user prompts in network example
2bndy5 Aug 4, 2021
f9d5acc
Merge branch 'rf24-network' of https://github.com/2bndy5/CircuitPytho…
2bndy5 Aug 4, 2021
b4ec773
duplicate frames unfiltered; speed up mesh.send(0)
2bndy5 Aug 5, 2021
dbc235c
use bytearray for physical address seeds
2bndy5 Aug 5, 2021
94d255b
topology page not showing changes on rtfd.io???
2bndy5 Aug 5, 2021
a9d7f97
update (& move 2 badges to) greetings.rst
2bndy5 Aug 5, 2021
4522f1d
update pinout in greetings.rst
2bndy5 Aug 5, 2021
9db792b
some proofreafding
2bndy5 Aug 5, 2021
432d523
add tutorial to topology
2bndy5 Aug 5, 2021
654e70c
ammend network.write() docs
2bndy5 Aug 5, 2021
0bbd4aa
replace network_flags with _parenthood
2bndy5 Aug 5, 2021
ca57b62
send to self goes directly in queue
2bndy5 Aug 6, 2021
6740b80
CirPy supports f-strings!!!
2bndy5 Aug 6, 2021
da7f6d5
pleasing pylint
2bndy5 Aug 6, 2021
dc2ad46
tweak docs
2bndy5 Aug 6, 2021
8e77890
expose set_adress(); update examples.rst
2bndy5 Aug 6, 2021
9fae228
update deps; remove debugging from RF24
2bndy5 Aug 6, 2021
93bd0dc
more proofreading
2bndy5 Aug 7, 2021
f7d1a67
[no ci] typo in docs topology
2bndy5 Aug 7, 2021
486aab3
[no ci] another typo
2bndy5 Aug 7, 2021
5c9f73a
remove confusing advice to use `sudo pip3`
2bndy5 Aug 7, 2021
15504af
review fake_ble changes
2bndy5 Aug 8, 2021
e7ccc0c
init shadow copy of _pipes differently
2bndy5 Aug 23, 2021
5ed987e
pleasing pylint
2bndy5 Aug 24, 2021
6013fd7
ammend hard-coded repo urls
2bndy5 Aug 24, 2021
8249da1
allow setting address_length to 2
2bndy5 Oct 9, 2021
fac0595
ignore pylint advice to use only f-strings
2bndy5 Oct 9, 2021
32f3c0a
switch to sphinx-immaterial docs theme (dev pkg)
2bndy5 Oct 10, 2021
e3142e6
cd to docs in build CI step
2bndy5 Oct 10, 2021
6e068d6
RTFD needs theme's dev pkg relative to repo root
2bndy5 Oct 10, 2021
1c5b5aa
try RTFD integration in sphinx-immaterial
2bndy5 Oct 10, 2021
d16bf45
rename theme whl in docs' deps
2bndy5 Oct 10, 2021
ce62386
update wheel for docs theme
2bndy5 Oct 12, 2021
39fcdc8
update theme's wheel
2bndy5 Oct 12, 2021
0bc6d31
RTD uses jquery with docs build
2bndy5 Oct 13, 2021
d73148a
Update sphinx_immaterial-0.0.post1.dev3-py3-none-any.whl
2bndy5 Oct 13, 2021
4c3192b
Update sphinx_immaterial-0.0.post1.dev3-py3-none-any.whl
2bndy5 Oct 13, 2021
00c62aa
Update sphinx_immaterial-0.0.post1.dev3-py3-none-any.whl
2bndy5 Oct 13, 2021
ce54378
force update theme's wheel
2bndy5 Oct 13, 2021
b5e1cf8
enable pdf & epub downloads for RTD
2bndy5 Oct 13, 2021
9afe139
try again with latex builds fixed
2bndy5 Oct 13, 2021
9c8bdf1
update docs theme wheel
2bndy5 Oct 15, 2021
ffeb323
get rid of greetings.rst
2bndy5 Oct 15, 2021
2c339a7
try prepending hidden toc
2bndy5 Oct 15, 2021
0c5c61f
explain network mixin classes
2bndy5 Oct 17, 2021
0ada5c3
PEP 396 was rejected
2bndy5 Oct 17, 2021
1f71d5a
fix mis-typed rst directive
2bndy5 Oct 17, 2021
b637b22
remove local wheel; use thene dist from pypi
2bndy5 Oct 17, 2021
b29e820
fix start_carrier(); no nested quotes in f-strings
2bndy5 Oct 21, 2021
8cf18e3
reviewed BLE docs
2bndy5 Oct 25, 2021
30908fa
docs review; type hinting w/o `typing` module
2bndy5 Oct 25, 2021
599a012
BLE name can be set w/ a str; type hints for BLE
2bndy5 Oct 25, 2021
04ba282
ran black on fake_ble.py
2bndy5 Oct 25, 2021
acf2282
fix inaccuracy in BLE doc
2bndy5 Oct 25, 2021
8b0ee58
ce_pin cannot be None
2bndy5 Oct 25, 2021
c1c3f53
rename extra css for docs
2bndy5 Oct 25, 2021
4184785
use `with` to restore settings after carrier wave
2bndy5 Oct 26, 2021
dbebb8d
fix bad grammar in docs
2bndy5 Oct 26, 2021
077e3ed
warn about msg_t attr being set w/ str
2bndy5 Oct 26, 2021
0aceca8
don't warn about msg_t as str, just deal w/ it
2bndy5 Oct 26, 2021
8d95124
reword a doc's note
2bndy5 Oct 26, 2021
6c7a6c1
update sample output from network.print_details()
2bndy5 Oct 26, 2021
a03071e
show kwarg usage in last commit's change
2bndy5 Oct 26, 2021
5c32556
nullify #27 by always blindly supporting 250kbps
2bndy5 Oct 26, 2021
6f6a70d
scanner example uses RE tactics; add noise() func
2bndy5 Oct 26, 2021
12846e1
pleasing pylint
2bndy5 Oct 26, 2021
6238d65
make docs' line numbers stand out from code
2bndy5 Oct 26, 2021
65ee0b2
[scanner example] let noise() use channel 0
2bndy5 Oct 26, 2021
4ca82b4
add margin to docs' line numbers
2bndy5 Oct 26, 2021
fdbde1d
add distinction to docs about NET_ACK vs auto-ack
2bndy5 Oct 31, 2021
1715f06
make admonition text bigger
2bndy5 Nov 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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