-
Notifications
You must be signed in to change notification settings - Fork 56
feat(api)!: Remove original Cloud and Local APIs #713
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
feat(api)!: Remove original Cloud and Local APIs #713
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 removes the legacy Cloud and Local APIs (version_1_apis and version_a01_apis modules) as part of a breaking change, transitioning to the new device manager API that uses a single shared MQTT session across all devices.
Key Changes:
- Removes version_1_apis module including RoborockClientV1, RoborockMqttClientV1, and RoborockLocalClientV1
- Removes version_a01_apis module including RoborockClientA01 and RoborockMqttClientA01
- Removes supporting infrastructure: cloud_api.py, api.py, roborock_future.py, and command_cache.py
- Removes utility functions from util.py (RepeatableTask, parse_time_to_datetime, parse_datetime_to_roborock_datetime)
- Deletes associated test files and snapshot files
- Updates fixtures and module imports
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_util.py | Removed tests for parse_time_to_datetime utility function |
| tests/test_queue.py | Removed tests for RoborockFuture class |
| tests/test_local_api_v1.py | Removed tests for local API v1 client |
| tests/test_api.py | Removed tests for MQTT API v1 client |
| tests/test_a01_api.py | Removed tests for A01 API client |
| tests/snapshots/test_local_api_v1.ambr | Removed snapshot for local API v1 tests |
| tests/snapshots/test_api.ambr | Removed snapshot for API tests |
| tests/snapshots/test_a01_api.ambr | Removed snapshot for A01 API tests |
| roborock/version_a01_apis/roborock_mqtt_client_a01.py | Removed A01 MQTT client implementation |
| roborock/version_a01_apis/roborock_client_a01.py | Removed A01 client base class |
| roborock/version_a01_apis/init.py | Removed A01 APIs module exports |
| roborock/version_1_apis/roborock_mqtt_client_v1.py | Removed v1 MQTT client implementation |
| roborock/version_1_apis/roborock_local_client_v1.py | Removed v1 local client implementation |
| roborock/version_1_apis/roborock_client_v1.py | Removed v1 client base class and caching infrastructure |
| roborock/version_1_apis/init.py | Removed v1 APIs module exports |
| roborock/util.py | Removed utility functions used by legacy APIs |
| roborock/roborock_future.py | Removed RoborockFuture class for async request handling |
| roborock/command_cache.py | Removed command caching infrastructure |
| roborock/cloud_api.py | Removed MQTT cloud API base class |
| roborock/api.py | Removed RoborockClient base class |
| roborock/init.py | Updated to remove imports for deleted modules |
| tests/fixtures/logging_fixtures.py | Removed patches for deleted modules |
Comments suppressed due to low confidence (1)
roborock/version_1_apis/init.py:1
- The removal of version_1_apis module will break roborock/cli.py which imports and uses RoborockMqttClientV1. Line 56 of cli.py imports "from roborock.version_1_apis.roborock_mqtt_client_v1 import RoborockMqttClientV1" and line 835 uses it to create a client. This file needs to be updated to use the new device manager API or removed/updated as part of this breaking change.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Remove the old Cloud / Local APIs, and associated tests and shapshots. These APIs have been replaced by the device manager API that creates a single single MQTT session shared across all devices. See example/ for how to use the new API. BREAKING CHANGE: Removes older cloud and local APIs.
8c1c778 to
a27f7c8
Compare
Lash-L
left a comment
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.
Awesome! This should be merged in last likely in case it causes any conflicts.
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.
Note that currently the CLI still depends on this subpackage
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.
Thanks, good catch. I'll remove from there also.
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.
Remove the old Cloud / Local APIs, and associated tests and shapshots.
These APIs have been replaced by the device manager API that createsa single single MQTT session shared across all devices.
See example/ for how to use the new API.
BREAKING CHANGE: Removes older cloud and local APIs.