Skip to content
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

Fix invalid standard names, add standard name checking script and github action #52

Merged
merged 19 commits into from
Dec 4, 2023

Conversation

mkavulich
Copy link
Collaborator

Description

This PR introduces a Github Action to automatically check the validity of Standard Names against the list of criteria specified by the CF conventions: Must only contain lowercase letters, numerals, or underscores, and the first character must be a letter. This is achieved with a new script (tools/check_name_rules.py) that parses the given standard names xml file, and checks each name against these rules, returning an error if any invalid names are found. This action will run on all branches for any new commits to ensure any new names follow these rules.

This new script revealed several existing invalid names; those have been corrected as part of this PR.

Issue addressed

#42

@mkavulich mkavulich added the enhancement New feature or request label Oct 19, 2023
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this @mkavulich! I just had some (hopefully minor) change requests, which I am happy to discuss if need be.

.github/workflows/check_name_rules.yml Outdated Show resolved Hide resolved
.github/workflows/check_name_rules.yml Outdated Show resolved Hide resolved
.github/workflows/check_name_rules.yml Outdated Show resolved Hide resolved
tools/check_name_rules.py Outdated Show resolved Hide resolved
tools/check_name_rules.py Outdated Show resolved Hide resolved
tools/check_name_rules.py Outdated Show resolved Hide resolved
tools/check_name_rules.py Outdated Show resolved Hide resolved
tools/check_name_rules.py Outdated Show resolved Hide resolved
tools/check_name_rules.py Outdated Show resolved Hide resolved
@mkavulich
Copy link
Collaborator Author

@nusbaume Thanks for the great review! I applied most of your suggestions, and also applied the analogous improvements to tools/check_xml_unique.py.

Regarding the CI run rules, I thought it would be useful to always check the names so problems get caught at an early stage, but you're right that does impose a lot on users with forks. I changed the rule to pull-request-only, and since we already have a file for pull-request CI, I combined the new rule into the existing file.

Now, for some reason after all these updates the markdown check CI test is failing. I can't figure out what's going on here, as there's no difference locally between the two files.

Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for resolving my concerns! I added a few more commits to fix the test failure and some syntax errors, so it should be good now (at least in my opinion). Thanks again for taking this on!

Copy link
Collaborator

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, very helpful!

@mkavulich mkavulich merged commit 67783d1 into ESCOMP:main Dec 4, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants