PCMDI / input4MIPs_CVs

Controlled Vocabularies (CVs) for use in input4MIPs
https://input4mips-controlled-vocabularies-cvs.readthedocs.io/en/stable/
Creative Commons Attribution 4.0 International
5 stars 1 forks source link

Add validation scripts #131

Closed znichollscr closed 1 month ago

znichollscr commented 1 month ago

Description

Checklist

Please confirm that this pull request has done the following:

znichollscr commented 1 month ago

@durack1 FYI this is how I do the validation

github-actions[bot] commented 1 month ago

No changes to the database between 'main' branch and 027e6688b700ea42e4a4960a2b5d3a6c9f7fd3c7

github-actions[bot] commented 1 month ago

No changes to the database between 'main' branch and 872e28a02eea1b3cae208c66717edb3bd3717278

durack1 commented 1 month ago

Pretty classic, this is a dupe of the functionality in scripts/createDRS.py, plus the validation step before the copy.

Does the validation check for hyphens in variables, filename <variable_id> and in-file matching, plus the creation_date and tracking_id validation? If not, we could lift the functions out of the above here - it'd be great to add those checks to the automation

znichollscr commented 1 month ago

I've got creation date (here) and tracking ID (here), I think based on what you've got already.

I've got the check against the file's metadata attribute (here.

I don't have the check for hyphens or underscores in variables yet. I've made https://github.com/climate-resource/input4mips_validation/issues/73 to remind myself to add this in future