Add additional unit tests#226
Merged
Sam Clarke-Green (t00sa) merged 30 commits intoMetOffice:mainfrom Apr 30, 2026
Merged
Conversation
…iple lines, plus accidentally running ruff.
… changing it so that lines which previously passed now fail, they're going to get a jolly hard stare....
James Bruten (james-bruten-mo)
approved these changes
Apr 28, 2026
Collaborator
James Bruten (james-bruten-mo)
left a comment
There was a problem hiding this comment.
There's a non-required suggestion to consider, but otherwise it seems fine
20 tasks
This was referenced Apr 29, 2026
20 tasks
Sam Clarke-Green (t00sa)
requested changes
Apr 30, 2026
Collaborator
Sam Clarke-Green (t00sa)
left a comment
There was a problem hiding this comment.
Mostly typos in comments
Mostly typos and tidying. All changes suggested by reviewers and very sensible they were too. Co-authored-by: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Co-authored-by: Sam Clarke-Green <74185251+t00sa@users.noreply.github.com>
Contributor
Author
R Sharp (r-sharp)
left a comment
There was a problem hiding this comment.
Applied all suggestions
Sam Clarke-Green (t00sa)
approved these changes
Apr 30, 2026
Collaborator
Sam Clarke-Green (t00sa)
left a comment
There was a problem hiding this comment.
Looks good and pytest passes. Approved!
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.
PR Summary
Sci/Tech Reviewer: James Bruten (@james-bruten-mo)
Code Reviewer: Sam Clarke-Green (@t00sa)
Introduce the "example fortran code" from the UMDP3 document for use in the unit testsing of the style checker rules. The checks should 'pass' this code, but there is the option to midify it on the fly so tests can find failures in something that looks a bit more like a Fortran file than 4 text strings in a list. It will alos hopefully allow the easier creation of more complex unit tests in a way that looks familiar to the 'human' in the chain - as hopefuly evidenced by the unit tests for "r3_4_2_no_full_uppercase_variable_names" which now performs line concattenation on declaration statements to better test all the variable names.
Whilst modifying the conformance checks to make clearer what they relate back to in the docs, I'm moving them to a new file (possibly multiple files) and updating the unit tests to make use of the example fortran code file.
The aim being that the old file of checks, with it's Class and the dispatch tables files will be emptied out as things move over and evnetually removed entirely.
Code Quality Checklist
Testing
All the unit tests introduced pass
Security Considerations
AI Assistance and Attribution
Met Office Github Copilot Enterprise was used for line completion when writing and suggested alterations when propgating a change through the code.
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review