-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new core interface
ETLProtocolSupplier
whose purpose is to su…
…pply `ETLProtocol` instances. As a result of this, add `ETLProtocolSupplier` implementations on some of the mods such as `common` and `idr_server`. The implementations on the `common` mod serve as utilities that add the ability to load `ETLProtocol` instances defined on the config either as factory functions that return said instances or either as a dictionary of key value pairs that can be assembeled into an `ETLProtocol` instance. The implementation on the `idr_server` mod returns `ETLProtocol` instances that work with the idr_server such as the fahari ya jamii cbs protocol. The `runtime` mod has also being refactored to allow the loading of `ETLProtocol` instances as package entry points. The import functions on the `module_loading` package have also being refactored to use the `EntryPoint.load` method to load new modules.
- Loading branch information
1 parent
7937f46
commit 7b3b132
Showing
18 changed files
with
526 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
from .etl_protocol import SimpleETLProtocol | ||
from .etl_protocol import ( | ||
FromDefinitionsETLProtocolSupplier, | ||
FromFactoriesETLProtocolSupplier, | ||
SimpleETLProtocol, | ||
) | ||
|
||
__all__ = [ | ||
"FromDefinitionsETLProtocolSupplier", | ||
"FromFactoriesETLProtocolSupplier", | ||
"SimpleETLProtocol", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
from .config import LocationIDInitializer, LocationNameInitializer | ||
from .config import * # noqa: F403 | ||
from .config import __all__ as _all_config | ||
|
||
__all__ = [ | ||
"LocationIDInitializer", | ||
"LocationNameInitializer", | ||
] | ||
__all__ = [] | ||
__all__ += _all_config # type: ignore |
20 changes: 20 additions & 0 deletions
20
app/mods/common/src/sghi/idr/client/common/lib/config/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from .etl_protocols_config import ( | ||
ETL_PROTOCOL_DEFINITIONS_CONFIG_KEY, | ||
ETL_PROTOCOL_FACTORIES_CONFIG_KEY, | ||
ETLProtocolDefinitionsInitializer, | ||
ETLProtocolFactoriesInitializer, | ||
ETLProtocolFactory, | ||
ProtocolDefinition, | ||
) | ||
from .location_config import LocationIDInitializer, LocationNameInitializer | ||
|
||
__all__ = [ | ||
"ETL_PROTOCOL_DEFINITIONS_CONFIG_KEY", | ||
"ETL_PROTOCOL_FACTORIES_CONFIG_KEY", | ||
"ETLProtocolDefinitionsInitializer", | ||
"ETLProtocolFactory", | ||
"ETLProtocolFactoriesInitializer", | ||
"LocationIDInitializer", | ||
"LocationNameInitializer", | ||
"ProtocolDefinition", | ||
] |
Oops, something went wrong.