pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.63k stars 1.09k forks source link

Reimplement Datatree typed ops #9619

Closed TomNicholas closed 1 month ago

TomNicholas commented 1 month ago

Follows on from #9589, but for the ops defined in _typed_ops.py.

Does this mean we can remove most/all of datatree_ops.py?

EDIT: Answering my own question - none of datatree_ops.py is currently used since we disabled it. It does contain lists of methods we should implement, many of which are now implemented in this PR and #9589. As the only purpose it serves right now is tracking remaining un-implemented methods, we should probably remove it in favour of creating a new github issue.

cc @shoyer, @flamingbear

TomNicholas commented 1 month ago

Pretty sure the mypy failure in the last commit is unrelated to this PR (which passed mypy before today) - see https://github.com/pydata/xarray/pull/9618#issuecomment-2411054245.

kmuehlbauer commented 1 month ago

@TomNicholas https://github.com/pydata/xarray/pull/9621 for the mypy issue

headtr1ck commented 1 month ago

@TomNicholas this should definitely go into whats-new!

TomNicholas commented 1 month ago

this should definitely go into whats-new!

Generally with the datatree stuff we have been taking the approach that since the previous versions of xarray never had DataTree publicly available, that "what's new" isn't really appropriate for all the internal work going on. Instead we're just going to have one what's new entry announcing the new class, and summarise the important changes relative to the old version of datatree in the other repository in a dedicated migration guide.