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

datatree ops.py migration cleanup #8963

Closed
flamingbear opened this issue Apr 22, 2024 · 0 comments · Fixed by #9619
Closed

datatree ops.py migration cleanup #8963

flamingbear opened this issue Apr 22, 2024 · 0 comments · Fixed by #9619
Labels
topic-DataTree Related to the implementation of a DataTree class

Comments

@flamingbear
Copy link
Member

What is your issue?

During the 3/26/2024 design discussion meeting (#8747), we discussed the monkey patching of methods that was required to wrap datatree nodes with the desired Xarray API function. This was a primarily done as a necessity due to the datatree code not living in the xarray repository. The better implementation could be to add the wrapping to xarray's generate_aggregations.py module. The ultimate decision made by Stephan and Tom was to add this as a future issue (this one) and migrate the file as is for now.

@flamingbear flamingbear added the needs triage Issue that has not been reviewed by xarray team member label Apr 22, 2024
@TomNicholas TomNicholas added topic-DataTree Related to the implementation of a DataTree class and removed needs triage Issue that has not been reviewed by xarray team member labels Apr 22, 2024
shoyer added a commit to shoyer/xarray that referenced this issue Oct 7, 2024
They now allow for dimensions that are missing on particular nodes, and
use Xarray's standard generate_aggregations machinery, like aggregations
for DataArray and Dataset.

Fixes pydata#8949, pydata#8963
shoyer added a commit that referenced this issue Oct 13, 2024
* Reimplement DataTree aggregations

They now allow for dimensions that are missing on particular nodes, and
use Xarray's standard generate_aggregations machinery, like aggregations
for DataArray and Dataset.

Fixes #8949, #8963

* add API docs on DataTree aggregations

* remove incorrectly added sel methods

* fix docstring reprs

* mypy fix

* fix self import

* remove unimplemented agg methods

* replace dim_arg_to_dims_set with parse_dims

* add parse_dims_as_set

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix mypy errors

* change tests to match slightly different error now thrown

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: TomNicholas <tom@cworthy.org>
@github-project-automation github-project-automation bot moved this from To do to Done in DataTree integration Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-DataTree Related to the implementation of a DataTree class
Projects
Development

Successfully merging a pull request may close this issue.

2 participants