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

Ouranosinc / xclim / 33214604034
91%

Build:
DEFAULT BRANCH: main
Ran 28 Aug 2026 09:59PM 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

28 Aug 2026 09:54PM UTC coverage: 90.643% (-0.2%) from 90.796%
33214604034

push

github

web-flow
Refactor the Indicator class, move modules to IndicatorCollection (#2399)

<!--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 #2397
- [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?
Finally, changing indicator derivation from subclassing to copying made
things more complicated, I abandoned the idea. I did pursue the idea of
refactoring `indicator.py` so that it was less of a monolith.

* The `Indicator` class is now the child of a hierarchy of smaller
classes.
- `IndexWrapper` : Wraps a compute function, extracting its metadata.
Docstring parsing and generation has been removed from `formatting`, put
here.
- `IndicatorBase` : Handles the fancy subclassing, with modification of
parameters, outputs (etc) from user input. It also defines the structure
of `__call__` and the related methods subclasses are supposed to use as
entry points in the computation.
- Then a stack of classes incrementing the features of the indicator:
        + `_DatasetIO` : Support for dataset as input and output.
        + `_DataTreeIterator` : Support for DataTree as input and output
+ `_MetadataFormatter` : Format output attributes with our template
system, add them to the output(s).
        + `_LocaleMetadataFormatter` : Adds translation support.
+ `_DeprecationWarner ` : Adds possibility to deprecate an indicator.
        + `_InputChecker` : Defines the checks performed on the inputs.
+ `_Compatibility` : Some support for input arguments I broke and ... (continued)

865 of 902 new or added lines in 24 files covered. (95.9%)

10 existing lines in 5 files now uncovered.

7973 of 8796 relevant lines covered (90.64%)

7.64 hits per line

Uncovered Changes

Lines Coverage ∆ File
21
96.4
-0.16% src/xclim/core/indicator.py
8
90.82
-3.03% src/xclim/core/utils.py
4
96.33
src/xclim/core/collection.py
3
92.31
0.07% src/xclim/core/locales.py
1
86.45
-0.26% src/xclim/cli.py

Coverage Regressions

Lines Coverage ∆ File
5
96.4
-0.16% src/xclim/core/indicator.py
2
88.35
-1.94% src/xclim/compute/_simple.py
1
95.65
-0.54% src/xclim/compute/_hydrology.py
1
88.85
-0.37% src/xclim/compute/_multivariate.py
1
97.14
-2.86% src/xclim/core/cfchecks.py
Jobs
ID Job ID Ran Files Coverage
1 run-3.13-macos-latest- - 33214604034.1 28 Aug 2026 10:03PM UTC 62
89.89
GitHub Action Run
2 run-3.14-ubuntu-latest- - 33214604034.2 28 Aug 2026 09:59PM UTC 62
86.28
GitHub Action Run
3 run-{{ matrix.python-version }}-conda - 33214604034.3 28 Aug 2026 10:01PM UTC 62
89.9
GitHub Action Run
4 run-3.13-windows-latest-prefetch - 33214604034.4 28 Aug 2026 10:05PM UTC 62
89.09
GitHub Action Run
5 run-3.12-ubuntu-latest-offline - 33214604034.5 28 Aug 2026 10:02PM UTC 62
89.28
GitHub Action Run
6 run-3.12-ubuntu-latest- - 33214604034.6 28 Aug 2026 09:59PM UTC 62
86.29
GitHub Action Run
7 run-3.12-ubuntu-latest-doctests - 33214604034.7 28 Aug 2026 09:59PM UTC 62
56.15
GitHub Action Run
8 run-3.13-ubuntu-latest- - 33214604034.8 28 Aug 2026 10:00PM UTC 62
86.87
GitHub Action Run
Source Files on build 33214604034
  • Tree
  • List 62
  • Changed 32
  • Source Changed 31
  • Coverage Changed 21
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33214604034
  • 2baa8a5c on github
  • Prev Build on main (#33118774022)
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