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

Ouranosinc / xclim / 9471328678
92%

Build:
DEFAULT BRANCH: main
Ran 11 Jun 2024 07:19PM UTC
Jobs 2
Files 70
Run time 11min
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

11 Jun 2024 07:04PM UTC coverage: 90.371% (-0.2%) from 90.593%
9471328678

push

github

web-flow
Deprecate calendar ops (#1761)

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

* Calendar utilities that have an equivalent in xarray have been
deprecated and will be removed in 0.51. This concerns the following
members of ``xclim.core.calendar``:
- ``convert_calendar`` : Use ``Dataset.convert_calendar``,
``DataArray.convert_calendar`` or
``xr.coding.calendar_ops.convert_calendar`` instead.
+ If your code passes ``target`` as an array, first convert the source
to the target's calendar and then reindex the result to ``target``.
+ If you were using the ``doy=True`` option, replace it with
``xc.core.calendar.convert_doy(source,
target_cal).convert_calendar(target_cal)``.
+ ``"default"`` is no longer a valid calendar name for any xclim
functions and will not be returned by ``get_calendar``. Xarray has a
``use_cftime`` argument, xclim exposes it when the distinction is
needed.
    - ``date_range`` : Use ``xarray.date_range`` instead.
    - ``date_range_like``: Use ``xarray.date_range_like`` instead.
- ``interp_calendar`` : Use
``xarray.coding.calendar_ops.interp_calendar`` instead.
- ``days_in_year`` : Use ``xarray.coding.calendar_ops._days_in_year``
instead.
- ``datetime_to_decimal_year`` : Use
``xarray.coding.calendar_ops._datetime_to_decimal_year`` instead.

### Does this PR introduce a breaking change?

Yes.

- Some options of `convert_calendar` are not possible with xarray,
suggestions are made above.
- "default" is not a calendar name anymore.

40 of 56 new or added lines in 9 files covered. (71.43%)

4 existing lines in 3 files now uncovered.

8775 of 9710 relevant lines covered (90.37%)

5.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-{{ matrix.tox-env }}-{{ matrix.os }} - 9471328678.1 11 Jun 2024 07:36PM UTC 0
90.36
GitHub Action Run
2 run-{{ matrix.tox-env }}-opt-slow - 9471328678.2 11 Jun 2024 07:36PM UTC 0
89.53
GitHub Action Run
Source Files on build 9471328678
Detailed source file information is not available for this build.
  • Back to Repo
  • ef5699cb on github
  • Prev Build on main (#9471062660)
  • Next Build on main (#9471601990)
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