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

Ouranosinc / xclim / 11275206436
92%

Build:
DEFAULT BRANCH: main
Ran 10 Oct 2024 01:42PM UTC
Jobs 8
Files 73
Run time 1min
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

10 Oct 2024 01:37PM UTC coverage: 89.48%. First build
11275206436

push

github

web-flow
Block-mapped resample with the help of flox (#1848)

<!--Please ensure the PR fulfills the following requirements! -->
<!-- If this is your first PR, make sure to add your details to the
AUTHORS.rst! -->
### Pull Request Checklist:
- [ ] This PR addresses an already opened issue (for bug fixes /
features)
    - This PR fixes #xyz
- [x] Tests for the changes have been added (for bug fixes / features)
- [x] (If applicable) Documentation has been added / updated (for bug
fixes / features)
- [x] CHANGELOG.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?

Implements `resample_map`. This function is meant for all
`da.resample(...).map(...)` calls. These, `flox` cannot improve
automatically so we use some flox logic to help. The idea is to map the
resample-map construct on each block in parallel. This is possible by
first rechunking the array so that chunks boundary fit with resampling
period boundaries (this is a flox function).

The main improvement should come from the fact that `map_blocks` hides
much of the complexity to `dask`, so the resulting graph is much
lighter. I still have to better test the performance of this. My goal
would be to have some short text in xclim's doc that highlights when the
option is useful and when it is not. The option is activated through
`set_options`.

The current function works only when the input object is of the same
type as the output one. So some functions couldn't be wrapped with this
yet. The most important untouched code for the moment is the missing
checks where I think this could help a lot.

### Does this PR introduce a breaking change?
It should not. This is completely optional.

### Other information:
In progress, I still need to prove the performance boost.

This depends on #1845 because I need all improvements for PC.

65 of 71 new or added lines in 8 files covered. (91.55%)

9288 of 10380 relevant lines covered (89.48%)

7.56 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.11-macos-latest-py311-coverage-extras - 11275206436.1 10 Oct 2024 01:50PM UTC 0
87.21
GitHub Action Run
2 run-3.11-ubuntu-latest-py311-coverage-sbck-offline-prefetch - 11275206436.2 10 Oct 2024 01:50PM UTC 0
83.64
GitHub Action Run
3 run-3.12-ubuntu-latest-standard - 11275206436.3 10 Oct 2024 01:50PM UTC 0
81.77
GitHub Action Run
4 run-3.10-ubuntu-latest-standard - 11275206436.4 10 Oct 2024 01:50PM UTC 0
81.74
GitHub Action Run
5 run-3.11-ubuntu-latest-standard - 11275206436.5 10 Oct 2024 01:50PM UTC 0
83.67
GitHub Action Run
6 11275206436.6 10 Oct 2024 01:50PM UTC 0
81.74
GitHub Action Run
7 run-{{ matrix.python-version }}-conda - 11275206436.7 10 Oct 2024 01:50PM UTC 0
87.36
GitHub Action Run
8 run-3.10-windows-latest-py310-coverage-prefetch - 11275206436.8 10 Oct 2024 01:50PM UTC 0
81.58
GitHub Action Run
Source Files on build 11275206436
Detailed source file information is not available for this build.
  • Back to Repo
  • 438ef2ef on github
  • Prev Build on main (#11263014605)
  • Next Build on main (#11276029424)
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