-
-
Notifications
You must be signed in to change notification settings - Fork 149
Add support for Deebot N30 pro Omni (87swps) #663
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
…nd include it in the tests
WalkthroughA new file named Changes
Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
tests/hardware/test_init.py (1)
306-306: Maintain alphabetical order in the device listThe new device ID "87swps" should be inserted in alphabetical order rather than appended at the end of the list.
Apply this diff to maintain alphabetical ordering:
- "zwkcqc", - "87swps", + "87swps", + "zwkcqc",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
deebot_client/hardware/deebot/87swps.py(1 hunks)tests/hardware/test_init.py(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- deebot_client/hardware/deebot/87swps.py
tests/hardware/test_init.py
Outdated
| "z4lvk7", | ||
| "zjavof", | ||
| "zwkcqc", | ||
| "87swps", |
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.
💡 Codebase verification
The model "87swps" needs capability tests added to test_capabilities_event_extraction
The model has comprehensive capabilities defined in its device file, but is missing from the test_capabilities_event_extraction test cases. The capabilities include events for:
- Battery, charging, and cleaning operations
- Map management and navigation
- Advanced settings like fan speed and water control
- Various sensors and maintenance features
Add a new test case in test_capabilities_event_extraction with appropriate event-command mappings similar to existing test cases like "p95mgv", as the device has comparable capabilities.
🔗 Analysis chain
Verify test coverage for the new device model
While the model is added to test_all_models_loaded, there should be corresponding capability tests in test_capabilities_event_extraction for the new "87swps" model (Deebot N30 pro Omni).
Run the following script to check if capabilities are defined for the new model:
Would you like help in generating the capability tests for the new model?
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if capabilities are defined for the new model in zwkcqc.py
# Look for capability definitions in the new device file
rg -A 10 "CAPABILITY_" deebot_client/hardware/deebot/zwkcqc.py
# Check if there are any references to the model ID
rg "87swps" deebot_client/hardware/deebot/
Length of output: 105
Script:
#!/bin/bash
# Let's try a broader search to understand the context better
# First, let's find all files that might contain capability definitions
fd -e py | xargs rg -l "CAPABILITY_"
# Then, let's check where the model ID is actually used
rg -l "87swps"
# Let's also check the test files specifically for capability tests
fd "test_capabilities.*\.py" | xargs cat
# And check the structure of existing capability tests
rg -A 5 "def test_capabilities" tests/
Length of output: 561
Script:
#!/bin/bash
# Let's examine the test_capabilities_event_extraction test to understand its structure
cat tests/hardware/test_init.py
# Also check where device capabilities are defined in the codebase
rg -l "capabilities" deebot_client/hardware/deebot/
# And look for any model-specific capability definitions
rg -A 10 "class DeviceInfo" deebot_client/hardware/
Length of output: 11770
Script:
#!/bin/bash
# Let's check if there's a device file for the 87swps model
fd "87swps.py" deebot_client/hardware/deebot/
# Let's also check which model this new device is similar to
rg -l "87swps" deebot_client/hardware/deebot/
# And examine the test_capabilities_event_extraction test parameters more closely
rg -A 10 '@pytest.mark.parametrize.*test_capabilities_event_extraction' tests/hardware/test_init.py
Length of output: 233
Script:
#!/bin/bash
# Let's examine the content of the 87swps.py file
cat deebot_client/hardware/deebot/87swps.py
# And check for any similar models' capability definitions
rg -A 20 "CAPABILITY_" deebot_client/hardware/deebot/zwkcqc.py
rg -A 20 "CAPABILITY_" deebot_client/hardware/deebot/p95mgv.py
Length of output: 7390
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #663 +/- ##
=======================================
Coverage 86.14% 86.14%
=======================================
Files 94 94
Lines 3487 3487
Branches 307 307
=======================================
Hits 3004 3004
Misses 429 429
Partials 54 54 ☔ View full report in Codecov by Sentry. |
edenhaus
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.
Thanks @RSchipper 👍
Went through the issues again, created PRs for issues mentioning the working classes. This one is for #660.
Summary by CodeRabbit
New Features
zwkcqc.py, which may contain additional features or components.Tests