-
Notifications
You must be signed in to change notification settings - Fork 14
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
Move metadata CV terms to JSON file for validation and automatic docs generation #67
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.
This all looks good to me, many thanks!
I'm uncertain what to do about the open issues. I think we should discuss in more detail at the next call. Fine to merge and then continue effort from there, or hold it open, whichever.
I'm not sure we need to explicitly encode the value type constraints as validator rules. The validator already has access to the CV and can look up the value types there, without needing to regenerate the rule table should the CV update. However, the CV does not say where a term is expected in the data model, which this does do. What we do want to express as validator rules are things like:
There's a lot to review so I'll go over this again. Something we probably should do is add some guidelines for the user about the four different ways we can express the "target mass" of a spectrum and how we've fragmented the representation between
|
Discussed briefly on June 23. Need more input from @RalfG |
…when building markdown docs instead
Hi @mobiusklein, I updated the code and data to parse the term definitions and types when generating the documentation, so it is not a part of the rules JSON. This PR therefore does not change anything in the validation rules schema anymore and does not imply type constraints for validation anymore. To continue from this:
In this initial effort, I simply converted the Google Doc to a single JSON file, separate from the rules that you had already written. It is just one large list of terms without any additional validation logic (as you described above). Next up, we need to find a way to merge these somehow. I think this would requires us to:
What do you think? Once (1) is done, I can start with (2) and (3). For (3) I will most likely require your input as well. |
This PR moves the metadata terms from the Google Doc to a JSON document according to the validator schema for metadata. This JSON file can be used for validation and for automatic documentation generation for mzSpecLib metadata CV terms.
A current version of the auto-generated documentation can be viewed here: https://github.com/HUPO-PSI/mzSpecLib/blob/891fbdb4463ea023e1b51830ddded87509e33f23/docs/metadata-rules.md
I first moved all data from the Google Doc to an Excel sheet for easy parsing. The original Excel sheet and script for parsing to JSON is still in a tmp directory. It can be removed once this PR is ready to be merged.
The rules schema has been updated to include
definition
andunits
fields.To do's and open questions: