cleanup: Remove deprecated ble/ directory and streamline test suite#37
Open
stuart-c-ai wants to merge 6 commits into
Open
cleanup: Remove deprecated ble/ directory and streamline test suite#37stuart-c-ai wants to merge 6 commits into
stuart-c-ai wants to merge 6 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PR Dependency
Important
This Pull Request represents Stage 4 (the final stage) of our sequential migration to the new
py-opendisplayBLE library. It depends on and includes the changes from Stage 3.Please ensure that PR #36: refactor: Port image upload pipelines to py-opendisplay client is merged before this PR is reviewed or merged.
Description & Goal
This PR completes the
py-opendisplayBLE migration by performing final tidy-up and code cleanup. It completely removes the entire deprecatedcustom_components/opendisplay/ble/folder containing the old BLE protocol engine, custom connection managers, exceptions, image processors, and parsers, which have been fully superseded bypy-opendisplay. Additionally, this PR streamlines our unit test suite to verify the newBLEDeviceMetadataimplementation standalone.With this PR merged, the migration is complete, leaving the integration extremely clean, robust, and aligned with standard library APIs.
What was Done & Why
1. Pruning 3,721 Lines of Deprecated BLE Stack Code
custom_components/opendisplay/ble/ble/directory and all 13 Python files inside it, including:__init__.py,color_scheme.py,connection.py,exceptions.py,image_processing.py,image_upload.py,metadata.py,operations.py,protocol_atc.py,protocol_base.py,protocol_factory.py,protocol_open_display.py, andtlv_parser.py.py-opendisplaylibrary, this legacy custom engine is completely obsolete. Removing it reduces integration codebase bloat.2. Streamlining the Unit Test Suite
tests/test_ble_metadata.pyOldBLEDeviceMetadata. Removed localsys.pathadjustments that pointed to the deletedble/directory.BLEDeviceMetadataimplementation standalone and prevent import errors due to the deletion of the legacyble/folder.3. Standalone Test Verification
PYTHONPATH=. ./venv/bin/pytest tests/test_ble_metadata.pyAll tests passed without any errors or warnings.