Skip to content

Conversation

@ilouzl
Copy link
Contributor

@ilouzl ilouzl commented May 21, 2025

this pr solves #19

@ilouzl ilouzl requested a review from Copilot May 21, 2025 19:50
Copy link

Copilot AI left a 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.py and removed the old models/uuids.py.
  • Refactored TapClient and TapSDK to use a Bleak-based scan fallback, simplified event registration methods, and unified the POSIX implementations.
  • Updated setup.py (bumped minimum Python version, added extras_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_fingers function uses the constant 1 instead of the tapcode parameter. 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_command import 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 _:

ilouzl and others added 2 commits May 21, 2025 23:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ilouzl ilouzl merged commit c325971 into develop May 21, 2025
9 checks passed
@ilouzl ilouzl deleted the unified-client branch May 21, 2025 20:21
@ilouzl ilouzl mentioned this pull request May 21, 2025
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.

2 participants