Skip to content

Conversation

@ESadek-MO
Copy link
Contributor

@ESadek-MO ESadek-MO commented Oct 22, 2025

  • rolling_window
  • intersection

Interpolation and regridding are both quite involved. For completion sake, I would've liked to get interpolation in, but I don't think it's worth the time it would take to get it right. Some of the underlying logic just doesn't work with dataless cubes, and would need chasing around the place.

So for now, I think this is it for single operations. If there's a call in the future for interpolate or regridding (the latter seems particularly unlikely), then we can work towards them then.

@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 88.46154% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.37%. Comparing base (9c06cca) to head (0c48129).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
lib/iris/cube.py 88.46% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6757      +/-   ##
==========================================
+ Coverage   90.29%   90.37%   +0.08%     
==========================================
  Files          91       91              
  Lines       24656    24727      +71     
  Branches     4618     4633      +15     
==========================================
+ Hits        22264    22348      +84     
+ Misses       1620     1608      -12     
+ Partials      772      771       -1     

☔ 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.

@ESadek-MO ESadek-MO marked this pull request as ready for review October 23, 2025 21:30

def test_weights_cube(self):
@pytest.mark.parametrize("dataless", [True, False])
def test_weights_cube(self, dataless):
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as previous comment - this test doesn't assert anything for dataless cubes.

@ESadek-MO ESadek-MO moved this to 👀 In Review in 🦌 Iris 3.14 Oct 28, 2025
@ESadek-MO ESadek-MO self-assigned this Oct 28, 2025
@ESadek-MO ESadek-MO changed the title Added dataless rolling window, _intersect and interpolate Added dataless rolling window, _intersect Oct 28, 2025
@stephenworsley stephenworsley moved this from 👀 In Review to 🚧 Blocked in 🦌 Iris 3.14 Oct 29, 2025
@stephenworsley stephenworsley moved this from 🚧 Blocked to 👀 In Review in 🦌 Iris 3.14 Oct 29, 2025
Copy link
Member

@pp-mo pp-mo left a comment

Choose a reason for hiding this comment

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

Small suggestion, but basically all good!

self.mock_agg.post_process = mock.Mock(side_effect=lambda x, y, z: x)

def test_string_coord(self):
@pytest.mark.parametrize("dataless", [True, False])
Copy link
Member

Choose a reason for hiding this comment

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

There are an awful lot of repetitions of this particular "parametrize" usage.
Some of them (but not all) have also ids=["dataless", "with data"]
As a general point, once you have this more than a couple of times, I would alway just put it in a fixture instead:

@pytest.fixture(params=[True, False], ids=["dataless", "with_data"])
def dataless(request):
    yield request.param

With this, you just get rid of all the parametrize decorators, and the tests don't need any further reference, other than the "dataless" argument which they already have.
This is ensures they are all the same, which is more DRY and easier to understand (probably??) .

Actually, there are a few more often-repeated usages of parametrize in this file, but this is the big one !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status
Status: 👀 In Review

Development

Successfully merging this pull request may close these issues.

3 participants