-
Notifications
You must be signed in to change notification settings - Fork 15
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
✨(backends) granular data backends without template pattern #488
✨(backends) granular data backends without template pattern #488
Conversation
ca8f722
to
7da89f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read this up to the tests. I have just a few minor questions/comments for now.
7150453
to
4b073eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c37bf4b
to
88d475a
Compare
We simplify the base data backend interface by moving out the write and list methods. Now, data backends that implement the list and write methods should inherit from Writable and Listable classes.
We want to automatically discover backends in the data/backends sub-directories for CLI and LRS usage. We also now handle import failures gracefully, thus backends with unmet dependencies are excluded.
88d475a
to
1c66674
Compare
Purpose
Currently, not all backends follow the base interface strictly.
This is problematic as we need to know in advance what methods a backend supports for the CLI usage.
Also, we want to automatically discover backends in the data/backends sub-directories for CLI and LRS usage and handle import failures gracefully, to exclude backends with unmet dependencies.
Proposal
BaseDataBackend
interface to allow backends to follow the base interface more strictly.The
write
/list
methods are extracted in separate interfaces (Writable
,Listable
).Thus, by default, a backend only needs to support the
status
/read
andclose
methods, and its functionalitycan be extended by inheriting the
Writable
/Listable
interfaces.Instead of using
BackendSettings
to discover backends we implement aget_backends
function to search for backends in thedata/backends
sub-directories.