Skip to content
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

Missing Parser Warning for Undefined Keys #36

Open
christian-rli opened this issue Aug 18, 2020 · 2 comments
Open

Missing Parser Warning for Undefined Keys #36

christian-rli opened this issue Aug 18, 2020 · 2 comments
Assignees

Comments

@christian-rli
Copy link
Collaborator

When parsing a metadata string, omi seems to just look for a few mandatory keys and accepts what comes with it. Keys that aren't defined in the metadata standard don't trigger a warning and are simply ignored. A warning would be quite helpful, for example in case a key was misspelled.

@SharanyaMohan-30
Copy link
Contributor

@christian-rli
Currently, I am working on this ticket need few details from your end.
As per the mentioned description related to warning, should we need to raise the exception for undefined keys and stop parsing or Should I log the warning and continue parsing?

@christian-rli
Copy link
Collaborator Author

Hi @SharanyaMohan-30 thank you for taking up the issue! I think omi should only fail to parse when it really needs to. So if there are undefined keys I think there should be a warning, but parsing can continue. In this case you can also print out the keys that are missing, because they are expected from the standard, so a potential typo would become obvious to the user.
Always printing out missing keys would be an option, but users would probably ignore output soon after implementing this, because basically all keys are optional. Maybe add a verbose option, but I'm making this issue bigger than it is. For now, just keep on parsing :)

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

No branches or pull requests

3 participants