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

Ouranosinc / xclim / 6165879152 / 1
90%
main: 92%

Build:
Build:
LAST BUILD BRANCH: more-spei-dists
DEFAULT BRANCH: main
Ran 12 Sep 2023 11:32PM UTC
Files 70
Run time 2s
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

12 Sep 2023 11:18PM UTC coverage: 90.468% (+4.2%) from 86.283%
6165879152.1

push

github

web-flow
Offline testing and test data fetching improvements (#1473)

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

* Adds `pytest-socket` to the testing dependencies, in order to block
HTTP requests
* Adds a new pytest marker `"requires_internet"` for tests that
absolutely depend on internet access.
* Fixed an error in the pytest configuration that impeded copying of
testing data to thread safe caches of workers (this should always
occur).
* Added handling for `pytest-socket`'s `SocketBlockedError` when
attempting to fetch md5 validation files for cached testing data.
* Added a `tox` modifier for running tests without internet access (`tox
-e offline`)
* Option to call `tox -e offline-prefetch` to run the data prefetching
command before sockets are disabled in `pytest` call.
* Added a build using Python3.10 to the GitHub Workflows that uses the
new `offline` modifier in the `tox` configuration.
* For better accuracy, the `tox -e black` recipe has been renamed to
`tox -e lint`, as this configuration already included several other linting checks.
* Added a CLI command (`$ xclim prefetch_testing_data`) for manually
calling the `populate_testing_data()` command with branch
(`--branch/-b`) options.
* Updated the testing data used in the `analogs.ipynb` notebook to use
the testing data now found in `Ouranosinc/xclim-testdata`'s main branch
(see: https://github.com/Ouranosinc/xclim-testdata/pull/26)

`xclim` now has a dedicated CLI command for prefetching the
`Ouranosinc/xclim-testdata`:

```
$ xclim prefetch_testing_data
# or, for a specific testdata branch
$ xclim prefetch_testing_data --branch my_testdata_branch
```

Running `pytest` will still perform the fetching of data on first run if
the user does not have an `xclim-testdata` folder in their
platform-dependent cache location (`/home/$USER/.cache/xclim-testdata`
on Linux).

### Does this PR introduce a breaking change?

Yes:

* `tox` is now configured to pass pos... (continued)

8352 of 9232 relevant lines covered (90.47%)

3.47 hits per line

Source Files on job run-{{ matrix.tox-env }} - 6165879152.1
  • Tree
  • List 0
  • Changed 69
  • Source Changed 0
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 6165879152
  • 66cf19c1 on github
  • Prev Job for on master (#6163952231.1)
  • Next Job for on master (#6166228350.1)
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