-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support Multiple Sources of Location and Object Metadata #315
Support Multiple Sources of Location and Object Metadata #315
Conversation
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! Left a combination of high- and low-level comments, let me know what you think.
Thanks for reviewing. I will go through the comments in detail and get back to you. In short, I agree with keeping |
I tried to address all the comments and tested the changes with existing test cases and documentation generation. Everything seems fine. Please let me know if I missed anything. If all looks good, I will add new test cases for the |
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! You can go ahead and add tests.
I think things could be further simplified all around if we allow set_metadata()
and add_metadata()
to accept lists of file paths in addition to single paths. See my comments throughout.
Also, remember to update docs as well:
Thanks for reviewing ! I reviewed the existing test cases and updated some of them to test the I have also updated the documentation and tried to address all the comments. Let me know if there's any room for improvement or if I missed anything. |
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.
This looks way cleaner -- awesome!
Besides my comments, I think that World.set_metadata()
should also support the list option, for consistency with add_metadata()
.
I modified |
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.
Cool, just found one more thing and we should be good.
BTW, specifying a single metadata item in a world YAML file (without the -
list syntax) still works, right?
Yes it is working, I just checked once again to be sure. |
One observation regarding |
I think it's fine to remove since the by the way, can you rename to |
I renamed the issue to remove the "Draft: Proof of Concept", as I saw you've taken this out of draft now. Is there anything else remaining on your end (some tests or anything), or is this ready to go? |
Thanks for renaming. From my-side it is ready, I have added one test case that you suggested above:
|
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 -- thanks again @kumar-sanjeeev!
This is a draft PR to showcase proof-of-concept of accepting multiple sources of locations an objects metadata.
add_metadata
method to theWorld
,Location
, andObject
classes, replacing theset_metadata
method.EntityMetadata
class to support multiple sources of location and object metadata.example_location_data.yaml
andexample_object_data.yaml
files into separate files to simulate scenarios with multiple sources of metadata.demo.py
script with various test worlds specified in form of YAML files in data directory,Note: Test cases have not been updated yet to reflect the new changes. Will do if this proof-of-concept is okay.