ESCOMP / CCPPStandardNames

Repository for community-accepted CCPP Standard Names and search tools
Other
3 stars 16 forks source link

Add check_xml_unique Github Action #33

Closed nusbaume closed 1 year ago

nusbaume commented 1 year ago

The check_xml_unique.py tool can notify a developer when duplicate standard names exist in the dictionary, which is good to avoid since having duplicate standard names introduces an ambiguity which could then cause problems downstream (for example when the CCPP framework tries to generate interface codes).

However, there is no guarantee that a developer will run this tool before pushing changes to the standard names dictionary, which means a duplicate standard name could sneak in on accident. To avoid this problem, a Github Action workflow should be created that runs check_xml_unique.py on the dictionary file (standard_names.xml) whenever a Pull Request is opened or updated in this repo, which then should "fail" whenever a duplicate name is found.

Finally, along with the duplicate name check itself, the check_xml_unique.py should also run validate_xml_file similar to write_standard_name_table.py in order to ensure xmllint is always run on the dictionary file as well (to avoid any basic syntax errors).