Closed Zeitsperre closed 3 weeks ago
@Zeitsperre looks good š ... but probably need some support in adapting PR #342.
@cehbrecht There's a ton of work to do. I'm completely tearing the testing apart. I might need some help to move mini-esgf-data
to a new system that's easier to maintain.
There are a handful of tests failing that I can't seem to make sense of. It may be due to breaking changes in more recent versions of dask
and xarray
, but it isn't clear to me which changes are the culprit.
Within some of the internals of clisops (e.g. clisops.ops.base_operation.Operation
) there are direct calls to roocs-utils
's open_xr_dataset
. Is it possible that these helper functions are broken?
One thing for certain is that this affects tests that open paths ending in wildcards (i.e. path/to/file/*.nc
). I've tried to load()
these on open, but it doesn't seem to have an effect. I'm totally stumped.
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
clisops/utils/testing.py | 116 | 160 | 72.5% | ||
<!-- | Total: | 137 | 181 | 75.69% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
clisops/ops/base_operation.py | 3 | 87.5% | ||
<!-- | Total: | 3 | --> |
Totals | |
---|---|
Change from base Build 10473239325: | 0.6% |
Covered Lines: | 1853 |
Relevant Lines: | 2532 |
@cehbrecht Waiting on your review here. Lots of changes, but things are much smoother here.
@Zeitsperre thanks for the update. I'm fine with the changes. Moving to pooch
looks good. Probably we will need some support for the other PR #342 after the merge of this one. Maybe have a release after the merge of this PR? PR #342 also partially replaces some functions of roocs-utils ... but there is more to do.
Pull Request Checklist:
What kind of change does this PR introduce?:
xclim-testdata
repo to prevent breaking changes there from causing issues here.pytest-xdist
to distribute tests across multiple workerspooch
).numpy.random.RandomState
call.pip
,tox
, and testing data to significantly speed up subsequent builds.Does this PR introduce a breaking change?:
Yes. Testing now requires the
pytest-xdist
plugin (has been added topyproject.toml
andenvironment.yml
). By default, runningpytest
will only use one worker, buttox
will use up to eight workers.Other information:
https://pytest-xdist.readthedocs.io/en/stable/