Skip to content

Remove version information from schema filename, remove obsolete features#142

Merged
mkavulich merged 4 commits into
ESCOMP:mainfrom
mkavulich:feature/update_tools
Apr 9, 2026
Merged

Remove version information from schema filename, remove obsolete features#142
mkavulich merged 4 commits into
ESCOMP:mainfrom
mkavulich:feature/update_tools

Conversation

@mkavulich

Copy link
Copy Markdown
Collaborator

Description

Because versioning is handled with GitHub tags, and we do not support multiple schema versions for a given tag, it is confusing and unnecessary to include the version number in the filename of the schema file. Therefore this PR renames
standard_names_v1_0.xsd --> standard_names.xsd, and removes the python tooling needed to resolve the schema filename based on version.

In the process of making these updates, I noticed there is a bunch of logic for very old, unsupported python versions, and some remaining logic related to kind information that was removed in #124. I removed this unnecessary logic.

Issues

Resolves #141

@gold2718 gold2718 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving although I'm sorry to see the Python2 go, it helps to confuse the bots :)

@climbfuji climbfuji left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do you know why only Metadata-standard-names.yaml got updated, but not Metadata-standard-names.md?

@mkavulich

Copy link
Copy Markdown
Collaborator Author

@climbfuji The parse_section function in tools/write_standard_name_table.py had logic that omitted the kind attribute entirely when it wasn't included in the XML. The parse_section_for_yaml function, on the other hand, included a "kind" line even if that attribute wasn't present.

@climbfuji

Copy link
Copy Markdown
Collaborator

@climbfuji The parse_section function in tools/write_standard_name_table.py had logic that omitted the kind attribute entirely when it wasn't included in the XML. The parse_section_for_yaml function, on the other hand, included a "kind" line even if that attribute wasn't present.

Ahh thanks, that makes sense.

@mkavulich mkavulich force-pushed the feature/update_tools branch from b3972a5 to d060fb6 Compare April 9, 2026 17:51
@mkavulich mkavulich merged commit b13c8ba into ESCOMP:main Apr 9, 2026
4 checks passed
mkavulich added a commit that referenced this pull request Jun 8, 2026
## Description
In the process of trying to add a new tool to check for redundant CF name elements (see #143), I found that our existing tools suffer from a number of issues:

 - Several tools were not updated appropriately to deal with nested sections (#98) so they are not properly checking all the names in the dictionary
   - This meant that there were several redundant standard names that had to be removed
 - A bad merge at some point re-introduced some non-working code from the framework in tools/write_standard_name_table.py; since doctests are not used in this repository, I removed those tests and the un-exercised logic
 - Changes in #142 that standardized the spelling of the schema file left a lot of stub logic that should be removed

This PR resolves those problems. Also, I took the opportunity to clean up the existing tools:
 - Make all python scripts pass pylint with a 10/10 score
   - Removed some old format strings, replacing with f-strings (#118)
 - Standardized the format of comments and multi-line strings
 - Standardized how command-line arguments are named and referenced
 - Removed many unnecessary comments

And finally, I added the check for duplicate cfname elements that was the start of this whole process.

## Issues
Resolves #144, partially resolves #118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove version number from schema filename

3 participants