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

Ouranosinc / xclim / 11387045798
92%

Build:
DEFAULT BRANCH: main
Ran 17 Oct 2024 02:33PM UTC
Jobs 8
Files 73
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

17 Oct 2024 02:27PM UTC coverage: 89.357% (-0.09%) from 89.444%
11387045798

push

github

web-flow
Support for temperature differences in CF attributes (#1836)

Set ``units_metadata`` attribute to ``"temperature: difference"`` for
arrays representing a difference between two temperatures.

<!--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 #1822
- [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?

* Add ``units_metadata`` attribute set to ``"temperature: difference"``
whenever values represent a difference between two temperatures (degree
days, diurnal amplitude, bias, etc).
* Adjust the units handling functions to recognize this attribute. 
* Modify indices that set units to `delta_degC`, which is not CF
compliant, by the original input DataArray units and the
``units_metadata`` attribute.
* Create new function ``pint2cfattrs`` to convert delta units into a
dictionary of attributes, including ``units_metadata``.


### Does this PR introduce a breaking change?

Yes, units returned by some indices will change.

### Other information:

67 of 68 new or added lines in 6 files covered. (98.53%)

12 existing lines in 1 file now uncovered.

9361 of 10476 relevant lines covered (89.36%)

7.55 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
84.04
-2.04% xclim/core/units.py

Uncovered Existing Lines

Lines Coverage ∆ File
12
84.04
-2.04% xclim/core/units.py
Jobs
ID Job ID Ran Files Coverage
1 run-3.10-windows-latest-py310-coverage-prefetch - 11387045798.1 17 Oct 2024 02:41PM UTC 73
81.52
GitHub Action Run
2 run-3.11-macos-latest-py311-coverage-extras - 11387045798.2 17 Oct 2024 02:41PM UTC 73
87.1
GitHub Action Run
3 run-{{ matrix.python-version }}-conda - 11387045798.3 17 Oct 2024 02:41PM UTC 73
87.26
GitHub Action Run
4 run-3.12-ubuntu-latest-standard - 11387045798.4 17 Oct 2024 02:41PM UTC 73
81.71
GitHub Action Run
5 run-3.10-ubuntu-latest-standard - 11387045798.5 17 Oct 2024 02:41PM UTC 73
81.68
GitHub Action Run
6 run-3.11-ubuntu-latest-standard - 11387045798.6 17 Oct 2024 02:41PM UTC 73
83.59
GitHub Action Run
7 11387045798.7 17 Oct 2024 02:41PM UTC 73
81.68
GitHub Action Run
8 run-3.11-ubuntu-latest-py311-coverage-sbck-offline-prefetch - 11387045798.8 17 Oct 2024 02:41PM UTC 73
83.56
GitHub Action Run
Source Files on build 11387045798
  • Tree
  • List 73
  • Changed 13
  • Source Changed 0
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • b3acb711 on github
  • Prev Build on main (#11367921167)
  • Next Build on main (#11388708767)
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