-
Notifications
You must be signed in to change notification settings - Fork 161
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
[SCHEMA] Add metadata term files #774
Conversation
* Draft a handful of metadata term files. * Add example with specific possible values. * Match the validator schemas better. * Fix formatting. * Fix formatting again! * Draft semi-functional rendering functions. * Use unit abbreviations. * Add more fields. * Get macro working. * Add terms from first table. * Add AnatomicalLandmarkCoordinateSystem. * fMRI task information table. * More terms. * More terms. * More terms. * EchoTime and FlipAngle * Add tables. * More tables. * More terms. * More terms. * More terms. * Fix spacing. * Clean things up. * More terms. * More terms! * More terms. * Some iEEG terms. * More iEEG terms. * Add ASL labeling terms. * Next batch. * More terms. * More terms. * More terms. * Fix mistakes. * Last terms. * Reference yamls. * Fix mistakes. * Change format of coordinate system files. * Use degree in associated files. * Some of the missing terms. * A few more terms. * Fix typos. * More terms. * More terms. * More terms. * More terms. * More terms. * More terms. * Last terms. * Fix link. * Fix internal links. * Fix links for real. * Derivative terms. * Fix up code link. * Use backslashes for continued strings. * Replace $ref with file contents. Also support plural datatype strings and all manner of newlines in descriptions. * Fix genetics. * Describe the structure of metadata YAML files. * Make metadatatype function recursive. * Improve search function. * Start adding PET fields. * Add some fields. * More terms. * More terms. * More terms. * Fix mistakes. * More terms. * Replace InstitutionDepartmentName with existing InstitutionalDepartmentName. * More terms. * More terms. * More terms. * More terms. * More terms. * More terms. * More terms. * Last terms. * Add unit format for strings. Unused for now but could be useful later. * Add dataset_relative and participant_relative string formats. * Update READMEs. * Fix formats in README. * Support table-specific metadata description extensions. * Employ description extensions with IntendedFor. * Remove explicit defaults from YAML files. * Replace Minimum with minimum. * Replace inclusiveMaximum with maximum. * Replace implicit links with explicit ones. * Rename key_name to name. * Rename "Unit" to "Units"
Now that these changes are on a branch of the main repository, it should be easier for other folks to contribute directly. The main thing that I could use help with is generalizing the base metadata definitions when necessary and appending section-specific information to those base definitions in the macro calls. |
Should address the "string or string or string or string" issue.
It's easier to identify as a special case.
The type is complicated, but I _think_ I've got it figured out.
Okay, I think this is finally ready! @bids-standard/maintainers if any of you have the time, I'd appreciate your review. |
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.
Started by reviewing the code. Have not yet looked through the schema files or checked all of the rendered tables.
One thing I worry about, after moving to this, is that minor bugs in the code may result in visible changes to a table without being obviously part of the review process. Do we have a strategy to note when a change to the schema code produces a change in the generated markdown?
Thanks @effigies! Co-authored-by: Chris Markiewicz <[email protected]>
Quick note: I ran across |
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.
finished my run through the remaining MRI sections
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.
I now finished going through all changes and provided that my remaining comments are addressed, I think we can merge this 👍
This is a great piece of work @tsalo, thanks a lot.
Co-authored-by: Stefan Appelhoff <[email protected]>
Co-authored-by: Stefan Appelhoff <[email protected]>
@Remi-Gau @effigies In yesterday's maintainers call, we decided that it would be unrealistic to request a full review from anyone else, so instead of reviewing all of the content we were wondering if you'd be willing to do more of a conceptual review or a code review. We should have plenty of time before the next release for folks to identify any issues with the content, so any small content issues can be resolved after this is merged. WDYT? |
Is there any reason that all the metadata files are separate instead of consolidated into one file (or even just a few)? |
The biggest reason is that I find individual files easier to work with than one big file. While the idea of a few files is appealing, I don't think it would work well for metadata. The obvious delineation is based on data type, but unfortunately many metadata terms can be used for multiple data types. |
Good with me though I will only be back "on duty" later this month (26th) so don't let my silence hold you back on the merge anyway (plus most of my comments will be on formatting and missing comas most likely). |
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.
@tsalo could you please update this PR with respect to
- [FIX] Deprecate ScanDate (PET) in favor of AcquisitionTime in scans.tsv files #798
- [ENH] add metadata to PET calibration factor: "DoseCalibrationFactor" #825
Then I'd be fine with removing the hard-coded tables and merging, as Chris and Remi are currently unavailable and we didn't plan on having a "deep" review anyhow (that's already happened).
Awesome! I incorporated the changes for the two PRs, and looked at the rendered docs. The docs look good, so I'm going to remove the hardcoded tables now. |
Okay the tables have been removed and the CI is passing.... should I merge? Is it time?! |
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.
Did a code review. Only one suggestion, really. I haven't tested, so you may want to test before merging. Or reject if it seems less clear.
Co-authored-by: Chris Markiewicz <[email protected]>
The rendered docs look good with the new changes, so I'm merging! |
Seems to work. If you're happy to merge, fire away! |
😎 nice work! Very happy to see this in |
References #699. Continues from #762.
Changes proposed:
To do:
MEGCoordinateSystem
, which renders asstring or string or string or string
).Reviewing
I think the best approach to reviewing this PR is to (1) review the proposed metadata schema structure defined in the schema README and a handful or randomly chosen example terms, and (2) compare the rendered metadata tables against the hardcoded ones in the generated specification. These tasks can be split across multiple reviewers.