-
Notifications
You must be signed in to change notification settings - Fork 18
Unified backends with bleak #25
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR unifies the BLE backends by consolidating all platform-specific logic into a single TapSDK implementation using Bleak, centralizes UUID constants, and updates packaging and CI configurations.
- Moved UUID constants from model files into
tapsdk/tap.pyand removed the oldmodels/uuids.py. - Refactored
TapClientandTapSDKto use a Bleak-based scan fallback, simplified event registration methods, and unified the POSIX implementations. - Updated
setup.py(bumped minimum Python version, addedextras_require), added a GitHub Actions CI workflow, and cleaned up examples and documentation.
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tapsdk/tap.py | Consolidated UUIDs, unifies backends under Bleak, new scan fallback |
| tapsdk/parsers.py | Fixed parser functions, cleaned up docstrings |
| tapsdk/models/uuids.py | Removed legacy UUID definitions |
| tapsdk/init.py | Simplified exports to core SDK classes |
| setup.py | Bumped python_requires, added extras_require |
| .github/workflows/test.yml | Introduced CI matrix for cross‐platform testing |
| examples/basic.py | Updated example to use synchronous registration methods |
| Readme.md | Fixed typos and added testing instructions |
Comments suppressed due to low confidence (3)
tapsdk/parsers.py:2
- The
tapcode_to_fingersfunction uses the constant1instead of thetapcodeparameter. It should be'{0:05b}'.format(tapcode)[::-1]to correctly convert the input code.
return '{0:05b}'.format(1)[::-1]
tapsdk/tap.py:11
- [nitpick] The
input_type_commandimport is never used in this file; consider removing it to avoid unused dependencies.
from .inputmodes import TapInputMode, input_type_command
tapsdk/tap.py:250
- [nitpick] The new BleakScanner fallback path isn’t covered by any tests; consider adding tests for scanning and device detection logic.
async with BleakScanner(detection_callback=detection_cb) as _:
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
this pr solves #19