UncountablePythonSDK 0.0.15__py3-none-any.whl → 0.0.16__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.

Potentially problematic release.


This version of UncountablePythonSDK might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: UncountablePythonSDK
3
- Version: 0.0.15
3
+ Version: 0.0.16
4
4
  Summary: Uncountable SDK
5
5
  Project-URL: Homepage, https://github.com/uncountableinc/uncountable-python-sdk
6
6
  Project-URL: Repository, https://github.com/uncountableinc/uncountable-python-sdk.git
@@ -80,7 +80,7 @@ uncountable/integration/types.py,sha256=n9idu2_qHOA5CQdE6NK8HS6aZ8ugTZKTfTTnm4sy
80
80
  uncountable/integration/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
81
  uncountable/integration/db/connect.py,sha256=iI9e8a2hfbFP-dvH0MGLsrG-RpM0dHKCL-oCLkah9hs,181
82
82
  uncountable/integration/executors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
- uncountable/integration/executors/script_executor.py,sha256=l_mniGlS9Ni6FdmspN7bvMWVocOaXKCo8FM9SFW8n8c,600
83
+ uncountable/integration/executors/script_executor.py,sha256=6oMPAFe0PUdqt76e8jMi4vXszGVsVHLULob7Qbl3o38,816
84
84
  uncountable/types/__init__.py,sha256=SbBDFhHu5iqnvnYjWCBOkjg3_mXuaBHEGfnq021wfHw,3873
85
85
  uncountable/types/base.py,sha256=7yMC3sCQ13wd92896Ga2XbZffCqq98SKv09rFGb1ulg,2682
86
86
  uncountable/types/calculations.py,sha256=16J-KKMp-I8ZQUkYNmKCHfAn6DGb99cFinALcDIdGHY,562
@@ -139,7 +139,7 @@ uncountable/types/api/recipes/get_recipe_output_metadata.py,sha256=L9s2ykPP4pd02
139
139
  uncountable/types/api/recipes/get_recipes_data.py,sha256=dOKokz6rJp3AiqNrF8rAZFlmJSs3ejdNIJhwKw0Utr0,5317
140
140
  uncountable/types/api/recipes/set_recipe_inputs.py,sha256=sHEwPocBucWRnnoX7nbNaFqdflxFkqdjuVydNezqluY,1326
141
141
  uncountable/types/api/recipes/set_recipe_outputs.py,sha256=QYq39TNchQ80ET1C77OE9fwhbu_HmIoEDmrQJHkkCu0,1609
142
- UncountablePythonSDK-0.0.15.dist-info/METADATA,sha256=mO5xBMNi8X3Ek9wcHUAD8FD-2A3as4klF2PU6R4H2dA,1298
143
- UncountablePythonSDK-0.0.15.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
144
- UncountablePythonSDK-0.0.15.dist-info/top_level.txt,sha256=8ga1DCSWt4Uc_XJ5cR0QrDQuyoeo2uoSzaAJdQT2KBo,36
145
- UncountablePythonSDK-0.0.15.dist-info/RECORD,,
142
+ UncountablePythonSDK-0.0.16.dist-info/METADATA,sha256=XEMklRrImLVb1W7XuCzBmUq-TS3GyYMs4tQc-mfCQb0,1298
143
+ UncountablePythonSDK-0.0.16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
144
+ UncountablePythonSDK-0.0.16.dist-info/top_level.txt,sha256=8ga1DCSWt4Uc_XJ5cR0QrDQuyoeo2uoSzaAJdQT2KBo,36
145
+ UncountablePythonSDK-0.0.16.dist-info/RECORD,,
@@ -1,18 +1,19 @@
1
1
 
2
-
2
+ import os
3
3
  import importlib
4
4
  import inspect
5
5
  from uncountable.integration.job import Job
6
- from uncountable.integration.types import JobExecutorScript
6
+ from uncountable.integration.types import JobExecutorScript, ProfileMetadata
7
7
 
8
8
 
9
- def resolve_script_executor(executor: JobExecutorScript) -> type[Job]:
10
- job_module = importlib.import_module(executor.import_path)
9
+ def resolve_script_executor(executor: JobExecutorScript, profile_metadata: ProfileMetadata) -> type[Job]:
10
+ job_module_path = ".".join([os.environ["UNC_PROFILES_MODULE"], profile_metadata.name, executor.import_path])
11
+ job_module = importlib.import_module(job_module_path)
11
12
  found_jobs: list[type[Job]] = []
12
13
  for _, job_class in inspect.getmembers(job_module, inspect.isclass):
13
- if Job in job_class.__bases__:
14
+ if getattr(job_class, "_unc_job_registered", False):
14
15
  found_jobs.append(job_class())
15
16
  assert (
16
17
  len(found_jobs) == 1
17
- ), f"expected exactly one job class in {executor.import_path}"
18
+ ), f"expected exactly one job class in {executor.import_path}, found {len(found_jobs)}"
18
19
  return found_jobs[0]