esd-services-api-client 2.5.7__py3-none-any.whl → 2.5.9a138.dev3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,4 +17,4 @@
17
17
  Root index.
18
18
  """
19
19
 
20
- __version__ = "2.5.7"
20
+ __version__ = "0.0.0"
@@ -0,0 +1 @@
1
+ __version__ = 'v2.5.9a138.dev3'
@@ -153,14 +153,6 @@ class ForkedAlgorithm(NexusObject[TPayload, AlgorithmResult]):
153
153
  self._get_forks, **self._inputs, **kwargs
154
154
  )()
155
155
 
156
- if len(forks) > 0:
157
- self._logger.info(
158
- "Forking node with: {forks}, after the node run",
159
- forks=",".join([fork.alias() for fork in forks]),
160
- )
161
- else:
162
- self._logger.info("Leaf algorithm node: proceeding with this node run only")
163
-
164
156
  run_result = await partial(
165
157
  _measured_run,
166
158
  **kwargs,
@@ -170,7 +162,15 @@ class ForkedAlgorithm(NexusObject[TPayload, AlgorithmResult]):
170
162
  logger=self._logger,
171
163
  )()
172
164
 
173
- # now await callback scheduling
174
- await asyncio.wait([asyncio.create_task(fork.run(**kwargs)) for fork in forks])
165
+ if len(forks) > 0:
166
+ self._logger.info(
167
+ "Forking node with: {forks}, after the node run",
168
+ forks=",".join([fork.alias() for fork in forks]),
169
+ )
170
+ await asyncio.wait(
171
+ [asyncio.create_task(fork.run(**kwargs)) for fork in forks]
172
+ )
173
+ else:
174
+ self._logger.info("Leaf algorithm node: proceeding with this node run only")
175
175
 
176
176
  return run_result
@@ -32,7 +32,7 @@ from adapta.logs import LoggerInterface
32
32
  from adapta.process_communication import DataSocket
33
33
  from adapta.storage.blob.base import StorageClient
34
34
  from adapta.storage.query_enabled_store import QueryEnabledStore
35
- from injector import Injector
35
+ from injector import Injector, Module
36
36
 
37
37
  import esd_services_api_client.nexus.exceptions
38
38
  from esd_services_api_client.crystal import (
@@ -188,6 +188,13 @@ class Nexus:
188
188
 
189
189
  return self
190
190
 
191
+ def inject_module(self, module: Type[Module]) -> "Nexus":
192
+ """
193
+ Injects a (custom) DI module into the DI container.
194
+ """
195
+ self._configurator = self._configurator.inject_module(module)
196
+ return self
197
+
191
198
  async def _submit_result(
192
199
  self,
193
200
  result: Optional[AlgorithmResult] = None,
@@ -255,6 +255,13 @@ class ServiceConfigurator:
255
255
  """
256
256
  return self._injection_binds
257
257
 
258
+ def inject_module(self, module: Type[Module]) -> "ServiceConfigurator":
259
+ """
260
+ Injects a (custom) module into the DI container.
261
+ """
262
+ self._injection_binds.append(module())
263
+ return self
264
+
258
265
  def with_input_reader(self, reader: Type[InputReader]) -> "ServiceConfigurator":
