Skip to content

[RSDK-10139] Implement User-defined Metadata Methods #882

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

Merged
merged 13 commits into from
May 2, 2025

Conversation

bashar-515
Copy link
Member

@bashar-515 bashar-515 commented Mar 24, 2025

ticket

This PR implements the get and update methods for user-defined metadata on all four resource types (organizations, locations, robots, and robot parts). Also included in this PR are the implementation of these endpoints in the Python MockApp server and the addition of unit tests for new SDK methods added. The unit tests all first attempt to get metadata on a resource, assert that the returned dictionary is empty (as is the expected behavior here), and then proceed to update actual metadata that gets retrieved and asserted again. The mock endpoints pretty much exactly mimic the behavior of these endpoints in our actual App server.

@bashar-515
Copy link
Member Author

@JosephBorodach @edobranov I tagged both of you guys just because I know you both worked on the other SDK's. Feel free to remove yourself.

@bashar-515 bashar-515 marked this pull request as ready for review March 24, 2025 22:31
@bashar-515 bashar-515 requested a review from a team as a code owner March 24, 2025 22:31
@bashar-515 bashar-515 requested review from njooma and stuqdog March 24, 2025 22:31
@bashar-515 bashar-515 marked this pull request as draft March 25, 2025 17:00
@edobranov
Copy link
Member

Going to remove myself for now so I stop getting notifications, but feel free to re-add me when it's ready for review again

@edobranov edobranov removed their request for review April 21, 2025 14:35
@bashar-515 bashar-515 requested a review from edobranov May 1, 2025 21:14
@bashar-515 bashar-515 marked this pull request as ready for review May 1, 2025 21:15
Copy link
Member

@njooma njooma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a comment but you don't have to change it!

metadata (Mapping[str, Any]): The user-defined metadata to upload as a Python dictionary.
"""
request = UpdateOrganizationMetadataRequest(organization_id=org_id, data=dict_to_struct(metadata))
_: UpdateOrganizationMetadataResponse = await self._app_client.UpdateOrganizationMetadata(request)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can leave out all these return type since they're unused

Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, lgtm!

@bashar-515 bashar-515 merged commit f73a2ef into viamrobotics:main May 2, 2025
13 checks passed
@bashar-515 bashar-515 deleted the RSDK-10139 branch May 2, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants