Skip to content

Add BackendEntrypoint to an easier to find location #5125

Closed

Description

@alexamici

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: vylor/rioxarray/pull/281

Activity

  1. alexamici commented on Apr 7, 2021

    @alexamici
    CollaboratorAuthor

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

  2. shoyer commented on Apr 10, 2021

    @shoyer
    Member

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

  3. alexamici commented on Apr 11, 2021

    @alexamici
    CollaboratorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions