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

Ouranosinc / xclim / 17138356673 / 6
92%
main: 92%

Build:
DEFAULT BRANCH: main
Ran 21 Aug 2025 08:42PM UTC
Files 61
Run time 3s
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: 88.877% (-0.05%) from 88.923%
17138356673.6

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)

7511 of 8451 relevant lines covered (88.88%)

0.89 hits per line

Source Files on job run-3.11-ubuntu-latest-standard - 17138356673.6
  • Tree
  • List 61
  • Changed 9
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 17138356673
  • 7b54b645 on github
  • Prev Job for on main (#17135170843.2)
  • Next Job for on main (#17159774154.2)
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