-
Notifications
You must be signed in to change notification settings - Fork 138
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
update yaml parser to read in arrays and output them #1576
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.
These may all be meaningless as I didn't take the time to understand the existing and new parsing of the basedate.
diag_manager/diag_yaml_format.md
Outdated
@@ -43,14 +43,14 @@ diag_files: | |||
### 2.1 Global Section | |||
The diag_yaml requires “title” and the “baseDate”. | |||
- The **title** is a string that labels the diag yaml. The equivalent in the legacy diag_table would be the experiment. It is recommended that each diag_yaml have a separate title label that is descriptive of the experiment that is using it. | |||
- The **basedate** is an array of 6 integers indicating the base_date in the format [year month day hour minute second]. | |||
- The **basedate** is an array of 6 integers indicating the base_date in the format [year, month, day, hour, minute, second]. |
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.
Do you want to make it clear that it is a comma-separated array
to help contrast from the original space-separated
format?
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.
Yes good idea, added that with c496f38, along with a note that spacing is not significant.
That commit also updates the rest of the test scripts to use the new base date format since they were missed originally.
closing, yaml schema changes were reverted. We're just going to go with the old format for base_date |
Description
Updates the yaml parser to be able to read in arrays as the base date for the new diag yaml format. It just converts any yaml format arrays to a space-separated string at the read in time, so the old format will still work as well.
Also makes updates to be able to output them when writing the output yaml file. Right now it only checks if the second value in a yaml block is an array (since thats where the base date will be) but if preferable I can add the check for every value written.
How Has This Been Tested?
gcc and oneapi on the amd box
Checklist:
make distcheck
passes