Skip to content

Conversation

ukmo-ccbunney
Copy link
Contributor

🚀 Pull Request

Closes: #6244

Description


Consult Iris pull request check list


Add any of the below labels to trigger actions on this PR:

  • benchmark_this Request that this pull request be benchmarked to check if it introduces performance shifts

 - Add `checksum` to _DimensionalMetadata xml.
 - New `masked_count` attr added to cube and _DimensionalMetadata xml.
@ukmo-ccbunney ukmo-ccbunney requested a review from bjlittle October 9, 2025 13:07
@bjlittle bjlittle moved this to 🚀 In Progress in 🦌 Iris 3.14 Oct 9, 2025
Copy link
Member

@bjlittle bjlittle left a comment

Choose a reason for hiding this comment

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

@ukmo-ccbunney Lookin' good.

Just some initial comments to consider 👍

@github-project-automation github-project-automation bot moved this from 🚀 In Progress to 👀 In Review in 🦌 Iris 3.14 Oct 9, 2025
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 70.83333% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.24%. Comparing base (fa6d61d) to head (7dda361).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/iris/coords.py 65.90% 11 Missing and 4 partials ⚠️
lib/iris/cube.py 78.57% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6743      +/-   ##
==========================================
- Coverage   90.29%   90.24%   -0.06%     
==========================================
  Files          91       91              
  Lines       24475    24613     +138     
  Branches     4571     4604      +33     
==========================================
+ Hits        22100    22212     +112     
- Misses       1607     1624      +17     
- Partials      768      777       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@trexfeathers
Copy link
Contributor

trexfeathers commented Oct 14, 2025

A real-life case of CML protecting us, if you were interested:

SciTools/iris-grib#708

@ukmo-ccbunney
Copy link
Contributor Author

The CML output for testing (generated from _shared_utils.assert_CML now sets the following new formatting options:

  • numpy_formatting=False : Don't use numpy formatting, rather use the simplified iris.utils.array_summary formatter in this PR.
  • coord_checksum=True : Generate checksum for coord like cube components. This provides a guarantee the coord data is all identical as the array summary will only show by default the first and last 3 elements.

No other formatting options have been enabled by default for the CML generation in the tests (such as mask_count or coord_data_array_stats) as these are not suitable for all existing test output.

Commit 95f3a42 covers all the updated CML files + one change to unit/pandas/test_pandas.py to disable the coord_checksum as some tests have coord data that is stored as an object dtype which doesn't generate a consistent hash.

@ukmo-ccbunney ukmo-ccbunney marked this pull request as ready for review October 16, 2025 15:49
@ukmo-ccbunney
Copy link
Contributor Author

BTW: 2 new CML outputs were added as part of 7791944 to provide test coverage or the new formatting options.

Copy link
Member

@bjlittle bjlittle left a comment

Choose a reason for hiding this comment

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

@ukmo-ccbunney This is an impressively nimble refresh to some thorny historic code 🥇

Just a few minor observations to service, otherwise LGTM 👍

ukmo-ccbunney and others added 9 commits October 17, 2025 13:59
Fix typo

Co-authored-by: Bill Little <bill.little@metoffice.gov.uk>
Fix docstring link

Co-authored-by: Bill Little <bill.little@metoffice.gov.uk>
Co-authored-by: Bill Little <bill.little@metoffice.gov.uk>
Co-authored-by: Bill Little <bill.little@metoffice.gov.uk>
Co-authored-by: Bill Little <bill.little@metoffice.gov.uk>
Co-authored-by: Bill Little <bill.little@metoffice.gov.uk>
@bjlittle bjlittle enabled auto-merge (squash) October 17, 2025 14:28
@bjlittle bjlittle merged commit 37f4547 into SciTools:main Oct 17, 2025
21 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In Review to 🏁 Done in 🦌 Iris 3.14 Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done
Status: 🏁 Done

Development

Successfully merging this pull request may close these issues.

Rationalise CML Testing

3 participants