-
Notifications
You must be signed in to change notification settings - Fork 178
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
Proposal: Use the recommended method for xarray extensions. #519
Comments
This is another proposal stemming from some of our internal use cases. We've got a few helper methods that give users access to additional metadata and provide a few shortcuts that help with subsetting/serialization. Using an xarray extension would allow for a pretty simple pathway to adding new features without having to patch the Dataset/DataArray classes themselves. Additionally, some of the geo_xarray functionality could probably find a home there as well. |
Thanks @snowman2 and @alfredoahds this looks like a good improvement suggestion over existing solution and opens a door for more convenience methods. I'm on board with this proposal. only possible concern is "how long |
I'm fairly certain the accessor registration functionality was introduced in v0.9.0 just looking at the history on the |
There are a few other groups that also use We added the property monkey-patching just before xarray released the accessor registration functionality, which was some time ago. I've been wanting to move out the |
Agree with @andrewdhicks that we should try to keep |
If you want your |
@andrewdhicks I like what you have for ideas for porting geo_xarray.py to a standalone library geoxarray. I should have looked at that sooner. Is this something that the datacube developers are planning on moving into its own package inside the opendatacube project? |
I was thinking it would be a new repo under the opendatacube github org. It got put on the backburner while we waited for the rasterio features in xarray to become stable (that wiki page is over a year old) but it looks like it might be time to pick it up again. I'm hoping to find some time in the next month, but that might get overtaken by the work the pyresample folks want to do over on xarray#2288. Would you be looking to use the library in pangea, and would it have the same sort of requirements as odc? I hadn't realised this list had gotten so big: |
That would be really great if you could create the new repo/project. I think that would solve most of the As a side note, I have taken it, moved it to an xarray extension, and used it in our own library internally to support users of the opendatacube plugin we have. I have also added features/bugfixes to it internally, and can share pieces of it (after following the correct internal procedures) if you decide to put it up. Also, I had some thoughts this morning about potential names for it. Do you think it would make sense to keep the functionality limited to a rasterio-like schema? I was thinking that doing so could set the scope and help make what it does more clear. If so, it could be called something like |
rioxarray is now available: https://corteva.github.io/rioxarray/ |
Wow @snowman2 this is great! |
Is there interest to use |
@snowman2 Definitely! But, it's still in the backlog with a lot of other internal changes we want to make. The core developers have been doing a lot more application and product delivery work lately, not so much time for internals. |
Sounds good. Would it be useful for me to have a go at integrating it into the code? |
Thanks for the offer! I think we need more detailed conversation with @Kirill888 , @uchchwhash and @alexgleith . To make sure we're all on the same page and not doubling up or wasting effort. I'll try and sound out availability. |
Sounds like a good plan to me 👍 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It would be nice for the datacube project to use the recommended method for extending xarray as issues may arise if overriding existing methods when users use open datacube as it will also impact how xarray behaves standalone.
This is currently used here.
This will prevent potential conflicts that may arise in the future if more methods/properties are added and will ensure that it will not impact the xarray module itself.
The xarray extension could be called
odc
.So instead of:
It would be:
Thoughts?
The text was updated successfully, but these errors were encountered: