Skip to content

Make readers pluggable via entrypoint system #245

@TomNicholas

Description

@TomNicholas

We could make an entrypoint system for virtualizarr, in addition to plugging in to xarray's backend entrypoint system. That would allow this syntax for creating virtual xr.Dataset objects containing ManifestArrays, e.g.

vds = vz.open_virtual_dataset(grib_paths, reader='hypergrib')

(as suggested in #238)

This would allow users to freely create their own virtual readers / metadata parsers (whatever we call them #239) to deal with their own gnarly file formats, without requiring upstream contributions. This model for extendability has worked very well for xarray, and it's completely analogous to the problem we have here.

If we combined this with #35, we would then have a virtualizarr xarray backend entrypoint, which calls out to specific virtualizarr readers via another entrypoint. That would allow this syntax.

vds = xr.open_dataset(grib_paths, engine='virtualizarr', reader='hypergrib')

I think we should make the entrypoint system in virtualizarr first before we decide if entrypoints calling entrypoints is actually a good idea... 🐶

cc @ayushnag

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions