Skip to content

re-factor ObjectStore module to better use reflection #12

@jeanetteclark

Description

@jeanetteclark

Currently, if we were to add another object store to the ObjectStore interface we would have to change code in the StoreManager class. This isn't ideal, but it is okay for now while we only have one implementation of the abstract ObjectStore. In the future, we might want to rewrite the StoreManager __init__ to include something like the below:

import importlib
module = importlib.import_module(module_name)
class_ = getattr(module, class_name)
instance = class_()

Where the module_name and class_name are passed via configuration. This would allow us to add new implementations more easily.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions