-
Notifications
You must be signed in to change notification settings - Fork 0
Update version to v0.1.12 and refactor attributes #13
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
Robot Size Configurable
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 updates the version to v0.1.12 and refactors the CameraShared class to limit access for internal library use only, with image data now exported via dictionary.
- Updated version from v0.1.10 to v0.1.12
- Removed inline comments to clean up code structure
- Refactored CameraSharedManager to use singleton pattern instead of dictionary-based instances
- Added to_dict() method to CameraShared for exporting image data
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Added docstrings for methods in shared.py to improve code documentation and clarity.
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
Copilot reviewed 1 out of 1 changed files in this pull request and generated 6 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| def to_dict(self) -> dict: | ||
| """Return a dictionary with image and attributes data.""" | ||
| return { | ||
| "image": { | ||
| "binary": self.binary_image, | ||
| "pil_last_image": self.last_image, | ||
| "size": self.image_size, | ||
| "format": self.image_format, | ||
| "updated": self.image_last_updated, | ||
| }, | ||
| "attributes": self.generate_attributes(), | ||
| } |
Copilot
AI
Sep 30, 2025
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.
The new to_dict() method lacks comprehensive documentation. The docstring should explain the structure of the returned dictionary, what each key contains, and the purpose of this method for internal library use.
|
|
||
| def update_user_colors(self, user_colors): | ||
| """Update the user colors.""" | ||
| """Update user colors palette""" |
Copilot
AI
Sep 30, 2025
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.
The updated docstring is incomplete and grammatically incorrect. It should be 'Update the user colors palette' or 'Update user color palette' to maintain consistency with other docstrings in the class.
| """Update user colors palette""" | |
| """Update the user colors palette.""" |
|
|
||
| def get_user_colors(self): | ||
| """Get the user colors.""" | ||
| """Return user colors""" |
Copilot
AI
Sep 30, 2025
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.
The docstring should be more descriptive. Consider changing it to 'Return the user colors palette' to be consistent with the update method and provide clearer context.
| """Return user colors""" | |
| """Return the user colors palette""" |
|
|
||
| def get_rooms_colors(self): | ||
| """Get the rooms colors.""" | ||
| """Return rooms colors""" |
Copilot
AI
Sep 30, 2025
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.
The docstring should be more descriptive and grammatically correct. Consider changing it to 'Return the rooms colors palette' to maintain consistency with other color-related methods.
| """Return rooms colors""" | |
| """Return the rooms colors palette""" |
|
|
||
| async def batch_update(self, **kwargs): | ||
| """Batch update multiple attributes.""" | ||
| """Update the data of Shared in Batch""" |
Copilot
AI
Sep 30, 2025
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.
The docstring has awkward capitalization and phrasing. It should be 'Update shared data in batch' or 'Batch update multiple attributes' (as it was originally) for better clarity and consistency.
| """Update the data of Shared in Batch""" | |
| """Batch update multiple attributes.""" |
We need to limit the access of this class to internal library use only, image data exported by dictionary