malevich-coretools 0.3.32__py3-none-any.whl → 0.3.34__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/__init__.py +1 -0
- malevich_coretools/abstract/abstract.py +5 -6
- malevich_coretools/abstract/operations.py +110 -0
- malevich_coretools/abstract/pipeline.py +103 -4
- malevich_coretools/admin/utils.py +1 -1
- malevich_coretools/funcs/funcs.py +12 -4
- malevich_coretools/secondary/const.py +1 -0
- malevich_coretools/utils.py +21 -2
- {malevich_coretools-0.3.32.dist-info → malevich_coretools-0.3.34.dist-info}/METADATA +1 -1
- {malevich_coretools-0.3.32.dist-info → malevich_coretools-0.3.34.dist-info}/RECORD +13 -12
- {malevich_coretools-0.3.32.dist-info → malevich_coretools-0.3.34.dist-info}/WHEEL +1 -1
- {malevich_coretools-0.3.32.dist-info → malevich_coretools-0.3.34.dist-info}/LICENSE +0 -0
- {malevich_coretools-0.3.32.dist-info → malevich_coretools-0.3.34.dist-info}/top_level.txt +0 -0
|
@@ -209,11 +209,13 @@ class MainPipeline(BaseModel):
|
|
|
209
209
|
withLogs: bool = False
|
|
210
210
|
component: TaskComponent = TaskComponent()
|
|
211
211
|
policy: TaskPolicy = TaskPolicy()
|
|
212
|
+
schedule: Optional[Schedule] = None
|
|
212
213
|
restrictions: Optional[Restrictions] = Restrictions()
|
|
213
214
|
scaleInfo: List[ScaleInfo] = []
|
|
214
215
|
withListener: bool = False
|
|
215
216
|
kafkaModeUrl: Optional[str] = None
|
|
216
217
|
run: bool = True
|
|
218
|
+
synthetic: bool = False
|
|
217
219
|
|
|
218
220
|
|
|
219
221
|
class RunTask(Operation):
|
|
@@ -373,7 +375,7 @@ class AppLog(BaseModel):
|
|
|
373
375
|
data: List[LogsResult]
|
|
374
376
|
|
|
375
377
|
|
|
376
|
-
class
|
|
378
|
+
class PipelineRunInfo(BaseModel):
|
|
377
379
|
conditions: Dict[str, Dict[int, bool]] # condition bindId -> iteration -> value
|
|
378
380
|
fails: Dict[str, List[int]] # bindId -> fail iterations (1 in common situation)
|
|
379
381
|
|
|
@@ -383,7 +385,7 @@ class AppLogs(BaseModel):
|
|
|
383
385
|
dagLogs: str = ""
|
|
384
386
|
data: Dict[str, AppLog] = {}
|
|
385
387
|
error: Optional[str] = None
|
|
386
|
-
pipeline: Optional[
|
|
388
|
+
pipeline: Optional[PipelineRunInfo] = None # only for pipeline
|
|
387
389
|
|
|
388
390
|
|
|
389
391
|
class AppLogsWithResults(AppLogs):
|
|
@@ -454,6 +456,7 @@ class AppFunctionsInfo(BaseModel):
|
|
|
454
456
|
schemes: Dict[Alias.Id, str] = dict()
|
|
455
457
|
inits: Dict[Alias.Id, InitInfo] = dict()
|
|
456
458
|
logs: Optional[str] = None
|
|
459
|
+
version: Optional[str] = None
|
|
457
460
|
instanceInfo: Optional[str] = None # json with info about instance
|
|
458
461
|
|
|
459
462
|
|
|
@@ -471,10 +474,6 @@ class AdminRunInfo(BaseModel):
|
|
|
471
474
|
cfgId: Alias.Id
|
|
472
475
|
|
|
473
476
|
|
|
474
|
-
class AdminRunsInfo(BaseModel):
|
|
475
|
-
data: List[AdminRunInfo]
|
|
476
|
-
|
|
477
|
-
|
|
478
477
|
class OperationOrNone(BaseModel):
|
|
479
478
|
operationId: Optional[Alias.Id] = None
|
|
480
479
|
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
from abc import ABC, abstractmethod
|
|
2
|
+
from typing import Optional, Union
|
|
3
|
+
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class InternalBoolOp(ABC, BaseModel):
|
|
8
|
+
pass
|
|
9
|
+
|
|
10
|
+
@abstractmethod
|
|
11
|
+
def simplify(self) -> 'BoolOp':
|
|
12
|
+
pass
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class BoolOp(ABC, BaseModel):
|
|
16
|
+
pass
|
|
17
|
+
|
|
18
|
+
@abstractmethod
|
|
19
|
+
def internal(self) -> InternalBoolOp:
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Value(BaseModel):
|
|
24
|
+
bindId: str
|
|
25
|
+
result: bool
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class BoolOpOrValue(BaseModel):
|
|
29
|
+
# set only one of them
|
|
30
|
+
op: Optional[Union['InternalNot', 'InternalAnd', 'InternalOr']] = None
|
|
31
|
+
value: Optional[Value] = None
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class InternalNot(InternalBoolOp):
|
|
35
|
+
notOp: BoolOpOrValue
|
|
36
|
+
|
|
37
|
+
def simplify(self) -> 'BoolOp':
|
|
38
|
+
return Not(op=value if (value := self.notOp.value) is not None else self.notOp.op.simplify())
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class Not(BoolOp):
|
|
42
|
+
op: Union[BoolOp, Value]
|
|
43
|
+
|
|
44
|
+
def internal(self) -> InternalBoolOp:
|
|
45
|
+
if isinstance(self.op, BoolOp):
|
|
46
|
+
internal_op = BoolOpOrValue(op=self.op.internal())
|
|
47
|
+
else:
|
|
48
|
+
internal_op = BoolOpOrValue(value=self.op)
|
|
49
|
+
return InternalNot(notOp=internal_op)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class InternalAnd(InternalBoolOp):
|
|
53
|
+
andOp: BoolOpOrValue
|
|
54
|
+
andOp2: BoolOpOrValue
|
|
55
|
+
|
|
56
|
+
def simplify(self) -> 'BoolOp':
|
|
57
|
+
return And(
|
|
58
|
+
op=value if (value := self.andOp.value) is not None else self.andOp.op.simplify(),
|
|
59
|
+
op2=value if (value := self.andOp2.value) is not None else self.andOp2.op.simplify()
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class And(BoolOp):
|
|
64
|
+
op: Union[BoolOp, Value]
|
|
65
|
+
op2: Union[BoolOp, Value]
|
|
66
|
+
|
|
67
|
+
def internal(self) -> InternalBoolOp:
|
|
68
|
+
if isinstance(self.op, BoolOp):
|
|
69
|
+
internal_op = BoolOpOrValue(op=self.op.internal())
|
|
70
|
+
else:
|
|
71
|
+
internal_op = BoolOpOrValue(value=self.op)
|
|
72
|
+
|
|
73
|
+
if isinstance(self.op2, BoolOp):
|
|
74
|
+
internal_op2 = BoolOpOrValue(op=self.op2.internal())
|
|
75
|
+
else:
|
|
76
|
+
internal_op2 = BoolOpOrValue(value=self.op2)
|
|
77
|
+
return InternalAnd(andOp=internal_op, andOp2=internal_op2)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class InternalOr(InternalBoolOp):
|
|
81
|
+
orOp: BoolOpOrValue
|
|
82
|
+
orOp2: BoolOpOrValue
|
|
83
|
+
|
|
84
|
+
def simplify(self) -> 'BoolOp':
|
|
85
|
+
return Or(
|
|
86
|
+
op=value if (value := self.orOp.value) is not None else self.orOp.op.simplify(),
|
|
87
|
+
op2=value if (value := self.orOp2.value) is not None else self.orOp2.op.simplify()
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class Or(BoolOp):
|
|
92
|
+
op: Union[BoolOp, Value]
|
|
93
|
+
op2: Union[BoolOp, Value]
|
|
94
|
+
|
|
95
|
+
def internal(self) -> InternalBoolOp:
|
|
96
|
+
if isinstance(self.op, BoolOp):
|
|
97
|
+
internal_op = BoolOpOrValue(op=self.op.internal())
|
|
98
|
+
else:
|
|
99
|
+
internal_op = BoolOpOrValue(value=self.op)
|
|
100
|
+
|
|
101
|
+
if isinstance(self.op2, BoolOp):
|
|
102
|
+
internal_op2 = BoolOpOrValue(op=self.op2.internal())
|
|
103
|
+
else:
|
|
104
|
+
internal_op2 = BoolOpOrValue(value=self.op2)
|
|
105
|
+
return InternalOr(orOp=internal_op, orOp2=internal_op2)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def operations_test() -> None:
|
|
109
|
+
op = And(op=Or(op=Not(op=Value(bindId="cond", result=True)), op2=Value(bindId="cond2", result=False)), op2=Value(bindId="proc"))
|
|
110
|
+
assert op == op.internal().simplify(), "fail: operations"
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
from enum import IntEnum
|
|
2
|
-
from typing import Dict, List, Optional
|
|
2
|
+
from typing import Dict, List, Optional, Union
|
|
3
3
|
|
|
4
4
|
from pydantic import BaseModel
|
|
5
5
|
|
|
6
|
-
from malevich_coretools.abstract import JsonImage
|
|
7
6
|
from malevich_coretools.abstract.abstract import ( # noqa: F401
|
|
7
|
+
AdminRunInfo,
|
|
8
|
+
Alias,
|
|
9
|
+
JsonImage,
|
|
8
10
|
Restrictions,
|
|
9
11
|
ScaleInfo,
|
|
12
|
+
Schedule,
|
|
10
13
|
TaskComponent,
|
|
11
14
|
TaskPolicy,
|
|
12
15
|
)
|
|
16
|
+
from malevich_coretools.abstract.operations import (
|
|
17
|
+
And,
|
|
18
|
+
BoolOp,
|
|
19
|
+
InternalAnd,
|
|
20
|
+
InternalBoolOp,
|
|
21
|
+
InternalNot,
|
|
22
|
+
InternalOr,
|
|
23
|
+
Not,
|
|
24
|
+
Or,
|
|
25
|
+
Value,
|
|
26
|
+
)
|
|
13
27
|
|
|
14
28
|
|
|
15
29
|
class PullCollectionPolicy(IntEnum):
|
|
@@ -68,15 +82,36 @@ class AlternativeArgument(BaseArgument):
|
|
|
68
82
|
class AppEntity(BaseModel):
|
|
69
83
|
cfg: Optional[str] = None # local cfg for processor/condition
|
|
70
84
|
arguments: Dict[str, AlternativeArgument] = {} # TODO or List[Argument]?
|
|
71
|
-
conditions: Optional[Dict[str, bool]] = None
|
|
85
|
+
conditions: Optional[Union[Dict[str, bool], List[Dict[str, bool]]]] = None # condition bindId to it result (list - any variant of them)
|
|
86
|
+
conditionsStructure: Optional[Union[Not, And, Or, InternalNot, InternalAnd, InternalOr, Value]] = None # set BoolOp, it transform to internal before send
|
|
72
87
|
|
|
73
88
|
loopArguments: Optional[Dict[str, AlternativeArgument]] = None # other calls, TODO or List[Argument]?, problems
|
|
74
|
-
loopConditions: Optional[Dict[str, bool]] = None
|
|
89
|
+
loopConditions: Optional[Union[Dict[str, bool], List[Dict[str, bool]]]] = None # condition bindId to it result for loop (list - any variant of them)
|
|
90
|
+
loopConditionsStructure: Optional[Union[Not, And, Or, InternalNot, InternalAnd, InternalOr, Value]] = None # set BoolOp, it transform to internal before send
|
|
75
91
|
|
|
76
92
|
image: JsonImage
|
|
77
93
|
platform: str = "base"
|
|
78
94
|
platformSettings: Optional[str] = None
|
|
79
95
|
|
|
96
|
+
def internal(self) -> None:
|
|
97
|
+
assert self.conditions is None or self.conditionsStructure is None, "should be set not more, than one of (conditions, conditionsStructure)"
|
|
98
|
+
assert self.loopConditions is None or self.loopConditionsStructure is None, "should be set not more, than one of (loopConditions, loopConditionsStructure)"
|
|
99
|
+
|
|
100
|
+
if isinstance(self.conditions, Dict):
|
|
101
|
+
self.conditions = [self.conditions]
|
|
102
|
+
if isinstance(self.conditionsStructure, BoolOp):
|
|
103
|
+
self.conditionsStructure = self.conditionsStructure.internal()
|
|
104
|
+
if isinstance(self.loopConditions, Dict):
|
|
105
|
+
self.loopConditions = [self.loopConditions]
|
|
106
|
+
if isinstance(self.loopConditionsStructure, BoolOp):
|
|
107
|
+
self.loopConditionsStructure = self.loopConditionsStructure.internal()
|
|
108
|
+
|
|
109
|
+
def simplify(self) -> None:
|
|
110
|
+
if isinstance(self.conditionsStructure, InternalBoolOp):
|
|
111
|
+
self.conditionsStructure = self.conditionsStructure.simplify()
|
|
112
|
+
if isinstance(self.loopConditionsStructure, InternalBoolOp):
|
|
113
|
+
self.loopConditionsStructure = self.loopConditionsStructure.simplify()
|
|
114
|
+
|
|
80
115
|
|
|
81
116
|
class Processor(AppEntity):
|
|
82
117
|
processorId: str
|
|
@@ -98,3 +133,67 @@ class Pipeline(BaseModel):
|
|
|
98
133
|
conditions: Dict[str, Condition] = {} # bindConditionId to Condition
|
|
99
134
|
results: Dict[str, List[Result]] = {} # bindProcessorId to results
|
|
100
135
|
pullCollectionPolicy: PullCollectionPolicy = PullCollectionPolicy.IF_NOT_EXIST
|
|
136
|
+
|
|
137
|
+
def internal(self) -> 'Pipeline':
|
|
138
|
+
for proc in self.processors.values():
|
|
139
|
+
proc.internal()
|
|
140
|
+
for cond in self.conditions.values():
|
|
141
|
+
cond.internal()
|
|
142
|
+
return self
|
|
143
|
+
|
|
144
|
+
def simplify(self) -> 'Pipeline':
|
|
145
|
+
for proc in self.processors.values():
|
|
146
|
+
proc.simplify()
|
|
147
|
+
for cond in self.conditions.values():
|
|
148
|
+
cond.simplify()
|
|
149
|
+
return self
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class MainPipelineCfg(BaseModel):
|
|
153
|
+
operationId: Alias.Id
|
|
154
|
+
pipelineId: Alias.Id
|
|
155
|
+
processors: Dict[str, Processor]
|
|
156
|
+
conditions: Dict[str, Condition]
|
|
157
|
+
results: Dict[str, List[Result]]
|
|
158
|
+
pullCollectionPolicy: PullCollectionPolicy
|
|
159
|
+
cfg: str
|
|
160
|
+
infoUrl: Optional[str] = None
|
|
161
|
+
debugMode: bool
|
|
162
|
+
coreManage: bool
|
|
163
|
+
kafkaMode: bool
|
|
164
|
+
singleRequest: bool
|
|
165
|
+
tlWithoutData: Optional[int] = None
|
|
166
|
+
waitRuns: bool
|
|
167
|
+
profileMode: Optional[str] = None
|
|
168
|
+
withLogs: bool
|
|
169
|
+
component: TaskComponent
|
|
170
|
+
policy: TaskPolicy
|
|
171
|
+
schedule: Optional[Schedule] = None
|
|
172
|
+
restrictions: Optional[Restrictions] = None
|
|
173
|
+
scaleInfo: List[ScaleInfo]
|
|
174
|
+
schemesNames: List[str]
|
|
175
|
+
login: Optional[Alias.Login] = None
|
|
176
|
+
withListener: bool
|
|
177
|
+
kafkaModeUrl: Optional[str] = None
|
|
178
|
+
run: bool
|
|
179
|
+
synthetic: bool = False
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
class PipelineInfo(BaseModel):
|
|
183
|
+
pipelineId: Alias.Id
|
|
184
|
+
processors: Dict[str, Processor]
|
|
185
|
+
conditions: Dict[str, Condition]
|
|
186
|
+
results: Dict[str, List[Result]]
|
|
187
|
+
cfg: Alias.Json
|
|
188
|
+
login: Alias.Login
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
class AdminRunPipelineInfo(BaseModel):
|
|
192
|
+
operationId: Alias.Id
|
|
193
|
+
pipelineInfo: PipelineInfo
|
|
194
|
+
cfgId: Alias.Id
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class AdminRunsInfo(BaseModel):
|
|
198
|
+
tasks: List[AdminRunInfo]
|
|
199
|
+
pipelines: List[AdminRunPipelineInfo]
|
|
@@ -24,7 +24,7 @@ def admin_get_run_info(
|
|
|
24
24
|
auth: Optional[AUTH] = None,
|
|
25
25
|
conn_url: Optional[str] = None,
|
|
26
26
|
batcher: Optional[Batcher] = None,
|
|
27
|
-
) -> Alias.
|
|
27
|
+
) -> Alias.Json:
|
|
28
28
|
"""return run info by operation `id`"""
|
|
29
29
|
if batcher is None:
|
|
30
30
|
batcher = Config.BATCHER
|
|
@@ -10,7 +10,11 @@ import requests
|
|
|
10
10
|
from requests.models import Response
|
|
11
11
|
|
|
12
12
|
from malevich_coretools.abstract.abstract import * # noqa: F403
|
|
13
|
-
from malevich_coretools.abstract.pipeline import
|
|
13
|
+
from malevich_coretools.abstract.pipeline import (
|
|
14
|
+
AdminRunsInfo,
|
|
15
|
+
MainPipelineCfg,
|
|
16
|
+
Pipeline,
|
|
17
|
+
)
|
|
14
18
|
from malevich_coretools.funcs.checks import check_profile_mode
|
|
15
19
|
from malevich_coretools.secondary import Config, model_from_json, show_logs_func
|
|
16
20
|
from malevich_coretools.secondary.const import * # noqa: F403
|
|
@@ -479,11 +483,11 @@ def get_userPipelines_mapId(id: str, *args, **kwargs) -> Alias.Id:
|
|
|
479
483
|
|
|
480
484
|
|
|
481
485
|
def get_userPipelines_id(id: str, *args, **kwargs) -> Pipeline:
|
|
482
|
-
return model_from_json(send_to_core_get(USER_PIPELINES_ID(id, None), *args, **kwargs), Pipeline)
|
|
486
|
+
return model_from_json(send_to_core_get(USER_PIPELINES_ID(id, None), *args, **kwargs), Pipeline).simplify()
|
|
483
487
|
|
|
484
488
|
|
|
485
489
|
def get_userPipelines_realId(id: str, *args, **kwargs) -> Pipeline:
|
|
486
|
-
return model_from_json(send_to_core_get(USER_PIPELINES_REAL_ID(id), *args, **kwargs), Pipeline)
|
|
490
|
+
return model_from_json(send_to_core_get(USER_PIPELINES_REAL_ID(id), *args, **kwargs), Pipeline).simplify()
|
|
487
491
|
|
|
488
492
|
|
|
489
493
|
def post_userPipelines(data: UserTask, wait: bool, *args, **kwargs) -> Alias.Id:
|
|
@@ -576,6 +580,10 @@ def get_run_mainTaskCfg(id: str, *args, **kwargs) -> MainTaskCfg:
|
|
|
576
580
|
return model_from_json(send_to_core_get(TEMP_RUN_MAIN_TASK_CFG(id), *args, **kwargs), MainTaskCfg)
|
|
577
581
|
|
|
578
582
|
|
|
583
|
+
def get_run_mainPipelineCfg(id: str, *args, **kwargs) -> MainPipelineCfg:
|
|
584
|
+
return model_from_json(send_to_core_get(TEMP_RUN_MAIN_PIPELINE_CFG(id), *args, **kwargs), MainPipelineCfg)
|
|
585
|
+
|
|
586
|
+
|
|
579
587
|
def get_run_operationsIds(task_id: str, cfg_id: Optional[str]=None, *args, **kwargs) -> ResultIds:
|
|
580
588
|
return model_from_json(send_to_core_get(TEMP_RUN_OPERATIONS_IDS(task_id, cfg_id), *args, **kwargs), ResultIds)
|
|
581
589
|
|
|
@@ -586,7 +594,7 @@ def get_admin_runs(*args, **kwargs) -> AdminRunsInfo:
|
|
|
586
594
|
return model_from_json(send_to_core_get(ADMIN_RUNS, *args, **kwargs), AdminRunsInfo)
|
|
587
595
|
|
|
588
596
|
|
|
589
|
-
def get_admin_runs_info(data: OperationOrNone, *args, **kwargs) ->
|
|
597
|
+
def get_admin_runs_info(data: OperationOrNone, *args, **kwargs) -> Alias.Json:
|
|
590
598
|
return send_to_core_modify(ADMIN_RUNS_INFO, data, *args, **kwargs)
|
|
591
599
|
|
|
592
600
|
|
|
@@ -157,6 +157,7 @@ TEMP_RUN_MAIN = f"{API_VERSION}/run"
|
|
|
157
157
|
TEMP_RUN_CONDITION = lambda operationId: f"{TEMP_RUN_MAIN}/condition/{urllib.parse.quote(str(operationId), safe='')}"
|
|
158
158
|
TEMP_RUN_ACTIVE_RUNS = f"{TEMP_RUN_MAIN}/activeRuns"
|
|
159
159
|
TEMP_RUN_MAIN_TASK_CFG = lambda operationId: f"{TEMP_RUN_MAIN}/mainTaskCfg/{urllib.parse.quote(str(operationId), safe='')}"
|
|
160
|
+
TEMP_RUN_MAIN_PIPELINE_CFG = lambda operationId: f"{TEMP_RUN_MAIN}/mainPipelineCfg/{urllib.parse.quote(str(operationId), safe='')}"
|
|
160
161
|
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='')}"
|
|
161
162
|
|
|
162
163
|
## AdminController
|
malevich_coretools/utils.py
CHANGED
|
@@ -2057,7 +2057,7 @@ def create_pipeline(
|
|
|
2057
2057
|
conditions=conditions,
|
|
2058
2058
|
results=results,
|
|
2059
2059
|
pullCollectionPolicy=pull_collection_policy,
|
|
2060
|
-
)
|
|
2060
|
+
).internal()
|
|
2061
2061
|
if batcher is not None:
|
|
2062
2062
|
return batcher.add("postPipeline", data=data)
|
|
2063
2063
|
return f.post_userPipelines(data, wait=wait, auth=auth, conn_url=conn_url)
|
|
@@ -2091,7 +2091,7 @@ def update_pipeline(
|
|
|
2091
2091
|
conditions=conditions,
|
|
2092
2092
|
results=results,
|
|
2093
2093
|
pullCollectionPolicy=pull_collection_policy,
|
|
2094
|
-
)
|
|
2094
|
+
).internal()
|
|
2095
2095
|
if batcher is not None:
|
|
2096
2096
|
return batcher.add("postPipelineById", data=data, vars={"id": id})
|
|
2097
2097
|
return f.post_userPipelines_id(id, data, wait=wait, auth=auth, conn_url=conn_url)
|
|
@@ -2417,6 +2417,21 @@ def get_run_main_task_cfg(
|
|
|
2417
2417
|
return f.get_run_mainTaskCfg(id, auth=auth, conn_url=conn_url)
|
|
2418
2418
|
|
|
2419
2419
|
|
|
2420
|
+
def get_run_main_pipeline_cfg(
|
|
2421
|
+
id: str,
|
|
2422
|
+
*,
|
|
2423
|
+
auth: Optional[AUTH] = None,
|
|
2424
|
+
conn_url: Optional[str] = None,
|
|
2425
|
+
batcher: Optional[Batcher] = None,
|
|
2426
|
+
) -> MainPipelineCfg:
|
|
2427
|
+
"""return mainPipelineCfg by operation `id` for running pipeline"""
|
|
2428
|
+
if batcher is None:
|
|
2429
|
+
batcher = Config.BATCHER
|
|
2430
|
+
if batcher is not None:
|
|
2431
|
+
return batcher.add("getMainPipelineCfg", vars={"operationId": id}, result_model=MainPipelineCfg)
|
|
2432
|
+
return f.get_run_mainPipelineCfg(id, auth=auth, conn_url=conn_url)
|
|
2433
|
+
|
|
2434
|
+
|
|
2420
2435
|
def get_task_runs(
|
|
2421
2436
|
task_id: str,
|
|
2422
2437
|
cfg_id: Optional[str] = None,
|
|
@@ -2885,6 +2900,7 @@ def pipeline_full(
|
|
|
2885
2900
|
profile_mode: Optional[str] = None,
|
|
2886
2901
|
component: TaskComponent = None,
|
|
2887
2902
|
policy: TaskPolicy = None,
|
|
2903
|
+
schedule: Optional[Schedule] = None,
|
|
2888
2904
|
restrictions: Optional[Restrictions] = None,
|
|
2889
2905
|
scaleInfo: List[ScaleInfo] = None,
|
|
2890
2906
|
with_show: bool = True,
|
|
@@ -2920,6 +2936,7 @@ def pipeline_full(
|
|
|
2920
2936
|
withLogs=True,
|
|
2921
2937
|
component=component,
|
|
2922
2938
|
policy=policy,
|
|
2939
|
+
schedule=schedule,
|
|
2923
2940
|
restrictions=restrictions,
|
|
2924
2941
|
scaleInfo=scaleInfo,
|
|
2925
2942
|
withListener=False,
|
|
@@ -2957,6 +2974,7 @@ def pipeline_prepare(
|
|
|
2957
2974
|
scaleInfo: List[ScaleInfo] = None,
|
|
2958
2975
|
with_listener: bool = False,
|
|
2959
2976
|
kafka_mode_url_response: Optional[str] = None,
|
|
2977
|
+
synthetic: bool = False,
|
|
2960
2978
|
with_show: bool = True,
|
|
2961
2979
|
long: bool = False,
|
|
2962
2980
|
long_timeout: Optional[int] = WAIT_RESULT_TIMEOUT,
|
|
@@ -2995,6 +3013,7 @@ def pipeline_prepare(
|
|
|
2995
3013
|
withListener=with_listener,
|
|
2996
3014
|
kafkaModeUrl=kafka_mode_url_response,
|
|
2997
3015
|
run=False,
|
|
3016
|
+
synthetic=synthetic,
|
|
2998
3017
|
)
|
|
2999
3018
|
if batcher is not None:
|
|
3000
3019
|
return batcher.add("sendPipeline", data=data, result_model=AppLogs)
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
malevich_coretools/__init__.py,sha256=DJtPESxkCZD2SbTZTrR_x0TKDQ4MJpmBqGw5YpKYidM,134
|
|
2
|
-
malevich_coretools/utils.py,sha256=
|
|
3
|
-
malevich_coretools/abstract/__init__.py,sha256=
|
|
4
|
-
malevich_coretools/abstract/abstract.py,sha256=
|
|
5
|
-
malevich_coretools/abstract/
|
|
2
|
+
malevich_coretools/utils.py,sha256=k0b6yGRJGuygu3Kp2yPwSnXDxoMxsUizy_LLlWx_9yw,114929
|
|
3
|
+
malevich_coretools/abstract/__init__.py,sha256=6vQ08c8HPYyT_pPkKlc-EwQKE8xG3HTEo2p_GiI5rik,142
|
|
4
|
+
malevich_coretools/abstract/abstract.py,sha256=jFN-nTKS_52WXTh5IaHPEaaYMwA50L16QQkUWhJ7lZE,14915
|
|
5
|
+
malevich_coretools/abstract/operations.py,sha256=cWlo2xzW-rzkTInzpDjBYeL68KfLYqSpZJRzCQ4OzjA,3070
|
|
6
|
+
malevich_coretools/abstract/pipeline.py,sha256=HwhYp5G9yaZYaeDypChfpNd2W-kmJQfM9I54uek0B9k,7914
|
|
6
7
|
malevich_coretools/abstract/statuses.py,sha256=9ISSw_evsylBshLXoU44TCoFOrZm4bXIxyAFFDqdUWc,333
|
|
7
8
|
malevich_coretools/admin/__init__.py,sha256=zdIcHs3T_NZ8HYWts-O7OpBEWHIu779QDZMGF5HRCLg,35
|
|
8
|
-
malevich_coretools/admin/utils.py,sha256=
|
|
9
|
+
malevich_coretools/admin/utils.py,sha256=jmqy8qODvPOg1qcY1pBPJWJCdAVGiOFTAFn6Ltyhsms,3015
|
|
9
10
|
malevich_coretools/batch/__init__.py,sha256=taxyZl8YOZd2EBd3leN6slzMkejUtjQ64Na31TcT3-I,165
|
|
10
11
|
malevich_coretools/batch/utils.py,sha256=cqX34sfh85dCwLv7qprxatzhYxxj7LqZwjhlmk_3GXQ,7705
|
|
11
12
|
malevich_coretools/funcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
13
|
malevich_coretools/funcs/checks.py,sha256=Q5pRtRevQrGv_-SMbn2GgYnulhclDLBXdRtbw2QOYKU,223
|
|
13
|
-
malevich_coretools/funcs/funcs.py,sha256=
|
|
14
|
+
malevich_coretools/funcs/funcs.py,sha256=dVO-L2euOAQir69gpC1NuQa_kIFrYJD6s-9FAICGOwA,38851
|
|
14
15
|
malevich_coretools/funcs/helpers.py,sha256=7_obLb35seAfxGH7rqe5FExuAUz7j63ByUn4Oxw5Xjk,11044
|
|
15
16
|
malevich_coretools/secondary/__init__.py,sha256=048HqvG36_1WdDVZK_RuECmaf14Iq2fviUysG1inlaE,78
|
|
16
17
|
malevich_coretools/secondary/config.py,sha256=hRlSJuPQnhKyt1wmOAJX_XmcliaO0fPGbW94AE_Mazs,463
|
|
17
|
-
malevich_coretools/secondary/const.py,sha256=
|
|
18
|
+
malevich_coretools/secondary/const.py,sha256=1gqnsp12J0yNC3QYnDQSTo99y44dl1zpmHmqaxcIjPk,13874
|
|
18
19
|
malevich_coretools/secondary/helpers.py,sha256=t-W9g9t0O1EaAX8UOb1wxXFAMawbtDotDH47t0GdjG4,6142
|
|
19
20
|
malevich_coretools/secondary/kafka_utils.py,sha256=SIUnBFyfwsquN6MAUrEkKCw-1l7979Znl7OTQSX2UKo,989
|
|
20
21
|
malevich_coretools/tools/__init__.py,sha256=jDxlCa5Dr6Y43qlI7JwsRAlBkKmFeTHTEnjNUvu-0iw,46
|
|
21
22
|
malevich_coretools/tools/abstract.py,sha256=B1RW1FeNHrQ6r1k-cQZ4k4noCRXkIGt-JUwVoXEDkAg,4466
|
|
22
23
|
malevich_coretools/tools/vast.py,sha256=63tvy70qQV9vnK0eWytlgjBGSnfA7l3kSIDgACBbMMs,12893
|
|
23
|
-
malevich_coretools-0.3.
|
|
24
|
-
malevich_coretools-0.3.
|
|
25
|
-
malevich_coretools-0.3.
|
|
26
|
-
malevich_coretools-0.3.
|
|
27
|
-
malevich_coretools-0.3.
|
|
24
|
+
malevich_coretools-0.3.34.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
25
|
+
malevich_coretools-0.3.34.dist-info/METADATA,sha256=pXbq-rBlVdEsXWguy_GtbF78zIxK41xSKVgZiJgcaRQ,265
|
|
26
|
+
malevich_coretools-0.3.34.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
|
27
|
+
malevich_coretools-0.3.34.dist-info/top_level.txt,sha256=wDX3s1Tso0otBPNrFRfXqyNpm48W4Bp5v6JfbITO2Z8,19
|
|
28
|
+
malevich_coretools-0.3.34.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|