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

Add BackendEntrypoint to an easier to find location #5125

Closed
alexamici opened this issue Apr 7, 2021 · 3 comments · Fixed by #5127
Closed

Add BackendEntrypoint to an easier to find location #5125

alexamici opened this issue Apr 7, 2021 · 3 comments · Fixed by #5127

Comments

@alexamici
Copy link
Collaborator

alexamici commented Apr 7, 2021

Is your feature request related to a problem? Please describe.

I started implementing a few backend plugins following the documentation so I noticed a few easily fixable quirks:

http://xarray.pydata.org/en/latest/internals/how-to-add-new-backend.html

The main one is the BackendEntrypoint is found deep into xarray.backends.common.

Describe the solution you'd like

I suggest to add an easier to find reference:

  • xarray.backends.BackendEntrypoint would do
  • but maybe even xarray.BackendEntrypoint.

Additional context

For the simplest plugins BackendEntrypoint would be the only import to connect to xarray.

See this dummy GDAL plugin: https://github.com/bopen/xarray-gdal/blob/main/xarray_gdal/xarray_plugin.py
But also the rioxarray plugin in this PR: corteva/rioxarray/pull/281

@alexamici
Copy link
Collaborator Author

Same with BackendArray for plugin that want to support lazy loading.

@shoyer
Copy link
Member

shoyer commented Apr 10, 2021

👍 for putting all external API stuff related to backends in the top level xarray.backends.

@alexamici
Copy link
Collaborator Author

This didn't close automatically, but it is closed by #5127

@keewis keewis linked a pull request Apr 11, 2021 that will close this issue
4 tasks
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 a pull request may close this issue.

2 participants