Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamline fixtures, use pytest-xdist, drop Python3.8 #345

Merged
merged 26 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8aac17e
use pytest-xdist to distribute tests, pin some missing dependencies
Zeitsperre Aug 26, 2024
a7b1394
streamline testing logic, remove unsafe loads and optimize many pytes…
Zeitsperre Aug 26, 2024
2b13b70
typo fixes
Zeitsperre Aug 26, 2024
adc08f0
thread fixes
Zeitsperre Aug 26, 2024
d1dc45d
wip - completely rewrite test setup
Zeitsperre Aug 26, 2024
8149f1c
wip - finish replacing file locations
Zeitsperre Aug 26, 2024
a4488a2
stability improvements, fix folder tree path
Zeitsperre Aug 27, 2024
cb9262b
more adjustments
Zeitsperre Aug 27, 2024
2351433
address a few warnings
Zeitsperre Aug 27, 2024
25a30f5
Python3.8 adjustments
Zeitsperre Aug 27, 2024
be58cff
wip - complete rewrite
Zeitsperre Aug 27, 2024
79bc907
wip - prepare mini-esgf for pooch
Zeitsperre Aug 27, 2024
5dc834e
add data registries, adapt to new system
Zeitsperre Aug 27, 2024
0e09cf0
drop Python3.8
Zeitsperre Sep 4, 2024
70bee09
update conventions
Zeitsperre Sep 4, 2024
5e496d5
split esgf data into files and globs, update test fixtures, update no…
Zeitsperre Sep 4, 2024
1196bdc
update dependencies and conventions
Zeitsperre Sep 4, 2024
b9ea150
fix coverage, try loading mfdatasets
Zeitsperre Sep 5, 2024
37cf12e
fix random seeding
Zeitsperre Sep 5, 2024
b44be81
update changelog and synchronize pins
Zeitsperre Sep 5, 2024
52d4cee
use deptry, dependency updates and synchronizations, update changelog
Zeitsperre Sep 5, 2024
f343046
use test data caching
Zeitsperre Sep 5, 2024
b6d94b4
add a cache cleaning workflow
Zeitsperre Sep 5, 2024
2bb0f07
fix coverage reporting
Zeitsperre Sep 5, 2024
60d3288
update release date
Zeitsperre Oct 3, 2024
6906e97
pin micromamba, fix dependency name
Zeitsperre Oct 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ def ndq_series():
time = xr.IndexVariable(
"time", dates, attrs={"units": "days since 1900-01-01", "calendar": "standard"}
)
rs = np.random.RandomState()
Zeitsperre marked this conversation as resolved.
Show resolved Hide resolved

return xr.DataArray(
np.random.lognormal(10, 1, (nt, nx, ny)),
rs.lognormal(10, 1, (nt, nx, ny)),
dims=("time", "x", "y"),
coords={"time": time, "x": cx, "y": cy},
attrs={"units": "m^3 s-1", "standard_name": "streamflow"},
Expand Down
4 changes: 2 additions & 2 deletions tests/test_core_subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ def compare_vals(ds, sub, vari, flag_2d=False):
# Check subsetted values against original.
imask = np.where(~np.isnan(sub[vari].isel(time=0)))
if len(imask[0]) > 70:
np.random.RandomState = 42
ii = np.random.randint(0, len(imask[0]), 70)
rs = np.random.RandomState(42)
ii = rs.randint(0, len(imask[0]), 70)
else:
ii = np.arange(0, len(imask[0]))
for i in zip(imask[0][ii], imask[1][ii]):
Expand Down