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

Ouranosinc / xclim / 11276029424
92%

Build:
DEFAULT BRANCH: main
Ran 10 Oct 2024 02:27PM 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 02:22PM UTC coverage: 89.443% (-0.04%) from 89.48%
11276029424

push

github

web-flow
Thresholded events - Quantified rate2amount (#1778)

<!--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] CHANGES.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?

* New `thresholded_events` generic compute and `find_events` in
`run_length`. The idea is to find all runs defined by a start and a stop
condition and return them along an "event" dimension.
* It relies on a new function in `run_length` that can compute the
run_length of sequence determined by two conditions. A first condition
determines when runs should start, and a second one determines when they
stop. This is called `runs_with_holes` as one possibility with the
addtition of the second condition is this: consider a normal run_length,
but the second condition allows for holes in thoses sequences, where
those holes cannot exceed a given threshold `window_stop`.
`runs_with_holes` is in fact more general, so perhaps another name
should be found.
* `rate2amount` and `amount2rate` can now accept Quantified (str and
Quantities), which then requires passing the time coordinate in as the
`dim` argument.


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

### Other information:
For the time being, I removed the references to "freezing rain" as I'm
not sure I will need the function in xclim. If I do, then, I'll add it
back.

73 of 84 new or added lines in 4 files covered. (86.9%)

9345 of 10448 relevant lines covered (89.44%)

7.56 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
90.59
0.79% xclim/indices/run_length.py
4
91.38
-0.86% xclim/indices/generic.py
6
86.08
-0.99% xclim/core/units.py
Jobs
ID Job ID Ran Files Coverage
1 run-3.12-ubuntu-latest-standard - 11276029424.1 10 Oct 2024 02:36PM UTC 73
81.79
GitHub Action Run
2 run-3.11-macos-latest-py311-coverage-extras - 11276029424.2 10 Oct 2024 02:36PM UTC 73
87.18
GitHub Action Run
3 run-{{ matrix.python-version }}-conda - 11276029424.3 10 Oct 2024 02:36PM UTC 73
87.34
GitHub Action Run
4 run-3.10-ubuntu-latest-standard - 11276029424.4 10 Oct 2024 02:36PM UTC 73
81.76
GitHub Action Run
5 11276029424.5 10 Oct 2024 02:36PM UTC 73
81.76
GitHub Action Run
6 run-3.11-ubuntu-latest-py311-coverage-sbck-offline-prefetch - 11276029424.6 10 Oct 2024 02:36PM UTC 73
83.64
GitHub Action Run
7 run-3.10-windows-latest-py310-coverage-prefetch - 11276029424.7 10 Oct 2024 02:36PM UTC 73
81.59
GitHub Action Run
8 run-3.11-ubuntu-latest-standard - 11276029424.8 10 Oct 2024 02:36PM UTC 73
83.67
GitHub Action Run
Source Files on build 11276029424
  • Tree
  • List 73
  • Changed 71
  • Source Changed 0
  • Coverage Changed 26
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 96484dfa on github
  • Prev Build on main (#11275206436)
  • Next Build on main (#11351517817)
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