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

Ouranosinc / xclim / 10742777452
92%

Build:
DEFAULT BRANCH: main
Ran 06 Sep 2024 05:45PM 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

06 Sep 2024 05:39PM UTC coverage: 89.402% (+0.009%) from 89.393%
10742777452

push

github

web-flow
Heat spells (#1885)

<!--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?

* 3 new indicators `heat_spell_frequency`, `heat_spell_max_length` and
`heat_spell_total_length`. The "heat_wave" indicators test that a
bivariate condition on each day and then find consecutive runs of a
minimum length. The new functions adhere to xclim's concept of "spell" :
the condition is tested against a rolling N-day window and if it is
fulfilled *all days* of the window are considered part of the spell.
* New generic function `spell_mask` that encapsulate the spell notion.
It returns a boolean mask of the days part of spells. The code has been
added two features:
+ Multivariate : input data can be a list (and so must be the
thresholds). The way we check for the conditions across variables is
decided by new argument `var_reducer` ('all' or 'any').
+ Weights : if the spell stat is a mean, weights can be given (used by
the INSPQ, but not for the actual PC indicators).
* Indicator parameters can now be assigned new names. See examples in
how the heat spell indicators are created. We could already do something
similar with data variables. The internals of `Indicator` have changed
accordingly (sorry).


### Does this PR introduce a breaking change?
No.

### Other information:
I kinda decided that "heat" meant "tasmax and tasmin".

88 of 93 new or added lines in 3 files covered. (94.62%)

9136 of 10219 relevant lines covered (89.4%)

7.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.12-ubuntu-latest-standard - 10742777452.1 06 Sep 2024 05:53PM UTC 0
81.56
GitHub Action Run
2 run-3.10-macos-latest-py310-coverage-extras - 10742777452.2 06 Sep 2024 05:53PM UTC 0
87.09
GitHub Action Run
3 10742777452.3 06 Sep 2024 05:53PM UTC 0
81.65
GitHub Action Run
4 run-3.10-ubuntu-latest-standard - 10742777452.4 06 Sep 2024 05:53PM UTC 0
81.56
GitHub Action Run
5 run-{{ matrix.python-version }}-conda - 10742777452.5 06 Sep 2024 05:53PM UTC 0
87.25
GitHub Action Run
6 run-3.11-ubuntu-latest-standard - 10742777452.6 06 Sep 2024 05:53PM UTC 0
83.49
GitHub Action Run
7 run-3.9-ubuntu-latest-py39-coverage-offline-prefetch - 10742777452.7 06 Sep 2024 05:53PM UTC 0
81.65
GitHub Action Run
8 run-3.9-windows-latest-py39-coverage-prefetch - 10742777452.8 06 Sep 2024 05:53PM UTC 0
81.5
GitHub Action Run
Source Files on build 10742777452
Detailed source file information is not available for this build.
  • Back to Repo
  • 38875350 on github
  • Prev Build on main (#10707481039)
  • Next Build on main (#10774929791)
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