Skip to content

Fix xml custom coordinates cleaning command#982

Merged
edenhaus merged 1 commit into
devfrom
refactor-clean-space-commands
May 20, 2025
Merged

Fix xml custom coordinates cleaning command#982
edenhaus merged 1 commit into
devfrom
refactor-clean-space-commands

Conversation

@edenhaus

Copy link
Copy Markdown
Member

Copilot AI review requested due to automatic review settings May 19, 2025 22:06
@edenhaus edenhaus added the pr: bugfix PR, which fixes a bug label May 19, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fixes an issue with XML custom coordinates cleaning commands by enhancing command handling and updating tests.

  • Introduces support for custom area coordinates in cleaning commands.
  • Adds new test cases for both XML and JSON commands and refactors the CleanArea class to support additional arguments.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/commands/xml/test_clean.py Added a test case for CleanArea with custom coordinates using CleanMode.CUSTOM_AREA.
tests/commands/json/test_clean.py Extended test cases to cover both legacy and new custom area coordinate commands.
deebot_client/commands/xml/clean.py Refactored CleanArea to inherit from Clean; updated parameter naming and key mapping.
Comments suppressed due to low confidence (2)

deebot_client/commands/xml/clean.py:52

  • [nitpick] The parameter name 'area_or_coordinates' is ambiguous. Consider renaming it to a more descriptive name, such as 'value' or splitting it into two distinct parameters for area and coordinates if they represent different data.
area_or_coordinates: str,

deebot_client/commands/xml/clean.py:55

  • The use of 'p' as a key for custom area coordinates is unclear. Consider using a more descriptive key name like 'coordinates' for better code clarity.
key = "area" if mode == CleanMode.SPOT_AREA else "p"

@codecov

codecov Bot commented May 19, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.64%. Comparing base (657ea41) to head (4d7606c).
Report is 1 commits behind head on dev.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #982   +/-   ##
=======================================
  Coverage   93.63%   93.64%           
=======================================
  Files         129      129           
  Lines        4999     5000    +1     
  Branches      325      326    +1     
=======================================
+ Hits         4681     4682    +1     
  Misses        258      258           
  Partials       60       60           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented May 19, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #982 will not alter performance

Comparing refactor-clean-space-commands (4d7606c) with dev (657ea41)

Summary

✅ 6 untouched benchmarks

@edenhaus edenhaus merged commit 74582e8 into dev May 20, 2025
27 checks passed
@edenhaus edenhaus deleted the refactor-clean-space-commands branch May 20, 2025 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: bugfix PR, which fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deebot 900 does not understand the command "custom_area".

2 participants