259
266
  """
260
267
  Adds the input reader implementation to the DI.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: esd-services-api-client
3
- Version: 2.5.7
3
+ Version: 2.5.9a138.dev3
4
4
  Summary: Python clients for ESD services
5
5
  License: Apache 2.0
6
6
  Author: ECCO Sneaks & Data
@@ -1,4 +1,5 @@
1
- esd_services_api_client/__init__.py,sha256=PhGjVKAS_FQxR8TaQu4447OjSUl3Czf_okPK3eKyt_c,648
1
+ esd_services_api_client/__init__.py,sha256=4LskDwFuAFMOjHtN3_-71G_VZ4MNfjMJ7wX2cHYxV-0,648
2
+ esd_services_api_client/_version.py,sha256=a609c8nUz5aubAu0ZlKprcHrEJekStaYNBF8Zk4u2mA,32
2
3
  esd_services_api_client/beast/__init__.py,sha256=zNhXcHSP5w4P9quM1XP4oXVJEccvC_VScG41TZ0GzZ8,723
3
4
  esd_services_api_client/beast/v3/__init__.py,sha256=FtumtInoDyCCRE424Llqv8QZLRuwXzj-smyfu1od1nc,754
4
5
  esd_services_api_client/beast/v3/_connector.py,sha256=VqxiCzJWKERh42aZAIphzmOEG5cdOcKM0DQzG7eQ_-8,11479
@@ -26,14 +27,14 @@ esd_services_api_client/nexus/algorithms/__init__.py,sha256=v4rPDf36r6AaHi_3K8is
26
27
  esd_services_api_client/nexus/algorithms/_baseline_algorithm.py,sha256=KUBkfDKIuxfa7IcVKau10ZZLIwrLbvVkNHjuIGkdjlQ,2947
27
28
  esd_services_api_client/nexus/algorithms/_remote_algorithm.py,sha256=uQFoUfgATcoPDHakVChxTtAYY51ov7tOizkLRlofebA,3962
28
29
  esd_services_api_client/nexus/algorithms/distributed.py,sha256=vkKSCsd480RKwrtu3uZ2iU1bh593fkgBcOBrcb9cLjA,1702
29
- esd_services_api_client/nexus/algorithms/forked_algorithm.py,sha256=vD711cyGUmyiBXPPEh5DnZ8ID9bygtqGvp7sTRfEMnI,5880
30
+ esd_services_api_client/nexus/algorithms/forked_algorithm.py,sha256=VLKKNJvTa5rNjRFWCMk5w0ZZ8-4JoNegY7ldvVzMGDo,5873
30
31
  esd_services_api_client/nexus/algorithms/minimalistic.py,sha256=tSYXodIW-_Aje-_ZyYUoWAThcZIeE4_kMvMINsT4Lb8,1644
31
32
  esd_services_api_client/nexus/algorithms/recursive.py,sha256=uaCCl4q-st_KqbcmkdOJedJ0nAjbJvn6jdZEdW0_0ss,2007
32
33
  esd_services_api_client/nexus/configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
34
  esd_services_api_client/nexus/configurations/algorithm_configuration.py,sha256=eE7diX2PATCGkmqhvFOcZwXrr6vns4fqnJGmgNvhhZM,1091
34
35
  esd_services_api_client/nexus/core/__init__.py,sha256=sOgKKq3_LZGbLmQMtMS7lDw2hv027qownTmNIRV0BB8,627
35
- esd_services_api_client/nexus/core/app_core.py,sha256=PXFXCmg1_0MMQw0s0F2sT-AHUA9eWO4cFSdMLlvPCoc,12144
36
- esd_services_api_client/nexus/core/app_dependencies.py,sha256=dDmgPBJbPzvAWAkKCSPKT1i5fP5cAPDxVL6K27Bp_nI,8561
36
+ esd_services_api_client/nexus/core/app_core.py,sha256=F-XCIEXZXjxyZMWrdC0eAIbYesia38-pODQY4fpTHfI,12389
37
+ esd_services_api_client/nexus/core/app_dependencies.py,sha256=Jn-8sIJ1vda4D6My2x12a5B8hZYlO-RmBy5TpHp29qs,8786
37
38
  esd_services_api_client/nexus/core/serializers.py,sha256=Vk9FaEeDHXx3S7rPlYoWzsOcN6gzLzemsrjq6ytfaI0,2217
38
39
  esd_services_api_client/nexus/exceptions/__init__.py,sha256=feN33VdqB5-2bD9aJesJl_OlsKrNNo3hZCnQgKuaU9k,696
39
40
  esd_services_api_client/nexus/exceptions/_nexus_error.py,sha256=QvtY38mNoIA6t26dUN6UIsaPfljhtVNsbQVS7ksMb-Q,895
@@ -47,7 +48,7 @@ esd_services_api_client/nexus/input/payload_reader.py,sha256=Kq0xN1Shyqv71v6Ykcr
47
48
  esd_services_api_client/nexus/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
49
  esd_services_api_client/nexus/telemetry/recorder.py,sha256=j4x-wOSNZHkFco-ENlKtSm22d4WGHmuzKMnzvGQAtlQ,4849
49
50
  esd_services_api_client/nexus/telemetry/user_telemetry_recorder.py,sha256=NOcb2l1SkMHinBXSrfbiBZSpufzhBWkuh3Px3NXrkcg,4997
50
- esd_services_api_client-2.5.7.dist-info/LICENSE,sha256=0gS6zXsPp8qZhzi1xaGCIYPzb_0e8on7HCeFJe8fOpw,10693
51
- esd_services_api_client-2.5.7.dist-info/METADATA,sha256=th3pKc1Wt8UGMUyvIXlPlxvLVb7GdefmwT52UP2lydg,1164
52
- esd_services_api_client-2.5.7.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
53
- esd_services_api_client-2.5.7.dist-info/RECORD,,
51
+ esd_services_api_client-2.5.9a138.dev3.dist-info/LICENSE,sha256=0gS6zXsPp8qZhzi1xaGCIYPzb_0e8on7HCeFJe8fOpw,10693
52
+ esd_services_api_client-2.5.9a138.dev3.dist-info/METADATA,sha256=nl8sNRBcGfAiKzRY6J7_4ktk6hq4RSc5lFS8mt35Yy8,1173
53
+ esd_services_api_client-2.5.9a138.dev3.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
54
+ esd_services_api_client-2.5.9a138.dev3.dist-info/RECORD,,