Add XML schema validation workflow#416
Open
virtuousluna wants to merge 8 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tag name: xml-validation
Originator(s): Rosio Rodriguez
Description (include issue title and the keyword ['closes', 'fixes', 'resolves'] and issue number): Resolves #59.
This PR adds a GitHub Actions workflow for XML schema validation in atmospheric_physics. The workflow uses xmllint to validate hand-written XML files in the repository.
The workflow validates two categories of XML files:
Suite definition files in suites/ and test/test_suites/, using the CCPP suite schema from the ccpp-framework repository.
Scheme namelist XML files under schemes/, using the CIME ParamGen entry_id_pg schema.
This adds automated CI coverage so XML schema issues can be caught during pull requests instead of being discovered later during model configuration or build workflows.
List all namelist files that were added or changed:
None. This PR does not add or modify any namelist XML files. It only adds validation coverage for existing scheme namelist XML files.
List all files eliminated and why: None.
List all files added and what they do: .github/workflows/xml_validation.yaml
Adds a GitHub Actions workflow named XML schema validation. The workflow installs xmllint, checks out the needed schema sources from ccpp-framework and CIME, validates suite definition XML files, and validates all scheme namelist XML files matching *_namelist.xml under the schemes/ directory.
List all existing files that have been modified, and describe the changes:
(Helpful git command: git diff --name-status main...<your_branch_name>)
None. This PR adds a new workflow file and does not modify existing source, namelist, or physics files.
List all automated tests that failed, as well as an explanation for why they weren't fixed: None in the final PR state.
During development, I caused the XML schema validation workflow to fail by temporarily changing the root tag in one scheme namelist XML file. This was done to confirm that the workflow correctly catches invalid XML. The file was restored, and the workflow passed successfully afterward.
Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc?
No. This is not an answer-changing PR. It only adds CI validation infrastructure for XML files.
If yes to the above question, describe how this code was validated with the new/modified features:
Not applicable because this is not an answer-changing PR.
The workflow was validated by running it in a fork and confirming the expected behavior: