cubed-dev / cubed-xarray

Interface for using cubed with xarray
Apache License 2.0
26 stars 3 forks source link

Test suite #6

Closed TomNicholas closed 3 months ago

TomNicholas commented 1 year ago

Currently we barely test that xarray objects wrapping cubed arrays actually compute correctly when called upon. Instead we are basically assuming that:

(a) cubed supporting the array API (b) xarray supposedly correctly calling the array API (c) chunk-aware functions being re-routed through the ChunkManagerEntrypoint

is together enough for most operations to "just work".

In practice that won't be enough to ensure successful computation on cubed arrays (see list of known problems in the readme), and a more comprehensive testing approach is needed.


The long-term best way to fully test this integration would be to finish creating the framework suggested in https://github.com/pydata/xarray/issues/6894, then import and use that in this repository. Unfortunately there is still a fair bit of work to get to that point (especially finishing https://github.com/pydata/xarray/pull/6908.

cc @tomwhite

tomwhite commented 3 months ago

We still need a few basic coverage tests. I added one in #14, but more are needed.

@TomNicholas can you suggest a few we could add? Perhaps ones that we adapt from the xarray test suite (since #8 is some way off).

TomNicholas commented 3 months ago

Yeah I think a place to start would just to have at least one test per method in the ChunkManager. I.e. chunk, rechunk, reduction, apply_ufunc, store, to_zarr, scan? Etc.