You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failing test_run_local_udf_from_file_netcdf_with_context with xarray v2025.01.2 #721
test_run_local_udf_from_file_netcdf_with_context started failing with today's release of xarray v2025.01.2, on a new non-nanosecond datetime related issue:
_______________ test_run_local_udf_from_file_netcdf_with_context _______________
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_run_local_udf_from_file_n1')
def test_run_local_udf_from_file_netcdf_with_context(tmp_path):
udf_code = _get_udf_code("multiply_factor.py")
xdc = _build_xdc(
ts=[numpy.datetime64("2020-08-01"), numpy.datetime64("2020-08-11"), numpy.datetime64("2020-08-21")],
bands=["bandzero", "bandone"],
xs=[10.0, 11.0, 12.0, 13.0, 14.0],
ys=[20.0, 21.0, 22.0, 23.0, 24.0, 25.0],
)
assert xdc.array.shape == (3, 2, 5, 6)
data_path = tmp_path / "data.nc"
xdc.save_to_file(path=data_path, fmt="netcdf")
factor = 100
udf = UDF(udf_code, runtime="Python", context={"factor": factor})
res = execute_local_udf(udf, data_path, fmt="netcdf")
assert isinstance(res, UdfData)
result = res.get_datacube_list()[0].get_array()
assert result.shape == (3, 2, 6, 5)
swapped_result = result.transpose("t", "bands", "x", "y")
expected = xdc.array * factor
> xarray.testing.assert_equal(swapped_result, expected)
E AssertionError: Left and right DataArray objects are not equal
E Differing coordinates:
E L * t (t) datetime64[ns] 24B 2020-08-01 2020-08-11 2020-08-21
E R * t (t) datetime64[s] 24B 2020-08-01 2020-08-11 2020-08-21
@emmanuelmathot it's really just an issue in the test itself (caused by xarray change), not in the client as a whole, but our devs are very much busy on other things at the moment.
So local workaround is for sure to just use a newer xarray version.
Activity
Issue #721 avoid xarray v2025.01.2 for now
soxofaan commentedon Jan 31, 2025
Let's avoid v2025.01.2 for now as quickfix: b62f7fa
Issue #721 also avoid xarray 2025.03.0 for now
soxofaan commentedon Mar 24, 2025
also avoid version 2025.03.0 (released last week) for now
Issue #721 just stay below xarray 2025.01.2 for now
Add '<2025.01.2' cap on xarray dependency conda-forge#38
Issue #721 also avoid xarray 2025.03.0 for now
Issue #721 just stay below xarray 2025.01.2 for now
emmanuelmathot commentedon Dec 4, 2025
Any news on this issue? xarray becomes old and difficult to use latest zarr change in projects with openeo
jdries commentedon Dec 4, 2025
@emmanuelmathot it's really just an issue in the test itself (caused by xarray change), not in the client as a whole, but our devs are very much busy on other things at the moment.
So local workaround is for sure to just use a newer xarray version.
fix(openeo): unbreak pystac-gated item_assets and PEP 604 param coercion
chore(openeo): bump to titiler-openeo 0.18.x, fix what it broke, dedu…
fixup! Try lifting upper bound on xarray dependency #721
Remove upper bound on xarray dependency #721
Fix support for Xarray 2025.01 and up #721
Fix support for Xarray 2025.01 and up #721
soxofaan commentedon Oct 2, 2026
fixed with #948