malevich-coretools 0.3.49__tar.gz → 0.3.51__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.
- {malevich_coretools-0.3.49/malevich_coretools.egg-info → malevich_coretools-0.3.51}/PKG-INFO +1 -1
- malevich_coretools-0.3.51/VERSION +1 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/funcs/funcs.py +16 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/funcs/helpers.py +111 -5
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/secondary/const.py +2 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/utils.py +5361 -275
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51/malevich_coretools.egg-info}/PKG-INFO +1 -1
- malevich_coretools-0.3.49/VERSION +0 -1
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/LICENSE +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/MANIFEST.in +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/README.md +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/__init__.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/abstract/__init__.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/abstract/abstract.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/abstract/operations.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/abstract/pipeline.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/abstract/statuses.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/admin/__init__.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/admin/utils.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/batch/__init__.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/batch/utils.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/funcs/__init__.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/funcs/checks.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/secondary/__init__.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/secondary/config.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/secondary/helpers.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/secondary/kafka_utils.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/tools/__init__.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/tools/abstract.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/tools/vast.py +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools.egg-info/SOURCES.txt +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools.egg-info/dependency_links.txt +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools.egg-info/requires.txt +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools.egg-info/top_level.txt +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/pyproject.toml +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/requirements.txt +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/setup.cfg +0 -0
- {malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.3.51
|
|
@@ -890,6 +890,22 @@ async def get_userPipelines_realId_async(id: str, *args, **kwargs) -> Pipeline:
|
|
|
890
890
|
return model_from_json(await send_to_core_get_async(USER_PIPELINES_REAL_ID(id), *args, **kwargs), Pipeline).simplify()
|
|
891
891
|
|
|
892
892
|
|
|
893
|
+
def get_userPipelines_tagSearch(tag: str, *args, **kwargs) -> ResultIds:
|
|
894
|
+
return model_from_json(send_to_core_get(USER_PIPELINES_TAG(tag), *args, **kwargs), ResultIds)
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
async def get_userPipelines_tagSearch_async(tag: str, *args, **kwargs) -> ResultIds:
|
|
898
|
+
return model_from_json(await send_to_core_get_async(USER_PIPELINES_TAG(tag), *args, **kwargs), ResultIds)
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
def get_userPipelines_realIds_tagSearch(tag: str, *args, **kwargs) -> ResultIds:
|
|
902
|
+
return model_from_json(send_to_core_get(USER_PIPELINES_TAG_REAL_IDS(tag), *args, **kwargs), ResultIds)
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
async def get_userPipelines_realIds_tagSearch_async(tag: str, *args, **kwargs) -> ResultIds:
|
|
906
|
+
return model_from_json(await send_to_core_get_async(USER_PIPELINES_TAG_REAL_IDS(tag), *args, **kwargs), ResultIds)
|
|
907
|
+
|
|
908
|
+
|
|
893
909
|
def post_userPipelines(data: UserTask, wait: bool, *args, **kwargs) -> Alias.Id:
|
|
894
910
|
return send_to_core_modify(USER_PIPELINES(wait), data, *args, **kwargs)
|
|
895
911
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
-
from typing import Any, Dict, List, Optional, Union
|
|
2
|
+
from typing import Any, Coroutine, Dict, List, Literal, Optional, Union, overload
|
|
3
3
|
from uuid import uuid4
|
|
4
4
|
|
|
5
5
|
import pandas as pd
|
|
@@ -32,37 +32,89 @@ from malevich_coretools.secondary import Config, to_json
|
|
|
32
32
|
__all__ = ["create_collection_from_file_df", "update_collection_from_file_df", "raw_collection_from_df", "raw_collection_from_file", "create_collection_from_df", "update_collection_from_df", "create_app_settings", "create_user_config", "create_task_component", "create_task_policy", "create_restrictions", "create_run_settings", "create_endpoint_override", "create_cfg_struct"]
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
@overload
|
|
35
36
|
def create_collection_from_file_df(
|
|
36
37
|
file: str,
|
|
37
38
|
name: Optional[str],
|
|
38
39
|
metadata: Optional[Union[Dict[str, Any], str]],
|
|
39
40
|
*args,
|
|
41
|
+
is_async: Literal[False],
|
|
40
42
|
**kwargs
|
|
41
43
|
) -> Alias.Id:
|
|
44
|
+
pass
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@overload
|
|
48
|
+
def create_collection_from_file_df(
|
|
49
|
+
file: str,
|
|
50
|
+
name: Optional[str],
|
|
51
|
+
metadata: Optional[Union[Dict[str, Any], str]],
|
|
52
|
+
*args,
|
|
53
|
+
is_async: Literal[True],
|
|
54
|
+
**kwargs
|
|
55
|
+
) -> Coroutine[Any, Any, Alias.Id]:
|
|
56
|
+
pass
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def create_collection_from_file_df(
|
|
60
|
+
file: str,
|
|
61
|
+
name: Optional[str],
|
|
62
|
+
metadata: Optional[Union[Dict[str, Any], str]],
|
|
63
|
+
*args,
|
|
64
|
+
is_async: bool = False,
|
|
65
|
+
**kwargs
|
|
66
|
+
) -> Union[Alias.Id, Coroutine[Any, Any, Alias.Id]]:
|
|
42
67
|
try:
|
|
43
68
|
data = pd.read_csv(file)
|
|
44
69
|
except pd.errors.EmptyDataError:
|
|
45
70
|
data = pd.DataFrame()
|
|
46
71
|
if name is None:
|
|
47
72
|
name = file
|
|
48
|
-
return create_collection_from_df(data, name=file, metadata=metadata, *args, **kwargs)
|
|
73
|
+
return create_collection_from_df(data, name=file, metadata=metadata, *args, is_async=is_async, **kwargs)
|
|
49
74
|
|
|
50
75
|
|
|
76
|
+
@overload
|
|
51
77
|
def update_collection_from_file_df(
|
|
52
78
|
id: str,
|
|
53
79
|
file: str,
|
|
54
80
|
name: Optional[str],
|
|
55
81
|
metadata: Optional[Union[Dict[str, Any], str]],
|
|
56
82
|
*args,
|
|
83
|
+
is_async: Literal[False],
|
|
57
84
|
**kwargs
|
|
58
85
|
) -> Alias.Id:
|
|
86
|
+
pass
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
@overload
|
|
90
|
+
def update_collection_from_file_df(
|
|
91
|
+
id: str,
|
|
92
|
+
file: str,
|
|
93
|
+
name: Optional[str],
|
|
94
|
+
metadata: Optional[Union[Dict[str, Any], str]],
|
|
95
|
+
*args,
|
|
96
|
+
is_async: Literal[True],
|
|
97
|
+
**kwargs
|
|
98
|
+
) -> Coroutine[Any, Any, Alias.Id]:
|
|
99
|
+
pass
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def update_collection_from_file_df(
|
|
103
|
+
id: str,
|
|
104
|
+
file: str,
|
|
105
|
+
name: Optional[str],
|
|
106
|
+
metadata: Optional[Union[Dict[str, Any], str]],
|
|
107
|
+
*args,
|
|
108
|
+
is_async: bool = False,
|
|
109
|
+
**kwargs
|
|
110
|
+
) -> Union[Alias.Id, Coroutine[Any, Any, Alias.Id]]:
|
|
59
111
|
try:
|
|
60
112
|
data = pd.read_csv(file)
|
|
61
113
|
except pd.errors.EmptyDataError:
|
|
62
114
|
data = pd.DataFrame()
|
|
63
115
|
if name is None:
|
|
64
116
|
name = file
|
|
65
|
-
return update_collection_from_df(id, data, name=file, metadata=metadata, *args, **kwargs)
|
|
117
|
+
return update_collection_from_df(id, data, name=file, metadata=metadata, *args, is_async=is_async, **kwargs)
|
|
66
118
|
|
|
67
119
|
|
|
68
120
|
def raw_collection_from_df(
|
|
@@ -95,15 +147,41 @@ def raw_collection_from_file(
|
|
|
95
147
|
return raw_collection_from_df(data, name, metadata)
|
|
96
148
|
|
|
97
149
|
|
|
150
|
+
@overload
|
|
98
151
|
def create_collection_from_df(
|
|
99
152
|
data: pd.DataFrame,
|
|
100
153
|
name: Optional[str],
|
|
101
154
|
metadata: Optional[Union[Dict[str, Any], str]],
|
|
102
155
|
batcher: Optional[Batcher] = None,
|
|
103
|
-
is_async: bool = False,
|
|
104
156
|
*args,
|
|
157
|
+
is_async: Literal[False],
|
|
105
158
|
**kwargs
|
|
106
159
|
) -> Alias.Id:
|
|
160
|
+
pass
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
@overload
|
|
164
|
+
def create_collection_from_df(
|
|
165
|
+
data: pd.DataFrame,
|
|
166
|
+
name: Optional[str],
|
|
167
|
+
metadata: Optional[Union[Dict[str, Any], str]],
|
|
168
|
+
batcher: Optional[Batcher] = None,
|
|
169
|
+
*args,
|
|
170
|
+
is_async: Literal[True],
|
|
171
|
+
**kwargs
|
|
172
|
+
) -> Coroutine[Any, Any, Alias.Id]:
|
|
173
|
+
pass
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def create_collection_from_df(
|
|
177
|
+
data: pd.DataFrame,
|
|
178
|
+
name: Optional[str],
|
|
179
|
+
metadata: Optional[Union[Dict[str, Any], str]],
|
|
180
|
+
batcher: Optional[Batcher] = None,
|
|
181
|
+
*args,
|
|
182
|
+
is_async: bool = False,
|
|
183
|
+
**kwargs
|
|
184
|
+
) -> Union[Alias.Id, Coroutine[Any, Any, Alias.Id]]:
|
|
107
185
|
if batcher is None:
|
|
108
186
|
batcher = Config.BATCHER
|
|
109
187
|
data = raw_collection_from_df(data, name, metadata)
|
|
@@ -114,16 +192,44 @@ def create_collection_from_df(
|
|
|
114
192
|
return post_collections_data(data, *args, **kwargs)
|
|
115
193
|
|
|
116
194
|
|
|
195
|
+
@overload
|
|
117
196
|
def update_collection_from_df(
|
|
118
197
|
id: str,
|
|
119
198
|
data: pd.DataFrame,
|
|
120
199
|
name: Optional[str],
|
|
121
200
|
metadata: Optional[Union[Dict[str, Any], str]],
|
|
122
201
|
batcher: Optional[Batcher] = None,
|
|
123
|
-
is_async: bool = False,
|
|
124
202
|
*args,
|
|
203
|
+
is_async: Literal[False],
|
|
125
204
|
**kwargs
|
|
126
205
|
) -> Alias.Id:
|
|
206
|
+
pass
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
@overload
|
|
210
|
+
def update_collection_from_df(
|
|
211
|
+
id: str,
|
|
212
|
+
data: pd.DataFrame,
|
|
213
|
+
name: Optional[str],
|
|
214
|
+
metadata: Optional[Union[Dict[str, Any], str]],
|
|
215
|
+
batcher: Optional[Batcher] = None,
|
|
216
|
+
*args,
|
|
217
|
+
is_async: Literal[True],
|
|
218
|
+
**kwargs
|
|
219
|
+
) -> Coroutine[Any, Any, Alias.Id]:
|
|
220
|
+
pass
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def update_collection_from_df(
|
|
224
|
+
id: str,
|
|
225
|
+
data: pd.DataFrame,
|
|
226
|
+
name: Optional[str],
|
|
227
|
+
metadata: Optional[Union[Dict[str, Any], str]],
|
|
228
|
+
batcher: Optional[Batcher] = None,
|
|
229
|
+
*args,
|
|
230
|
+
is_async: bool = False,
|
|
231
|
+
**kwargs
|
|
232
|
+
) -> Union[Alias.Id, Coroutine[Any, Any, Alias.Id]]:
|
|
127
233
|
if batcher is None:
|
|
128
234
|
batcher = Config.BATCHER
|
|
129
235
|
data = raw_collection_from_df(data, name, metadata)
|
{malevich_coretools-0.3.49 → malevich_coretools-0.3.51}/malevich_coretools/secondary/const.py
RENAMED
|
@@ -139,6 +139,8 @@ USER_PIPELINES_MAP_IDS = f"{USER_PIPELINES_MAIN}/mapIds"
|
|
|
139
139
|
USER_PIPELINES_MAP_ID = lambda id: f"{USER_PIPELINES_MAIN}/mapIds/{urllib.parse.quote(str(id), safe='')}"
|
|
140
140
|
USER_PIPELINES_ID = lambda id, wait: with_wait(f"{USER_PIPELINES_MAIN}/{urllib.parse.quote(str(id), safe='')}", wait)
|
|
141
141
|
USER_PIPELINES_REAL_ID = lambda id: f"{USER_PIPELINES_MAIN}/realIds/{urllib.parse.quote(str(id), safe='')}"
|
|
142
|
+
USER_PIPELINES_TAG = lambda tag: f"{USER_PIPELINES_MAIN}/tagSearch/{urllib.parse.quote(str(tag), safe='')}"
|
|
143
|
+
USER_PIPELINES_TAG_REAL_IDS = lambda tag: f"{USER_PIPELINES_MAIN}/realIds/tagSearch/{urllib.parse.quote(str(tag), safe='')}"
|
|
142
144
|
|
|
143
145
|
## UserCfgsController
|
|
144
146
|
USER_CFGS_MAIN = f"{API_VERSION}/userCfgs"
|