-
Notifications
You must be signed in to change notification settings - Fork 64
RSDK-3292 - fix example python movement sensors #308
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
This comment was marked as resolved.
This comment was marked as resolved.
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.
A couple small suggestions, but otherwise this looks great! thanks for putting it together :)
tests/mocks/components.py
Outdated
return {"command": command} | ||
|
||
|
||
|
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.
(nit) probably we should get rid of this newline
tests/test_robot.py
Outdated
ResourceName(namespace="rdk", type="component", subtype="arm", name="arm1"), | ||
ResourceName(namespace="rdk", type="component", subtype="camera", name="camera1"), | ||
ResourceName(namespace="rdk", type="component", subtype="motor", name="motor1"), | ||
# ResourceName(namespace="rdk", type="component", subtype="sensor", name="movement_sensor1"), |
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.
As a general policy, I think it's best to not have commented code committed. It is often unclear what purpose it serves/used to serve, and there's no validation that the code still works as expected. Probably best to get rid of this entirely.
Re-requested review after updating the tests to account for the dedupe done in generate metadata. Also added dedupe in generateStatus |
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.
Looks great! small nit
tests/test_robot.py
Outdated
client = RobotServiceStub(channel) | ||
response: GetStatusResponse = await client.GetStatus(GetStatusRequest()) | ||
assert list(response.status) == STATUSES | ||
assert list(response.status) == (STATUSES) |
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.
nit: extra parenthesis?
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.
LGTM!
Follow-up work to be done: https://viam.atlassian.net/browse/RSDK-3403