Skip to content

Conversation

@astropenguin
Copy link
Contributor

We have released xarray-compare, a Python package which provides extra data-comparison features (e.g., dataarray.isbetween(lower, upper)).
This PR adds the project to the "Extend xarray capabilities" section in doc/related-projects.rst.

We have a concern: This package directly adds some methods to xarray.DataArray by using the accessor feature.
For example, dataarray.isbetween() is implemented by registering an accessor whose name is 'isbetween'.
This usage may not be what is expected by the xarray's developers.

So it would be appreciated if you could merge it, but if you feel that it does not fit the docs, please reject the PR.
Thank you!

@rabernat
Copy link
Contributor

Thanks for sharing this cool package! Looks vey useful. Definitely something we can list in "related projects". 😄

We have a concern: This package directly adds some methods to xarray.DataArray by using the accessor feature.
For example, dataarray.isbetween() is implemented by registering an accessor whose name is 'isbetween'.
This usage may not be what is expected by the xarray's developers.

Indeed, we should probably discourage this sort of "accessor hacking". Just out of curiosity, why did you opt for this rather than the more standard, dataarray.compare.isbetween()? I see your package was just released. Are you firmly committed to your API? Or could you consider deprecating it in favor of the recommended approach in a future release?

@dcherian dcherian closed this Sep 4, 2020
@dcherian dcherian reopened this Sep 4, 2020
@dcherian
Copy link
Contributor

dcherian commented Sep 4, 2020

test failure is unrelated. Thanks @astropenguin .

@dcherian dcherian merged commit a6eccfa into pydata:master Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants