malevich-coretools 0.3.69__py3-none-any.whl → 0.3.70__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 malevich-coretools might be problematic. Click here for more details.
- malevich_coretools/abstract/abstract.py +4 -0
- malevich_coretools/funcs/funcs.py +23 -6
- malevich_coretools/secondary/const.py +3 -1
- malevich_coretools/utils.py +95 -4
- {malevich_coretools-0.3.69.dist-info → malevich_coretools-0.3.70.dist-info}/METADATA +1 -1
- {malevich_coretools-0.3.69.dist-info → malevich_coretools-0.3.70.dist-info}/RECORD +9 -9
- {malevich_coretools-0.3.69.dist-info → malevich_coretools-0.3.70.dist-info}/WHEEL +0 -0
- {malevich_coretools-0.3.69.dist-info → malevich_coretools-0.3.70.dist-info}/licenses/LICENSE +0 -0
- {malevich_coretools-0.3.69.dist-info → malevich_coretools-0.3.70.dist-info}/top_level.txt +0 -0
|
@@ -137,6 +137,10 @@ class Keys(BaseModel):
|
|
|
137
137
|
data: Dict[str, str]
|
|
138
138
|
|
|
139
139
|
|
|
140
|
+
class Statuses(BaseModel):
|
|
141
|
+
data: Dict[str, str] # key - runId, value - one of: IN_PROGRESS, SUCCESS, FAILED
|
|
142
|
+
|
|
143
|
+
|
|
140
144
|
class ScaleInfo(BaseModel):
|
|
141
145
|
taskId: Optional[Alias.Id] = None
|
|
142
146
|
appId: Alias.Id
|
|
@@ -1144,20 +1144,20 @@ async def get_run_condition_async(id: str, *args, **kwargs) -> Condition:
|
|
|
1144
1144
|
return model_from_json(await send_to_core_get_async(TEMP_RUN_CONDITION(id), *args, **kwargs), Condition)
|
|
1145
1145
|
|
|
1146
1146
|
|
|
1147
|
-
def get_run_activeRuns(*args, **kwargs) -> ResultIds:
|
|
1148
|
-
return model_from_json(send_to_core_get(TEMP_RUN_ACTIVE_RUNS, *args, **kwargs), ResultIds)
|
|
1147
|
+
def get_run_activeRuns(id: Optional[str], *args, **kwargs) -> ResultIds:
|
|
1148
|
+
return model_from_json(send_to_core_get(TEMP_RUN_ACTIVE_RUNS(id), *args, **kwargs), ResultIds)
|
|
1149
1149
|
|
|
1150
1150
|
|
|
1151
|
-
async def get_run_activeRuns_async(*args, **kwargs) -> ResultIds:
|
|
1152
|
-
return model_from_json(await send_to_core_get_async(TEMP_RUN_ACTIVE_RUNS, *args, **kwargs), ResultIds)
|
|
1151
|
+
async def get_run_activeRuns_async(id: Optional[str], *args, **kwargs) -> ResultIds:
|
|
1152
|
+
return model_from_json(await send_to_core_get_async(TEMP_RUN_ACTIVE_RUNS(id), *args, **kwargs), ResultIds)
|
|
1153
1153
|
|
|
1154
1154
|
|
|
1155
1155
|
def post_run_activeRuns(data: RunsFilter, *args, **kwargs) -> Union[ResultIds, ResultTags]:
|
|
1156
|
-
return model_from_json(send_to_core_modify(TEMP_RUN_ACTIVE_RUNS, data, *args, **kwargs), ResultTags if data.withTags else ResultIds)
|
|
1156
|
+
return model_from_json(send_to_core_modify(TEMP_RUN_ACTIVE_RUNS(None), data, *args, **kwargs), ResultTags if data.withTags else ResultIds)
|
|
1157
1157
|
|
|
1158
1158
|
|
|
1159
1159
|
async def post_run_activeRuns_async(data: RunsFilter, *args, **kwargs) -> Union[ResultIds, ResultTags]:
|
|
1160
|
-
return model_from_json(await send_to_core_modify_async(TEMP_RUN_ACTIVE_RUNS, data, *args, **kwargs), ResultTags if data.withTags else ResultIds)
|
|
1160
|
+
return model_from_json(await send_to_core_modify_async(TEMP_RUN_ACTIVE_RUNS(None), data, *args, **kwargs), ResultTags if data.withTags else ResultIds)
|
|
1161
1161
|
|
|
1162
1162
|
|
|
1163
1163
|
def get_run_mainTaskCfg(id: str, *args, **kwargs) -> MainTaskCfg:
|
|
@@ -1183,6 +1183,23 @@ def get_run_operationsIds(task_id: str, cfg_id: Optional[str]=None, *args, **kwa
|
|
|
1183
1183
|
async def get_run_operationsIds_async(task_id: str, cfg_id: Optional[str]=None, *args, **kwargs) -> ResultIds:
|
|
1184
1184
|
return model_from_json(await send_to_core_get_async(TEMP_RUN_OPERATIONS_IDS(task_id, cfg_id), *args, **kwargs), ResultIds)
|
|
1185
1185
|
|
|
1186
|
+
|
|
1187
|
+
def get_run_statuses(id: str, *args, **kwargs) -> Statuses:
|
|
1188
|
+
return model_from_json(send_to_core_get(TEMP_RUN_STATUSES(id), *args, **kwargs), Statuses)
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
async def get_run_statuses_async(id: str, *args, **kwargs) -> Statuses:
|
|
1192
|
+
return model_from_json(await send_to_core_get_async(TEMP_RUN_STATUSES(id), *args, **kwargs), Statuses)
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
def get_run_status(id: str, run_id: str, *args, **kwargs) -> str:
|
|
1196
|
+
return send_to_core_get(TEMP_RUN_STATUS(id, run_id), *args, **kwargs, is_text=True)
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
async def get_run_status_async(id: str, run_id: str, *args, **kwargs) -> str:
|
|
1200
|
+
return await send_to_core_get_async(TEMP_RUN_STATUS(id, run_id), *args, **kwargs, is_text=True)
|
|
1201
|
+
|
|
1202
|
+
|
|
1186
1203
|
# AdminController
|
|
1187
1204
|
|
|
1188
1205
|
|
|
@@ -164,10 +164,12 @@ OPERATION_RESULTS_ID = lambda id, wait: with_wait(f"{OPERATION_RESULTS_MAIN}/{ur
|
|
|
164
164
|
## TempRunController
|
|
165
165
|
TEMP_RUN_MAIN = f"{API_VERSION}/run"
|
|
166
166
|
TEMP_RUN_CONDITION = lambda operationId: f"{TEMP_RUN_MAIN}/condition/{urllib.parse.quote(str(operationId), safe='')}"
|
|
167
|
-
TEMP_RUN_ACTIVE_RUNS = f"{TEMP_RUN_MAIN}/activeRuns"
|
|
167
|
+
TEMP_RUN_ACTIVE_RUNS = lambda operationId: with_key_values(f"{TEMP_RUN_MAIN}/activeRuns", {"operationId": operationId})
|
|
168
168
|
TEMP_RUN_MAIN_TASK_CFG = lambda operationId: f"{TEMP_RUN_MAIN}/mainTaskCfg/{urllib.parse.quote(str(operationId), safe='')}"
|
|
169
169
|
TEMP_RUN_MAIN_PIPELINE_CFG = lambda operationId: f"{TEMP_RUN_MAIN}/mainPipelineCfg/{urllib.parse.quote(str(operationId), safe='')}"
|
|
170
170
|
TEMP_RUN_OPERATIONS_IDS = lambda taskId, cfgId: f"{TEMP_RUN_MAIN}/operationsIds/{urllib.parse.quote(str(taskId), safe='')}" if cfgId is None else f"{TEMP_RUN_MAIN}/operationsIds/{urllib.parse.quote(str(taskId), safe='')}/{urllib.parse.quote(str(cfgId), safe='')}"
|
|
171
|
+
TEMP_RUN_STATUSES = lambda operationId: f"{TEMP_RUN_MAIN}/statuses/{urllib.parse.quote(str(operationId), safe='')}"
|
|
172
|
+
TEMP_RUN_STATUS = lambda operationId, runId: f"{TEMP_RUN_MAIN}/statuses/{urllib.parse.quote(str(operationId), safe='')}/{urllib.parse.quote(str(runId), safe='')}"
|
|
171
173
|
|
|
172
174
|
## AdminController
|
|
173
175
|
ADMIN_MAIN = f"{API_VERSION}/admin"
|
malevich_coretools/utils.py
CHANGED
|
@@ -6581,6 +6581,7 @@ def get_run_condition(
|
|
|
6581
6581
|
def get_run_active_runs(
|
|
6582
6582
|
tags: Optional[Dict[str, str]] = None,
|
|
6583
6583
|
with_tags: bool = False,
|
|
6584
|
+
id: Optional[str] = None,
|
|
6584
6585
|
*,
|
|
6585
6586
|
auth: Optional[AUTH] = None,
|
|
6586
6587
|
conn_url: Optional[str] = None,
|
|
@@ -6594,6 +6595,7 @@ def get_run_active_runs(
|
|
|
6594
6595
|
def get_run_active_runs(
|
|
6595
6596
|
tags: Optional[Dict[str, str]] = None,
|
|
6596
6597
|
with_tags: bool = False,
|
|
6598
|
+
id: Optional[str] = None,
|
|
6597
6599
|
*,
|
|
6598
6600
|
auth: Optional[AUTH] = None,
|
|
6599
6601
|
conn_url: Optional[str] = None,
|
|
@@ -6606,16 +6608,18 @@ def get_run_active_runs(
|
|
|
6606
6608
|
def get_run_active_runs(
|
|
6607
6609
|
tags: Optional[Dict[str, str]] = None,
|
|
6608
6610
|
with_tags: bool = False,
|
|
6611
|
+
id: Optional[str] = None,
|
|
6609
6612
|
*,
|
|
6610
6613
|
auth: Optional[AUTH] = None,
|
|
6611
6614
|
conn_url: Optional[str] = None,
|
|
6612
6615
|
batcher: Optional[Batcher] = None,
|
|
6613
6616
|
is_async: bool = False,
|
|
6614
6617
|
) -> Union[ResultIds, ResultTags, Coroutine[Any, Any, ResultIds], Coroutine[Any, Any, ResultTags]]:
|
|
6615
|
-
"""return list running operationIds, filter by tags if set, return id -> tags if with_tags"""
|
|
6618
|
+
"""return list running operationIds, filter by tags if set, return id -> tags if with_tags; if operation `id` set - return runIds"""
|
|
6616
6619
|
if batcher is None:
|
|
6617
6620
|
batcher = Config.BATCHER
|
|
6618
6621
|
if tags is not None or with_tags:
|
|
6622
|
+
assert id is None, "id should be None in this case"
|
|
6619
6623
|
data = RunsFilter(data=tags, withTags=with_tags)
|
|
6620
6624
|
if batcher is not None:
|
|
6621
6625
|
return batcher.add("postActiveRuns", data=data, result_model=ResultTags if with_tags else ResultIds)
|
|
@@ -6624,10 +6628,10 @@ def get_run_active_runs(
|
|
|
6624
6628
|
return f.post_run_activeRuns(data, auth=auth, conn_url=conn_url)
|
|
6625
6629
|
else:
|
|
6626
6630
|
if batcher is not None:
|
|
6627
|
-
return batcher.add("getActiveRuns", result_model=ResultIds)
|
|
6631
|
+
return batcher.add("getActiveRuns", vars={"operationId": id}, result_model=ResultIds)
|
|
6628
6632
|
if is_async:
|
|
6629
|
-
return f.get_run_activeRuns_async(auth=auth, conn_url=conn_url)
|
|
6630
|
-
return f.get_run_activeRuns(auth=auth, conn_url=conn_url)
|
|
6633
|
+
return f.get_run_activeRuns_async(id, auth=auth, conn_url=conn_url)
|
|
6634
|
+
return f.get_run_activeRuns(id, auth=auth, conn_url=conn_url)
|
|
6631
6635
|
|
|
6632
6636
|
|
|
6633
6637
|
@overload
|
|
@@ -6762,6 +6766,93 @@ def get_task_runs(
|
|
|
6762
6766
|
return f.get_run_operationsIds(task_id, cfg_id, auth=auth, conn_url=conn_url)
|
|
6763
6767
|
|
|
6764
6768
|
|
|
6769
|
+
@overload
|
|
6770
|
+
def get_run_statuses(
|
|
6771
|
+
id: str,
|
|
6772
|
+
*,
|
|
6773
|
+
auth: Optional[AUTH] = None,
|
|
6774
|
+
conn_url: Optional[str] = None,
|
|
6775
|
+
batcher: Optional[Batcher] = None,
|
|
6776
|
+
is_async: Literal[False] = False,
|
|
6777
|
+
) -> Statuses:
|
|
6778
|
+
pass
|
|
6779
|
+
|
|
6780
|
+
|
|
6781
|
+
@overload
|
|
6782
|
+
def get_run_statuses(
|
|
6783
|
+
id: str,
|
|
6784
|
+
*,
|
|
6785
|
+
auth: Optional[AUTH] = None,
|
|
6786
|
+
conn_url: Optional[str] = None,
|
|
6787
|
+
batcher: Optional[Batcher] = None,
|
|
6788
|
+
is_async: Literal[True],
|
|
6789
|
+
) -> Coroutine[Any, Any, Statuses]:
|
|
6790
|
+
pass
|
|
6791
|
+
|
|
6792
|
+
|
|
6793
|
+
def get_run_statuses(
|
|
6794
|
+
id: str,
|
|
6795
|
+
*,
|
|
6796
|
+
auth: Optional[AUTH] = None,
|
|
6797
|
+
conn_url: Optional[str] = None,
|
|
6798
|
+
batcher: Optional[Batcher] = None,
|
|
6799
|
+
is_async: bool = False,
|
|
6800
|
+
) -> Union[Statuses, Coroutine[Any, Any, Statuses]]:
|
|
6801
|
+
"""return runs statuses by operation `id`"""
|
|
6802
|
+
if batcher is None:
|
|
6803
|
+
batcher = Config.BATCHER
|
|
6804
|
+
if batcher is not None:
|
|
6805
|
+
return batcher.add("getStatuses", vars={"operationId": id}, result_model=Statuses)
|
|
6806
|
+
if is_async:
|
|
6807
|
+
return f.get_run_statuses_async(id, auth=auth, conn_url=conn_url)
|
|
6808
|
+
return f.get_run_statuses(id, auth=auth, conn_url=conn_url)
|
|
6809
|
+
|
|
6810
|
+
|
|
6811
|
+
@overload
|
|
6812
|
+
def get_run_status(
|
|
6813
|
+
id: str,
|
|
6814
|
+
run_id: str,
|
|
6815
|
+
*,
|
|
6816
|
+
auth: Optional[AUTH] = None,
|
|
6817
|
+
conn_url: Optional[str] = None,
|
|
6818
|
+
batcher: Optional[Batcher] = None,
|
|
6819
|
+
is_async: Literal[False] = False,
|
|
6820
|
+
) -> str:
|
|
6821
|
+
pass
|
|
6822
|
+
|
|
6823
|
+
|
|
6824
|
+
@overload
|
|
6825
|
+
def get_run_status(
|
|
6826
|
+
id: str,
|
|
6827
|
+
run_id: str,
|
|
6828
|
+
*,
|
|
6829
|
+
auth: Optional[AUTH] = None,
|
|
6830
|
+
conn_url: Optional[str] = None,
|
|
6831
|
+
batcher: Optional[Batcher] = None,
|
|
6832
|
+
is_async: Literal[True],
|
|
6833
|
+
) -> Coroutine[Any, Any, str]:
|
|
6834
|
+
pass
|
|
6835
|
+
|
|
6836
|
+
|
|
6837
|
+
def get_run_status(
|
|
6838
|
+
id: str,
|
|
6839
|
+
run_id: str,
|
|
6840
|
+
*,
|
|
6841
|
+
auth: Optional[AUTH] = None,
|
|
6842
|
+
conn_url: Optional[str] = None,
|
|
6843
|
+
batcher: Optional[Batcher] = None,
|
|
6844
|
+
is_async: bool = False,
|
|
6845
|
+
) -> Union[str, Coroutine[Any, Any, str]]:
|
|
6846
|
+
"""return run status by operation `id` and `run_id`: one of: IN_PROGRESS, SUCCESS, FAILED"""
|
|
6847
|
+
if batcher is None:
|
|
6848
|
+
batcher = Config.BATCHER
|
|
6849
|
+
if batcher is not None:
|
|
6850
|
+
return batcher.add("getStatusesOne", vars={"operationId": id, "runId": run_id})
|
|
6851
|
+
if is_async:
|
|
6852
|
+
return f.get_run_status_async(id, run_id, auth=auth, conn_url=conn_url)
|
|
6853
|
+
return f.get_run_status(id, run_id, auth=auth, conn_url=conn_url)
|
|
6854
|
+
|
|
6855
|
+
|
|
6765
6856
|
# Manager
|
|
6766
6857
|
|
|
6767
6858
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
malevich_coretools/__init__.py,sha256=0WUBUhATgnU3tctwv0AxzvRr0zRlW6V5INQljBCLRzo,172
|
|
2
2
|
malevich_coretools/dm_utils.py,sha256=WvjtqVaAiwahej-oMnB5JJKFiAcTRiyNStDu0WpifHs,4775
|
|
3
|
-
malevich_coretools/utils.py,sha256=
|
|
3
|
+
malevich_coretools/utils.py,sha256=L78iGAY6mXcJe5_X7083hEyp4uJOLFzWpAC6BEPAQUc,289737
|
|
4
4
|
malevich_coretools/abstract/__init__.py,sha256=6vQ08c8HPYyT_pPkKlc-EwQKE8xG3HTEo2p_GiI5rik,142
|
|
5
|
-
malevich_coretools/abstract/abstract.py,sha256=
|
|
5
|
+
malevich_coretools/abstract/abstract.py,sha256=UMxEcfr83RhS3t6bxWguL1A2n18YpXyWXX5Xg3kvQs4,17952
|
|
6
6
|
malevich_coretools/abstract/operations.py,sha256=cWlo2xzW-rzkTInzpDjBYeL68KfLYqSpZJRzCQ4OzjA,3070
|
|
7
7
|
malevich_coretools/abstract/pipeline.py,sha256=gwVaPZAiV75OCti4wKNusbY8E2XzWyWnh1tngRnH7xk,7664
|
|
8
8
|
malevich_coretools/abstract/statuses.py,sha256=9ISSw_evsylBshLXoU44TCoFOrZm4bXIxyAFFDqdUWc,333
|
|
@@ -13,18 +13,18 @@ malevich_coretools/batch/utils.py,sha256=FRmCYU-zr-RjgT1Mo3CUNcB2mW1t_gKCJazcMx6
|
|
|
13
13
|
malevich_coretools/funcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
malevich_coretools/funcs/checks.py,sha256=Q5pRtRevQrGv_-SMbn2GgYnulhclDLBXdRtbw2QOYKU,223
|
|
15
15
|
malevich_coretools/funcs/dm_funcs.py,sha256=Z0oSzMb9x6N2yANbIICz6erF9fJ5drg3Zheh-_VTPx4,7812
|
|
16
|
-
malevich_coretools/funcs/funcs.py,sha256=
|
|
16
|
+
malevich_coretools/funcs/funcs.py,sha256=L4ifjoaeiisv3btPzGjufG8KzIcqM8GRxUCbgpZGLNU,89799
|
|
17
17
|
malevich_coretools/funcs/helpers.py,sha256=nYbUdtAuSSa9VMr7Oy2y0yvEMLv9EI1jzGq6eynuNLU,13573
|
|
18
18
|
malevich_coretools/secondary/__init__.py,sha256=048HqvG36_1WdDVZK_RuECmaf14Iq2fviUysG1inlaE,78
|
|
19
19
|
malevich_coretools/secondary/config.py,sha256=cjqKiWLm6m1kArOq4DWOHaNxKT_kHP9WUyHVkYe3UeI,487
|
|
20
|
-
malevich_coretools/secondary/const.py,sha256=
|
|
20
|
+
malevich_coretools/secondary/const.py,sha256=r-LOxPDNubvL7T7mnUxeFbSdByTGLR5jC1vdw5lrRbo,16706
|
|
21
21
|
malevich_coretools/secondary/helpers.py,sha256=V5xNv-Rt4SNkthTcNnMtYPjiYfoHmwUR8ApU8qFmzT0,7986
|
|
22
22
|
malevich_coretools/secondary/kafka_utils.py,sha256=SIUnBFyfwsquN6MAUrEkKCw-1l7979Znl7OTQSX2UKo,989
|
|
23
23
|
malevich_coretools/tools/__init__.py,sha256=jDxlCa5Dr6Y43qlI7JwsRAlBkKmFeTHTEnjNUvu-0iw,46
|
|
24
24
|
malevich_coretools/tools/abstract.py,sha256=B1RW1FeNHrQ6r1k-cQZ4k4noCRXkIGt-JUwVoXEDkAg,4466
|
|
25
25
|
malevich_coretools/tools/vast.py,sha256=63tvy70qQV9vnK0eWytlgjBGSnfA7l3kSIDgACBbMMs,12893
|
|
26
|
-
malevich_coretools-0.3.
|
|
27
|
-
malevich_coretools-0.3.
|
|
28
|
-
malevich_coretools-0.3.
|
|
29
|
-
malevich_coretools-0.3.
|
|
30
|
-
malevich_coretools-0.3.
|
|
26
|
+
malevich_coretools-0.3.70.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
27
|
+
malevich_coretools-0.3.70.dist-info/METADATA,sha256=PTHOhAJ6z2Htsq3VYbopw1HHPrhzTq5dDub6j7ZKFC4,347
|
|
28
|
+
malevich_coretools-0.3.70.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
malevich_coretools-0.3.70.dist-info/top_level.txt,sha256=wDX3s1Tso0otBPNrFRfXqyNpm48W4Bp5v6JfbITO2Z8,19
|
|
30
|
+
malevich_coretools-0.3.70.dist-info/RECORD,,
|
|
File without changes
|
{malevich_coretools-0.3.69.dist-info → malevich_coretools-0.3.70.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|