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

Expose old open pipe funcs #12

Merged
merged 22 commits into from
Aug 26, 2022
Merged

Expose old open pipe funcs #12

merged 22 commits into from
Aug 26, 2022

Conversation

2bndy5
Copy link
Member

@2bndy5 2bndy5 commented Aug 9, 2022

I decided to take another try at exposing the overloaded openReading/WritingPipe() functions that take an int as an address. In successfully doing so, I found that there is a better way to declare functions that take a bytes or bytearray object (using pybind11::buffer datatype).

Other changes

  • removed third party build requirement scikit-build. This allows for better control over what files get put in the distribution. Not to mention, its usage was recently discouraged (by one its authors 👀 ) when I asked about controlling the files in sdist.
    • BTW, the newer setup.py modifications are similar to the older individual RF24 wrapper's setup.py (just more versatile because of CMake).
    • The only third party build dependency left is setuptools_scm which I'm using to get the version from the tagged commit upon release. Additionally, wheel and setuptools are abstractions that used to be part of the std libs (still required for building any wheels).
  • updated README about building wheels with CMake args (ie using a different driver or enabling debug output from individual layers of the stack).
  • added badges to the README
  • added instructions to install from pypi (and piwheels implicitly) in the README
  • added the clang-format checks to the CI
  • build bdist_wheels for amd64 platforms. This should close the gap for any platform that needs to compile the pkg from src (Windows and MacOS can install from src because compilation is appropriately skipped).
  • remove the musllinux wheels from distributions because they aren't actually used (pip seems to prefer manylinux wheels)
  • manually excluded more useless files from the published sdist archive (which should only be used by pip for non-Linux platforms now).

2bndy5 added 14 commits July 26, 2022 02:32
- change wrapper functions that take buffers from
  py::object args into py::buffer args.
- make RF24NetworkWrapper c'tor explicitly
  cast the _radio arg as a RF24 obj.
- readme now shows howto migrate from the old wrappers
- readme now shows how to install from pypi or piwheels via pip
- add some badges to readme
- added missing RF24Network c'tor
- re-worded RF24Mesh.write() doc a bit
- made sure pyrf24.rf24 module shows up in the docs' python modules index
- removed unnecessary option from automodule directive
- correct the RF24Mesh docs' sections' nested ordering
remove superfluous badge and change some instructions to use pip instead of setup.py
- update README about building with added CMake args.`
- ignore wheelhouse dir for local runs of cibuildwheel.
- move binding code out of python pkg src.
- move most of pkg metadata into pyproject.toml

updated requirements

- wheel seemed to have been a dependency of scikit-build
- cpp-linter is now available from PyPI.
specifically for args that use default values.

Should be properly documented, but this will suffice, but that would require
abstracting  build/install instructions from README to a new page
@2bndy5 2bndy5 marked this pull request as ready for review August 26, 2022 11:17
@2bndy5
Copy link
Member Author

2bndy5 commented Aug 26, 2022

I tested this with the multiceiver_demo example modified to use a mix of integer and bytearray objects as addresses. Everything looks good! I also tested the networking layers using the general_network_test example (both mesh and net layers individually) just to make sure the changes didn't break anything.

Note: The integers (like in C++) are written equivalently to the bytearray form if endianness is reversed.

>>> import struct
>>> addr = struct.pack("Q", 0xb3b4b5b6f1)
>>> # 'Q' is an unsigned long long (8 bytes), so we'll just examine the first 5
>>> addr[:5]
b'\xf1\xb6\xb5\xb4\xb3'

None of the example code actually uses integer objects as addresses because the functions that this PR is exposing are technically deprecated according to the docs.

needs to use Ubuntu 22.-04 to get adequate version of cmake via apt
gh-pages will be used only for push event reviews now.

Going forward, RTD is preferable for end-users because
we can host multiple branches/versions of the docs on RTD.io
RTD can also be used to preview the docs for a PR.
- update classifiers for PyPI
- hardcode badge color for piwheels
Copy link
Member Author

@2bndy5 2bndy5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed & tested this. Now I'm merging this.

When the release CI finishes, these changes will be released as part of v0.2.1

@2bndy5 2bndy5 merged commit 50b6e49 into main Aug 26, 2022
@2bndy5 2bndy5 deleted the expose-old-openPipe-funcs branch August 26, 2022 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant