Skip to content

Validate rose meta#105

Merged
Jenny Hickson (jennyhickson) merged 16 commits into
MetOffice:mainfrom
james-bruten-mo:validate_rose_meta
Aug 29, 2025
Merged

Validate rose meta#105
Jenny Hickson (jennyhickson) merged 16 commits into
MetOffice:mainfrom
james-bruten-mo:validate_rose_meta

Conversation

@james-bruten-mo

@james-bruten-mo James Bruten (james-bruten-mo) commented Aug 19, 2025

Copy link
Copy Markdown
Collaborator

Description

Summary

Refactor validate_rose_meta.py and move it to SimSys_Scripts. The script will now automatically find metadata sections and apps to validate (ignoring a list of exceptions) rather than only testing based on a hardcoded list. This was done previously and meant that new metadata sections were regularly not tested.

Coordinated merge

This ticket needs to be committed before:
LFRic Apps #954
LFRic Core #4666

Checklist

  • I have performed a self-review of my own changes

Comment thread lfric_macros/validate_rose_meta.py Outdated
Comment thread lfric_macros/validate_rose_meta.py
Comment thread lfric_macros/validate_rose_meta.py
Comment thread lfric_macros/validate_rose_meta.py
Comment thread lfric_macros/validate_rose_meta.py
Comment thread lfric_macros/validate_rose_meta.py
Comment thread lfric_macros/validate_rose_meta.py

@cameronbateman-mo Cameron Bateman (cameronbateman-mo) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Made some suggestions for the return values, I found returning a variable named failures with boolean confusing so suggestions should just return True or False.

Other than that all looks good.

Co-authored-by: Cameron Bateman <cameron.bateman@metoffice.gov.uk>
@james-bruten-mo

Copy link
Copy Markdown
Collaborator Author

Thanks Cameron, I've committed the bottom suggestion which is a good shout. I've not done the other ones. The reason for storing the state in the variable is it lets us run the test for all apps before raising an error, so we find all the issues immediately rather than fixing one and running again

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All looks good 👍👌

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.

Generally good - a few odds and sods :)

Comment thread lfric_macros/validate_rose_meta.py
Comment thread lfric_macros/validate_rose_meta.py
Comment thread lfric_macros/validate_rose_meta.py Outdated
Comment thread lfric_macros/validate_rose_meta.py

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks Jenny, changes made

Comment thread lfric_macros/validate_rose_meta.py
Comment thread lfric_macros/validate_rose_meta.py Outdated
Comment thread lfric_macros/validate_rose_meta.py
Comment thread lfric_macros/validate_rose_meta.py
Comment thread lfric_macros/validate_rose_meta.py Outdated
Comment thread lfric_macros/validate_rose_meta.py Outdated

@yaswant Yaswant Pradhan (yaswant) 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.

Since this is a completely new addition, please consider type hints.

Co-authored-by: Yaswant Pradhan <2984440+yaswant@users.noreply.github.com>
Co-authored-by: Yaswant Pradhan <2984440+yaswant@users.noreply.github.com>
@james-bruten-mo

Copy link
Copy Markdown
Collaborator Author

Given I've adapted this from an existing script that was in the Apps repo (and it's pretty straightforward) I'll leave off adding the type hinting for now.

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.

Thanks for sorting. Looks good to me.

@jennyhickson
Jenny Hickson (jennyhickson) merged commit 1f3e980 into MetOffice:main Aug 29, 2025
5 checks passed
@james-bruten-mo
James Bruten (james-bruten-mo) deleted the validate_rose_meta branch September 14, 2025 12:52
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.

4 participants