Skip to content

Add option for steps in Cube rolling windows - #7236

Open
mo-AndrewCreswick wants to merge 2 commits into
SciTools:mainfrom
mo-AndrewCreswick:cube_rolling_window_step
Open

Add option for steps in Cube rolling windows#7236
mo-AndrewCreswick wants to merge 2 commits into
SciTools:mainfrom
mo-AndrewCreswick:cube_rolling_window_step

Conversation

@mo-AndrewCreswick

@mo-AndrewCreswick mo-AndrewCreswick commented Jul 29, 2026

Copy link
Copy Markdown

Description

This adds a step argument to iris.cube.Cube.rolling_window method to make use of the full functionality available in iris.util.rolling_window. A default argument of step=1 ensures backwards compatibility.

Unit tests added to test the aggregation over rolling windows with a step between windows and also to test that coordinates are handled correctly with a step. The behaviour of the window creation with steps is tested more thoroughly in the unit tests for iris.util.rolling_window.

I'm not sure if benchmarking is required for this PR so have not added the label for now.

Checklist

Important

The Iris core developers are here to help! If anything below is unclear, just post a comment asking for help 😊


Tip

Things you can trigger on this PR:

  • Add this label to trigger benchmarks: benchmark_this Request that this pull request be benchmarked to check if it introduces performance shifts
  • Visit this URL - swapping 9999 for this PR's number - to re-trigger the CLA check:
    https://cla-assistant.io/check/SciTools/iris?pullRequest=9999

@CLAassistant

CLAassistant commented Jul 29, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.42%. Comparing base (3b4089e) to head (c42ccbb).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7236      +/-   ##
==========================================
+ Coverage   90.34%   90.42%   +0.07%     
==========================================
  Files          92       93       +1     
  Lines       25336    25814     +478     
  Branches     4731     4796      +65     
==========================================
+ Hits        22890    23342     +452     
- Misses       1675     1693      +18     
- Partials      771      779       +8     

☔ View full report in Codecov by Harness.
📢 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 trexfeathers linked an issue Aug 12, 2026 that may be closed by this pull request
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

Development

Successfully merging this pull request may close these issues.

Add step argument to Cube.rolling_window

2 participants