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

Ouranosinc / xclim / 30121146142
91%
main: 92%

Build:
Build:
LAST BUILD BRANCH: refactor-v1
DEFAULT BRANCH: main
Ran 24 Jul 2026 07:40PM UTC
Jobs 8
Files 62
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

24 Jul 2026 07:36PM UTC coverage: 90.667%. First build
30121146142

push

github

web-flow
[new xclim] Use generics to remove redundant indices (#2264)

<!--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:
- [x] This PR addresses an already opened issue (for bug fixes /
features)
    - This PR fixes #744
- [x] Tests for the changes have been added (for bug fixes / features)
- [x] (If applicable) Documentation has been added / updated (for bug
fixes / features)
- [ ] CHANGELOG.rst has been updated (with summary of main changes)
- [ ] Link to issue (:issue:`number`) and pull request (:pull:`number`)
has been added

### What kind of change does this PR introduce?
This is why I wanted #2258.

Use index functions from `indices.generic` where possible in
`xclim.indicators` and remove explicit function in `xclim.indices`.

For example : Indicator "wetdays" is only a specific case of
`count_occurrences`. So redefine the indicator to use that function, and
remove the `xclim.indices._threshold.wetdays` function.

### Does this PR introduce a breaking change?
Yes. A lot of methods from  `xclim.indices` are being removed.

I try not to break indicators, but some arguments may have different
names and the metadata is modified. Mainly, a lot of indicators are
loosing their "notes" and "examples". My idea is that for simple
indicators, those are not necessary : the abstract, the generic
function's docstring and the "injected" parameters should be enough to
understand the calculations.

### Other information:
A large group of "indices" I can't remove for now are the "percentile"
ones like "tg10p". They do not map to a generic function yet as they are
in between `count_occurrences` and `count_percentile_occurrences`, plus
the `bootstrap` component. I might create a new generic function to take
care of that.

386 of 415 new or added lines in 25 files covered. (93.01%)

7917 of 8732 relevant lines covered (90.67%)

7.63 hits per line

Uncovered Changes

Lines Coverage ∆ File
11
74.88
src/xclim/indices/_threshold.py
5
93.23
src/xclim/indices/_anuclim.py
5
89.63
src/xclim/indices/generic.py
4
89.22
src/xclim/indices/_multivariate.py
1
96.55
src/xclim/core/indicator.py
1
87.62
src/xclim/indices/_agro.py
1
90.29
src/xclim/indices/_simple.py
1
82.39
src/xclim/indices/helpers.py
Jobs
ID Job ID Ran Files Coverage
1 run-3.13-windows-latest-prefetch - 30121146142.1 24 Jul 2026 07:49PM UTC 62
89.04
GitHub Action Run
2 run-3.12-ubuntu-latest-offline - 30121146142.2 24 Jul 2026 07:46PM UTC 62
89.27
GitHub Action Run
3 run-3.13-ubuntu-latest- - 30121146142.3 24 Jul 2026 07:43PM UTC 62
86.77
GitHub Action Run
4 run-3.12-ubuntu-latest-doctests - 30121146142.4 24 Jul 2026 07:40PM UTC 62
56.24
GitHub Action Run
5 run-{{ matrix.python-version }}-conda - 30121146142.5 24 Jul 2026 07:42PM UTC 62
89.9
GitHub Action Run
6 run-3.12-ubuntu-latest- - 30121146142.6 24 Jul 2026 07:42PM UTC 62
86.19
GitHub Action Run
7 run-3.13-macos-latest- - 30121146142.7 24 Jul 2026 07:42PM UTC 62
89.89
GitHub Action Run
8 run-3.14-ubuntu-latest- - 30121146142.8 24 Jul 2026 07:41PM UTC 62
86.18
GitHub Action Run
Source Files on build 30121146142
  • Tree
  • List 62
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30121146142
  • f3b955b3 on github
  • Prev Build on dev-v099 (#29749820555)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc