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

Ouranosinc / xclim / 17138356673
92%

Build:
DEFAULT BRANCH: main
Ran 21 Aug 2025 08:37PM UTC
Jobs 8
Files 61
Run time 3min
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

21 Aug 2025 08:32PM UTC coverage: 92.202% (-0.07%) from 92.27%
17138356673

push

github

web-flow
Refactor converters into their own modules (#2224)

### What kind of change does this PR introduce?

* Factors out the conversion-focused indices and indicators into their
own publicly-facing submodules (`xclim.indices.converters` and
`xclim.indicators.convert`)
* The majority of tests under `test_indicators.py` were actually tests
for indicators that are converters. The tests have been split off into
`test_converters.py`
* Fixed a noisy `RuntimeWarning` emitted by log operations in `numpy`
* Emits a warning if user tries to access the `_conversion.py` directly:
```python
>>> from xclim.indices import _conversion

<python-input-0>:1: DeprecationWarning: The `xclim.indices._conversion` submodule is deprecated and will be removed in a future release. Functions available here have been migrated to `xclim.indices.converters`.
```
* The indices for `uas_vas_to_sfcwind`, `sfcwind_to_uas_vas`, `rle_1d`,
and `cffwis_indices` now provide their outputs using `NamedTuple`
format. This does not break existing functionality, but also provides a
means of accessing outputs using names:
```python
>>> from xclim.indices import uas_vas_to_sfcwind

sfcwind = uas_vas_to_sfcwind(...)
assert sfcwind.sfcWind == sfcwind[0]
assert sfcwind.sfcWindfromdir == sfcwind[1]
```

### Does this PR introduce a breaking change?

Not exactly(!?):
- Indicators that were identified as converters have moved, mostly from
`xclim.atmos` with a few from `xclim.land` to a newly-registered
`xclim.convert`. There is currently a workaround to reimport these
functions to `xclim.atmos` and `xclim.land` while not actually
publicizing them in `__all__`. This means that they still work, though
they will emit `DeprecationWarnings`!
- The layout of `xclim.indices` has changed, but the conversion indices
remain accessible, all listed under the same module. For users who want
to further drill down into these specific indices, they can now import
`xclim.indices.converters`.

### Other information:

The conve... (continued)

573 of 617 new or added lines in 17 files covered. (92.87%)

1 existing line in 1 file now uncovered.

7792 of 8451 relevant lines covered (92.2%)

8.08 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
89.88
0.05% src/xclim/indices/run_length.py
2
92.59
-7.41% src/xclim/indicators/atmos/__init__.py
3
0.0
-93.27% src/xclim/indices/_conversion.py
4
89.19
-10.81% src/xclim/indicators/land/_snow.py
34
93.52
src/xclim/indices/converters.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
0.0
-93.27% src/xclim/indices/_conversion.py
Jobs
ID Job ID Ran Files Coverage
1 run-3.12-ubuntu-latest-standard - 17138356673.1 21 Aug 2025 08:42PM UTC 61
88.78
GitHub Action Run
2 run-{{ matrix.python-version }}-conda - 17138356673.2 21 Aug 2025 08:41PM UTC 60
92.06
GitHub Action Run
3 run-3.10-ubuntu-latest-standard - 17138356673.3 21 Aug 2025 08:42PM UTC 61
88.78
GitHub Action Run
4 run-3.11-ubuntu-latest-preliminary - 17138356673.4 21 Aug 2025 08:42PM UTC 61
88.58
GitHub Action Run
5 run-3.12-windows-latest-py312-coverage-prefetch - 17138356673.5 21 Aug 2025 08:42PM UTC 61
88.32
GitHub Action Run
6 run-3.11-ubuntu-latest-standard - 17138356673.6 21 Aug 2025 08:42PM UTC 61
88.88
GitHub Action Run
7 run-3.11-ubuntu-latest-py311-coverage-extras-sbck-offline-prefetch - 17138356673.7 21 Aug 2025 08:42PM UTC 61
88.75
GitHub Action Run
8 run-3.11-macos-latest-py311-coverage-extras-lmoments - 17138356673.8 21 Aug 2025 08:42PM UTC 61
92.0
GitHub Action Run
Source Files on build 17138356673
  • Tree
  • List 61
  • Changed 15
  • Source Changed 15
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 7b54b645 on github
  • Prev Build on main (#17135170843)
  • Next Build on main (#17159774154)
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