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

Ouranosinc / xsdba / 21648734949

03 Feb 2026 09:34PM UTC coverage: 78.48% (-0.1%) from 78.585%
21648734949

push

github

web-flow
add permissive option and fix for 0 (#194)

<!-- 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:
- [ ] This PR addresses an already opened issue (for bug fixes /
features)
  - This PR fixes #xyz
- [ ] (If applicable) Documentation has been added / updated (for bug
fixes / features).
- [ ] (If applicable) Tests have been added.
- [ ] CHANGELOG.rst has been updated (with summary of main changes).
- [ ] Link to issue (:issue:`number`) and pull request (:pull:`number`)
has been added.

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

* Fix clip for 0. When we had a 0 in float32 and we clipped to the next
float32, it would become a 0 (float 32) again in `data_prime`. If we
cast it to float64, it could stay not exactly 0.
  * our tests did not catch this because the inputs were in 64.
  * The casting behavior is different for numpy <2.0, so I pin it above.
* I have encountered climate models with hurs above 100... I have found
that the data_request suggested to clip the data, but not everybody did
it.
(https://earthscience.stackexchange.com/questions/22850/why-are-the-cmip6-model-outputs-for-relative-humidity-not-scaled-to-between-1-10)
* I am thinking maybe we can do the clipping ourselves, so I added that
option with "permissive".


### Does this PR introduce a breaking change?
yes, the behavior will be different for 0.

### Other information:

21 of 22 new or added lines in 1 file covered. (95.45%)

7 existing lines in 2 files now uncovered.

2819 of 3592 relevant lines covered (78.48%)

6.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.53
/src/xsdba/processing.py


Source Not Available

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