malevich-coretools 0.3.32__tar.gz → 0.3.33__tar.gz

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.

Files changed (37) hide show
  1. {malevich_coretools-0.3.32/malevich_coretools.egg-info → malevich_coretools-0.3.33}/PKG-INFO +1 -1
  2. malevich_coretools-0.3.33/VERSION +1 -0
  3. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/abstract/abstract.py +4 -6
  4. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/abstract/pipeline.py +54 -1
  5. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/admin/utils.py +1 -1
  6. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/funcs/funcs.py +10 -2
  7. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/secondary/const.py +1 -0
  8. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/utils.py +19 -0
  9. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33/malevich_coretools.egg-info}/PKG-INFO +1 -1
  10. malevich_coretools-0.3.32/VERSION +0 -1
  11. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/LICENSE +0 -0
  12. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/MANIFEST.in +0 -0
  13. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/README.md +0 -0
  14. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/__init__.py +0 -0
  15. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/abstract/__init__.py +0 -0
  16. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/abstract/statuses.py +0 -0
  17. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/admin/__init__.py +0 -0
  18. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/batch/__init__.py +0 -0
  19. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/batch/utils.py +0 -0
  20. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/funcs/__init__.py +0 -0
  21. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/funcs/checks.py +0 -0
  22. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/funcs/helpers.py +0 -0
  23. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/secondary/__init__.py +0 -0
  24. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/secondary/config.py +0 -0
  25. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/secondary/helpers.py +0 -0
  26. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/secondary/kafka_utils.py +0 -0
  27. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/tools/__init__.py +0 -0
  28. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/tools/abstract.py +0 -0
  29. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools/tools/vast.py +0 -0
  30. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools.egg-info/SOURCES.txt +0 -0
  31. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools.egg-info/dependency_links.txt +0 -0
  32. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools.egg-info/requires.txt +0 -0
  33. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/malevich_coretools.egg-info/top_level.txt +0 -0
  34. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/pyproject.toml +0 -0
  35. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/requirements.txt +0 -0
  36. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/setup.cfg +0 -0
  37. {malevich_coretools-0.3.32 → malevich_coretools-0.3.33}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: malevich-coretools
3
- Version: 0.3.32
3
+ Version: 0.3.33
4
4
  Author: Andrew Pogrebnoj
5
5
  Author-email: andrew@onjulius.co
6
6
  License-File: LICENSE
@@ -0,0 +1 @@
1
+ 0.3.33
@@ -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 PipelineInfo(BaseModel):
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[PipelineInfo] = None # only for pipeline
388
+ pipeline: Optional[PipelineRunInfo] = None # only for pipeline
387
389
 
388
390
 
389
391
  class AppLogsWithResults(AppLogs):
@@ -471,10 +473,6 @@ class AdminRunInfo(BaseModel):
471
473
  cfgId: Alias.Id
472
474
 
473
475
 
474
- class AdminRunsInfo(BaseModel):
475
- data: List[AdminRunInfo]
476
-
477
-
478
476
  class OperationOrNone(BaseModel):
479
477
  operationId: Optional[Alias.Id] = None
480
478
 
@@ -3,10 +3,13 @@ from typing import Dict, List, Optional
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
  )
@@ -98,3 +101,53 @@ class Pipeline(BaseModel):
98
101
  conditions: Dict[str, Condition] = {} # bindConditionId to Condition
99
102
  results: Dict[str, List[Result]] = {} # bindProcessorId to results
100
103
  pullCollectionPolicy: PullCollectionPolicy = PullCollectionPolicy.IF_NOT_EXIST
104
+
105
+
106
+ class MainPipelineCfg(BaseModel):
107
+ operationId: Alias.Id
108
+ pipelineId: Alias.Id
109
+ processors: Dict[str, Processor]
110
+ conditions: Dict[str, Condition]
111
+ results: Dict[str, List[Result]]
112
+ pullCollectionPolicy: PullCollectionPolicy
113
+ cfg: str
114
+ infoUrl: Optional[str] = None
115
+ debugMode: bool
116
+ coreManage: bool
117
+ kafkaMode: bool
118
+ singleRequest: bool
119
+ tlWithoutData: Optional[int] = None
120
+ waitRuns: bool
121
+ profileMode: Optional[str] = None
122
+ withLogs: bool
123
+ component: TaskComponent
124
+ policy: TaskPolicy
125
+ schedule: Optional[Schedule] = None
126
+ restrictions: Optional[Restrictions] = None
127
+ scaleInfo: List[ScaleInfo]
128
+ schemesNames: List[str]
129
+ login: Optional[Alias.Login] = None
130
+ withListener: bool
131
+ kafkaModeUrl: Optional[str] = None
132
+ run: bool
133
+ synthetic: bool = False
134
+
135
+
136
+ class PipelineInfo(BaseModel):
137
+ pipelineId: Alias.Id
138
+ processors: Dict[str, Processor]
139
+ conditions: Dict[str, Condition]
140
+ results: Dict[str, List[Result]]
141
+ cfg: Alias.Json
142
+ login: Alias.Login
143
+
144
+
145
+ class AdminRunPipelineInfo(BaseModel):
146
+ operationId: Alias.Id
147
+ pipelineInfo: PipelineInfo
148
+ cfgId: Alias.Id
149
+
150
+
151
+ class AdminRunsInfo(BaseModel):
152
+ tasks: List[AdminRunInfo]
153
+ 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.Info:
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 Pipeline
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
@@ -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) -> Union[Alias.Json, Alias.Info]:
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
@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: malevich-coretools
3
- Version: 0.3.32
3
+ Version: 0.3.33
4
4
  Author: Andrew Pogrebnoj
5
5
  Author-email: andrew@onjulius.co
6
6
  License-File: LICENSE
@@ -1 +0,0 @@
1
- 0.3.32