datatree
datatree copied to clipboard
How to efficiently test the huge inherited Dataset API
xarray.Dataset has a ginormous API, and eventually the entire thing should also be available on DataTree
. However we probably still need to test this copied API, because the majority of it will be altered via the @map_over_subtree
decorator. How can we do that without also copying thousands of lines of tests from xarray.tests
?
@jhamman made a good suggestion today: reroute as much as possible internally through a node._to_temp_dataset()
private method, similarly to what we do in xarray.DataArray
.
This would mean that every method which is intended to act the same as it does on Dataset
will essentially be guaranteed to act the same, because internally it calls the corresponding Dataset
method. This could make the number of tests required for #41 much lower.