• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Ouranosinc / xscen / 7267026400
90%

Build:
DEFAULT BRANCH: main
Ran 19 Dec 2023 08:19PM UTC
Jobs 6
Files 19
Run time 9s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Dec 2023 08:06PM UTC coverage: 63.31% (+0.1%) from 63.188%
7267026400

push

github

web-flow
Climatological op (#290)

### Pull Request Checklist:
- [ ] This PR addresses an already opened issue (for bug fixes /
features)
    - This PR fixes #xyz
- [ ] (If applicable) Documentation has been added / updated (for bug
fixes / features).
- [x] (If applicable) Tests have been added.
- [x] This PR does not seem to break the templates.
- [x] HISTORY.rst has been updated (with summary of main changes).
- [x] Link to issue (:issue:`number`) and pull request (:pull:`number`)
has been added.

### What kind of change does this PR introduce?
xscen.aggregate.climatological_mean is replaced by
xscen.aggregate.climatological_op.

climatological_op permits to apply operations ('op') other than 'mean'
to the input dataset.
operations implemented: ['max', 'mean', 'median', 'min', 'std', 'sum', 'var', 'linregress']

other additions:
- argument 'min_periods' can be passed as a 0 < real value <= 1 to
restrict calculation to a percentage of available values in a period.
- argument 'interval' has been renamed to 'stride'
- flag 'rename_variables' == True will rename variables in output to
{input_var_name}\_clim\_{op} to facilitate combining output from
multiple operations in one ds.
- flag 'horizons_as_dim' == True will restructure the output with horizons
and {freq} != 'year' as new coordinates and dimensions.

Modifies the "2 Getting Started" and "6 Config" notebooks to use climatological_op with
option 'mean'.

### Does this PR introduce a breaking change?
No, climatological_mean is retained and calls climatological_op.
Tests for climatological_mean were replaced for a single test for the future warning.

### Other information:
Uses a wrapper for scipy.stats.linregress for trend calculation with xarray.

76 of 99 new or added lines in 2 files covered. (76.77%)

2483 of 3922 relevant lines covered (63.31%)

3.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-Python3.10-conda - 7267026400.1 19 Dec 2023 08:21PM UTC 0
63.29
2 run-Python3.9-conda - 7267026400.2 19 Dec 2023 08:21PM UTC 0
63.23
3 run-Python3.11-conda - 7267026400.3 19 Dec 2023 08:21PM UTC 0
63.29
4 run-Python3.10 - 7267026400.4 19 Dec 2023 08:21PM UTC 0
63.29
5 run-Python3.9 - 7267026400.5 19 Dec 2023 08:21PM UTC 0
63.23
6 run-Python3.11 - 7267026400.6 19 Dec 2023 08:21PM UTC 0
63.29
Source Files on build 7267026400
Detailed source file information is not available for this build.
  • Back to Repo
  • 9bb7d56c on github
  • Prev Build on main (#7227008551)
  • Next Build on main (#7397993490)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc