xarray icon indicating copy to clipboard operation
xarray copied to clipboard

Backend entrypoints not public?

Open Illviljan opened this issue 1 year ago • 0 comments

What is your issue?

As I've understood it ZarrBackendEntrypoint is the engine used when loading zarr-files. But for some reason we show ZarrStore in xr.backends. I believe the ZarrStore class is supposed to be just a implementation detail, right?

# The available engines:
xr.backends.list_engines()
Out[23]: 
{'netcdf4': <xarray.backends.netCDF4_.NetCDF4BackendEntrypoint object at 0x00000296D05D11F0>,
 'h5netcdf': <xarray.backends.h5netcdf_.H5netcdfBackendEntrypoint object at 0x00000296D05D14C0>,
 'scipy': <xarray.backends.scipy_.ScipyBackendEntrypoint object at 0x00000296D05D11C0>,
 'pseudonetcdf': <xarray.backends.pseudonetcdf_.PseudoNetCDFBackendEntrypoint object at 0x00000296D05D1430>,
 'pydap': <xarray.backends.pydap_.PydapBackendEntrypoint object at 0x00000296D05D1310>,
 'store': <xarray.backends.store.StoreBackendEntrypoint object at 0x00000296D05D1340>,
 'zarr': <xarray.backends.zarr.ZarrBackendEntrypoint object at 0x00000296D05D12E0>}

# The public class is ZarrStore instead of ZarrBackendEntrypoint, how come?
dir(xr.backends)
Out[22]: 
['AbstractDataStore',
 'BackendArray',
 'BackendEntrypoint',
 'CachingFileManager',
 'CfGribDataStore',
 'DummyFileManager',
 'FileManager',
 'H5NetCDFStore',
 'InMemoryDataStore',
 'NetCDF4DataStore',
 'NioDataStore',
 'PseudoNetCDFDataStore',
 'PydapDataStore',
 'ScipyDataStore',
 'ZarrStore',
 '__all__',
 '__builtins__',
 '__cached__',
 '__doc__',
 '__file__',
 '__loader__',
 '__name__',
 '__package__',
 '__path__',
 '__spec__',
 'api',
 'cfgrib_',
 'common',
 'file_manager',
 'h5netcdf_',
 'list_engines',
 'locks',
 'lru_cache',
 'memory',
 'netCDF4_',
 'netcdf3',
 'plugins',
 'pseudonetcdf_',
 'pydap_',
 'pynio_',
 'rasterio_',
 'scipy_',
 'store',
 'zarr']

Illviljan avatar Sep 17 '22 13:09 Illviljan