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

Ouranosinc / xclim / 14733780119 / 8
92%
main: 92%

Build:
DEFAULT BRANCH: main
Ran 29 Apr 2025 03:05PM UTC
Files 71
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

29 Apr 2025 02:26PM UTC coverage: 88.207% (+0.02%) from 88.187%
14733780119.8

push

github

web-flow
Allow unequal periods in `infer_sampling_units` and `stack_periods`. (#2150)

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

* Allows the units "month" and "year" in the output of
`infer_sampling_units`.
* Rewrite `infer_sampling_units` to be more explicit in the errors and
safer with the defaults.

### Does this PR introduce a breaking change?
Yes, but minimal : `infer_sampling_units` would _assume_ `freq='D'`
before, which I now think is a bit weird and dangerous. It will now fail
on non-inferrable freqs instead, unless a default is passed.

### Other information:
Previously, the idea was that we would never use `pint` units that
represented unequal periods (months, years), but seeing the source issue
and thinking about it, maybe we can switch the usage responsibility to
the user instead? "month" and "year" are valid CF units, so why not
support them.

9544 of 10820 relevant lines covered (88.21%)

1.76 hits per line

Source Files on job run-{{ matrix.python-version }}-conda - 14733780119.8
  • Tree
  • List 71
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 14733780119
  • e3e79036 on github
  • Prev Job for on main (#14711935904.3)
  • Next Job for on main (#14837606885.6)
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