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

support entrypoints? #290

Closed
martindurant opened this issue Oct 20, 2021 · 0 comments · Fixed by #300
Closed

support entrypoints? #290

martindurant opened this issue Oct 20, 2021 · 0 comments · Fixed by #300

Comments

@martindurant
Copy link
Member

Currently, this package has a fixed set of known codecs, which are all implemented right here. It is possible for other packages to register codecs, but this is done by external code (e.g., imagecodecs.numcodecs.register_codecs). This means, that if you try to load a zarr dataset that needs one of those, but you haven't made the right import first (including on all dask workers, if distributed), you'll get a mysterious missing codec error.

I propose that we allow for a plugin system, as Intake and fsspec do, so that a package can declare any codecs it has in the package metadata (setup.py), and numcodecs is able to import that package on demand. This should be lazy, so we don't import more than we need to, and existing functionality is unaffected. Then, users only need make sure that the providing package is in the environment, a much easier ask.
Example entrypoint declaration: Intake , adlfs

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.

1 participant