You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As seen in df/base.py, we want to make the Source class and its children follow the same design pattern.
classBaseSourceContext(abc.ABC):
''' Abstract Base Class for context managing a Source '''asyncdef__aenter__(self) ->'BaseSourceContext':
returnselfasyncdef__aexit__(self, exc_type, exc_value, traceback):
passclassBaseSource(Entrypoint):
''' Abstract Base Class for a Source '''ENTRY_POINT='dffml.source'def__init__(self, config: BaseConfig) ->None:
self.config=configself.logger=LOGGER.getChild(self.__class__.__qualname__)
@classmethod@abc.abstractmethoddefargs(cls) ->Dict[str, Arg]:
pass@classmethod@abc.abstractmethoddefconfig(cls, cmd: CMD):
pass@abc.abstractmethoddef__call__(self) ->'BaseSourceContext':
returnBaseISourceContext(self)
CMD will need to change to resemble DataFlowFacilitatorCMD as well.
As seen in
df/base.py
, we want to make theSource
class and its children follow the same design pattern.CMD
will need to change to resembleDataFlowFacilitatorCMD
as well.dffml/dffml/util/cli/cmd.py
Lines 130 to 193 in bf3493e
Related:
dffml/dffml/source/source.py
Lines 66 to 69 in bf3493e
The text was updated successfully, but these errors were encountered: