-
Notifications
You must be signed in to change notification settings - Fork 7
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
MetaData rework #281
MetaData rework #281
Conversation
Some suggestions for error messaging:
I think we should catch them and turn them into something like |
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 very nice new feature and reorganisation of the code!!! Many thanks!
The only thing that needs to be adjusted are the exception strings mentioned above. They might not be understandable by an iRODS rooky.
meta_list = sorted(list(self)) | ||
return "\n".join(f" - {meta}" for meta in meta_list) | ||
|
||
def find_all(self, key = ..., value = ..., units = ...): |
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 very useful function!!!
Co-authored-by: chStaiger <[email protected]>
This PR has quite some feature that are going to make life a lot easier, great work! |
This PR improves the internals of the MetaData class. Instead of relying on the PRC
iRODSMeta
class, a new class is created (MetaDataItem
) which encapsulates one entry of the metadata for a data object or collection.New features:
meta["some_key"]
to quickly get an entry for some key.meta.find_all(key=..., value=..., units=...)
to find metadata entries.meta["some_key"].key = "new_key"
Fixes #277 (Open a new issue in the GUI repository if necessary)