pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.62k stars 1.08k forks source link

ENH: list_engines function #6577

Open snowman2 opened 2 years ago

snowman2 commented 2 years ago

Is your feature request related to a problem?

It can be difficult to know what engines are available and where they come from. This could help with that.

Describe the solution you'd like

import xarray
xarray.list_engines()

Output:

Name | Description | Documentation
------------------------------------------------
rasterio | Open geospatial files (GeoTiff) | https://corteva.github.io/rioxarray

Describe alternatives you've considered

No response

Additional context

No response

snowman2 commented 2 years ago

Looks like something already exists:

from xarray.backends.plugins import list_engines

It would be nice to add the description & documentation properties to xarray.backends.common.BackendEntrypoint that can be implemented by external libraries (and internally) and a more official list_engines function with the above metadata could be added.

JessicaS11 commented 2 years ago

I'm happy to work on this!

dcherian commented 2 years ago

@pydata/xarray in #7000 we update the docstrings and output for xr.backends.list_engines to be more user-friendly.

Shall we also add a top-level import: xr.show_backends like xr.show_versions. This would be a lot more discoverable.

TomNicholas commented 1 year ago

(I'm looking for issues to tag as beginner-friendly)

Shall we also add a top-level import: xr.show_backends like xr.show_versions. This would be a lot more discoverable.

This is easy right? You could just add an xr.show_backends that points to the same function as xr.backends.list_engines? And point out in the docstring that they are actually the same function?