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

Ouranosinc / xclim / 6165879152
90%
main: 92%

Build:
Build:
LAST BUILD BRANCH: more-spei-dists
DEFAULT BRANCH: main
Ran 12 Sep 2023 11:27PM UTC
Jobs 2
Files 70
Run time 3s
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% (-0.2%) from 90.674%
6165879152

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)

16 of 39 new or added lines in 2 files covered. (41.03%)

2 existing lines in 2 files now uncovered.

8352 of 9232 relevant lines covered (90.47%)

4.37 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-{{ matrix.tox-env }} - 6165879152.1 12 Sep 2023 11:32PM UTC 0
90.47
2 run-{{ matrix.tox-env }}-opt-slow - 6165879152.2 12 Sep 2023 11:32PM UTC 0
90.07
Source Files on build 6165879152
Detailed source file information is not available for this build.
  • Back to Repo
  • 66cf19c1 on github
  • Prev Build on master (#6163952231)
  • Next Build on master (#6166228350)
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