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

Implementation registration #134

Merged
merged 10 commits into from
Aug 28, 2023
Merged

Conversation

ap--
Copy link
Collaborator

@ap-- ap-- commented Aug 20, 2023

Close #99

This PR adds:

  • upath.registry.available_implementations() which returns a list of protocols for all available UPath implementations
  • upath.registry.register_implementation() which let's a user register a UPath subclass and it's corresponding protocol dynamically

and it adds an "universal_pathlib.implementations" entry point, that let's users register their custom UPath subclasses dynamically via their package metadata.

@ap-- ap-- force-pushed the implementation-registration branch from a7e2122 to a8e0e78 Compare August 28, 2023 18:52
@ap--
Copy link
Collaborator Author

ap-- commented Aug 28, 2023

Any concerns regarding this PR @normanrz ?

I think it'll help a few users out there, that are currently registering custom implementations via modifying the private _registry.known_implementations map.

Copy link
Collaborator

@normanrz normanrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it!

@ap-- ap-- merged commit 7dbad11 into fsspec:main Aug 28, 2023
14 checks passed
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 this pull request may close these issues.

Add ability to register custom UPath implementations
2 participants