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

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

Build:
DEFAULT BRANCH: main
Ran 28 Aug 2024 09:04PM UTC
Files 71
Run time 14s
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

28 Aug 2024 08:49PM UTC coverage: 83.257% (+0.2%) from 83.076%
10604210263.8

push

github

web-flow
Use pooch (#1889)

<!--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 relies on changes to be merged in
https://github.com/Ouranosinc/xclim-testdata/pull/29
- [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?

* Replaces the logic for file gathering and caching from the in-house
developed version to instead use `pooch`.
  * In order to fetch testing data, one can now use the following:
  ```python
  from xclim.testing.utils import nimbus

  n = nimbus()
# from a fork of xclim-testdata:
nimbus(repo="https://github.com/Me/My_Repo", branch="my_test_branch")
  file = n.fetch("some_folder/some_data.nc")
  ```
* Removes the remote GitHub calls for every file request (which was
performed by `_get()`).
* Exports most of the file request and cache handling to `pooch`, while
maintaining a relatively unchanged API for users.
* (To be confirmed) Speeds up the delivery of test data to tests by
reducing the amount of redundant calls to fixtures and relying on a
single pooch instance of pooch to prevent multiple setup stages.

### Does this PR introduce a breaking change?

Absolutely. `get_file` and `open_dataset` no longer fetch remote files
from GitHub. Instead, a locally-stored `registry.txt` file contains all
the checksums of all files needed to run the tests and returns the
appropriate file from a locally-held cache. If the file checksum does
not match the expected value, it will attempt to replace it from... (continued)

8498 of 10207 relevant lines covered (83.26%)

0.83 hits per line

Source Files on job run-3.11-ubuntu-latest-standard - 10604210263.8
  • Tree
  • List 0
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 10604210263
  • c3045b1c on github
  • Prev Job for on main (#10508103166.1)
  • Next Job for on main (#10604624069.7)
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