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

Ouranosinc / xclim / 10186730634
92%

Build:
DEFAULT BRANCH: main
Ran 31 Jul 2024 09:44PM UTC
Jobs 0
Files 0
Run time –
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

pending completion
10186730634

push

github

web-flow
Dimensionless units as "1" - adapt to numpy 2 (#1814)

<!--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 #1785 
- [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] CHANGES.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?

* Changes NaN and NAN to nan, Inf to inf.
* Changes a test so the new data type promotion of numpy 2 fits our
expected values
* Relaxes a test for the same reason
* Change expected unit order in some cases (new cf_xarray + pint)
* Dimensionless units are now printed as "1". 
* Simplify `pint2cfunits`.
* Add `ensure_absolute_tempetature` to its module's `__all__` and move
`ensure_delta` up in the same module so both functions are near another
in the file.

### Does this PR introduce a breaking change?
Yes it does. Fixing numpy 2 issues made me fix pint 0.24.1 issues that
made me fix cf_xarray issues which have solution that is not
backwards-compatible and now pint and cf_xarray have updated pinned that
imply a numpy >=2 pin.

### Other information:
~We will require 3 new pins :~
- Most problems with `create_ensemble` come from a np2 bug in xarray,
which was fixed here pydata/xarray#9182. ~We are thus waiting for a
release~. Xarray 2024.07.0 out on the 30th.
- All units problem are solved with xarray-contrib/cf-xarray#523, which
was released in cf-xarray 0.9.3.
- The dimensionless unit thing requires pint 0.24.1 ~which requires
numpy 2, so pinning this as well.~

UPDATE: No pins were added, but the behaviour of xclim will be d... (continued)
Source Files on build 10186730634
Detailed source file information is not available for this build.
  • Back to Repo
  • d13cb6c4 on github
  • Prev Build on main (#10183316663)
  • Next Build on main (#10202462227)
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