wizata-dsapi 1.4.0.dev11__py3-none-any.whl → 1.4.0.dev15__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.
- wizata_dsapi/__init__.py +2 -0
- wizata_dsapi/execution_log.py +1 -1
- wizata_dsapi/paged_query_result.py +28 -0
- wizata_dsapi/search.py +61 -0
- wizata_dsapi/version.py +1 -1
- {wizata_dsapi-1.4.0.dev11.dist-info → wizata_dsapi-1.4.0.dev15.dist-info}/METADATA +1 -1
- {wizata_dsapi-1.4.0.dev11.dist-info → wizata_dsapi-1.4.0.dev15.dist-info}/RECORD +10 -9
- {wizata_dsapi-1.4.0.dev11.dist-info → wizata_dsapi-1.4.0.dev15.dist-info}/WHEEL +0 -0
- {wizata_dsapi-1.4.0.dev11.dist-info → wizata_dsapi-1.4.0.dev15.dist-info}/licenses/LICENSE.txt +0 -0
- {wizata_dsapi-1.4.0.dev11.dist-info → wizata_dsapi-1.4.0.dev15.dist-info}/top_level.txt +0 -0
wizata_dsapi/__init__.py
CHANGED
wizata_dsapi/execution_log.py
CHANGED
|
@@ -405,7 +405,7 @@ class ExecutionLog(Dto):
|
|
|
405
405
|
"template": self.get_template_key(),
|
|
406
406
|
"twin": self.get_twin_key(),
|
|
407
407
|
"edgeDeviceId": self.edge_device_id,
|
|
408
|
-
"status": self.status.value if self.status else
|
|
408
|
+
"status": self.status.value if hasattr(self.status, 'value') else self.status
|
|
409
409
|
}
|
|
410
410
|
return {k: v for k, v in labels.items() if v is not None}
|
|
411
411
|
|
|
@@ -29,3 +29,31 @@ class PagedQueryResult:
|
|
|
29
29
|
if direction != 'asc' and direction != 'desc':
|
|
30
30
|
raise ValueError("direction must be asc or desc")
|
|
31
31
|
self.results = None
|
|
32
|
+
|
|
33
|
+
def to_json(self):
|
|
34
|
+
"""
|
|
35
|
+
format the results
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
if self.direction == "asc":
|
|
39
|
+
sort_dir = "asc"
|
|
40
|
+
else:
|
|
41
|
+
sort_dir = "desc"
|
|
42
|
+
|
|
43
|
+
formatted_results = []
|
|
44
|
+
if self.results:
|
|
45
|
+
for obj in self.results:
|
|
46
|
+
if hasattr(obj, 'to_json'):
|
|
47
|
+
formatted_results.append(obj.to_json())
|
|
48
|
+
elif hasattr(obj, 'to_dict'):
|
|
49
|
+
formatted_results.append(obj.to_dict())
|
|
50
|
+
else:
|
|
51
|
+
formatted_results.append(obj)
|
|
52
|
+
return {
|
|
53
|
+
"page": self.page,
|
|
54
|
+
"size": self.size,
|
|
55
|
+
"sort": self.sort,
|
|
56
|
+
"direction": sort_dir,
|
|
57
|
+
"total": self.total,
|
|
58
|
+
"results": formatted_results
|
|
59
|
+
}
|
wizata_dsapi/search.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from typing import Dict, List, Any, Optional
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class FilterOperator:
|
|
6
|
+
"""
|
|
7
|
+
Constants for standard filtering operators.
|
|
8
|
+
"""
|
|
9
|
+
EQ = "eq"
|
|
10
|
+
NE = "ne"
|
|
11
|
+
GT = "gt"
|
|
12
|
+
GTE = "gte"
|
|
13
|
+
LT = "lt"
|
|
14
|
+
LTE = "lte"
|
|
15
|
+
IN = "in"
|
|
16
|
+
CONTAINS = "contains"
|
|
17
|
+
SEARCH = "_search"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class SortOption:
|
|
21
|
+
def __init__(self, field: str, order: str = "asc"):
|
|
22
|
+
self.field = field
|
|
23
|
+
self.order = order
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class SearchQuery:
|
|
27
|
+
"""
|
|
28
|
+
Generic class to represent JSON request structure.
|
|
29
|
+
"""
|
|
30
|
+
@classmethod
|
|
31
|
+
def from_dict(cls, data: dict):
|
|
32
|
+
"""
|
|
33
|
+
Helper to convert dictionary coming from endpoint to SearchQuery object.
|
|
34
|
+
"""
|
|
35
|
+
raw_sort = data.get("sort", [])
|
|
36
|
+
sort_objs = []
|
|
37
|
+
for s in raw_sort:
|
|
38
|
+
sort_objs.append(SortOption(field=s["field"], order=s.get("order", "asc")))
|
|
39
|
+
|
|
40
|
+
svc_name = data.get("serviceName") or data.get("service_name") or "pipeline_runner"
|
|
41
|
+
return cls(
|
|
42
|
+
filters=data.get("filters", {}),
|
|
43
|
+
sort=sort_objs,
|
|
44
|
+
limit=data.get("limit", 50),
|
|
45
|
+
offset=data.get("offset", 0),
|
|
46
|
+
service_name=svc_name
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
def __init__(self,
|
|
50
|
+
filters: Optional[Dict[str, Any]] = None,
|
|
51
|
+
sort: Optional[List[SortOption]] = None,
|
|
52
|
+
limit: int = 50,
|
|
53
|
+
offset: int = 0,
|
|
54
|
+
service_name: str = "pipeline_runner"):
|
|
55
|
+
|
|
56
|
+
self.filters = filters if filters is not None else {}
|
|
57
|
+
self.sort = sort if sort is not None else []
|
|
58
|
+
self.limit = limit
|
|
59
|
+
self.offset = offset
|
|
60
|
+
self.service_name = service_name
|
|
61
|
+
|
wizata_dsapi/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.4.0.
|
|
1
|
+
__version__ = "1.4.0.dev15"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
wizata_dsapi/__init__.py,sha256=
|
|
1
|
+
wizata_dsapi/__init__.py,sha256=sC_WXq9qi3PRds7hg4RiUnHsxaOMABjghzbPVLBy_GU,2188
|
|
2
2
|
wizata_dsapi/api_config.py,sha256=lrjUOKnGBYgjSqvXdTf4gEcf-luTSV6DPdo3AbmIExU,5404
|
|
3
3
|
wizata_dsapi/api_dto.py,sha256=mguQMqsshL4uNFt_RlZTD5zeKDBpFpa2nJP91ZtqaoA,2700
|
|
4
4
|
wizata_dsapi/api_interface.py,sha256=ju3Wz1e2uOS1_SrSihc0AECkWLRNNGHMhpMhV2L6tjo,13315
|
|
@@ -12,27 +12,28 @@ wizata_dsapi/ds_dataframe.py,sha256=Sk2JRUuTRJzko3HosJnbK34STpgSJUlqxLq8w_E5VM4,
|
|
|
12
12
|
wizata_dsapi/dsapi_json_encoder.py,sha256=_NJE2IncJCS-juOxV_IQWHq8WpaanKe2aWpGNZNUzyk,2062
|
|
13
13
|
wizata_dsapi/evaluation.py,sha256=kB61SD66uRBBbKqiES7XZERn77bwhacbyufneSD4s8c,2222
|
|
14
14
|
wizata_dsapi/execution.py,sha256=JuU8qZDcUZxtCvQwwvM_luwHi18GQ2jbBSxAjc2cSlM,14148
|
|
15
|
-
wizata_dsapi/execution_log.py,sha256=
|
|
15
|
+
wizata_dsapi/execution_log.py,sha256=Rx0J47xrnmQu6pNhYloJgTKc8IWH62GnU5lxYup9W1o,15186
|
|
16
16
|
wizata_dsapi/experiment.py,sha256=QYQ1CJ-MTWsXq08xYbm5sAp95dRxbPOmGDgaAOoBMDQ,4631
|
|
17
17
|
wizata_dsapi/group_system.py,sha256=6rUKe0_J3YWACysyBlzuw_TEpKNXgLOMxhpWsNxOzwY,1708
|
|
18
18
|
wizata_dsapi/ilogger.py,sha256=YKBTRp7pHYtBlnzroGRPT91_bMVJT93Pft3fUGcFSIM,488
|
|
19
19
|
wizata_dsapi/insight.py,sha256=ABFZ04DqYxxzqAEfU1tzlTZqqrigM-zN-8Lbetko3g0,6468
|
|
20
20
|
wizata_dsapi/mlmodel.py,sha256=QkWBNordOQiw6Vv4xN_pxwJWqbBm29vY1dyDZgmMS_4,26324
|
|
21
21
|
wizata_dsapi/model_toolkit.py,sha256=UNyw5CFSgZeXydQFsiDIRTjoMeqIsdyIIuiwumLW5bA,1574
|
|
22
|
-
wizata_dsapi/paged_query_result.py,sha256=
|
|
22
|
+
wizata_dsapi/paged_query_result.py,sha256=QU0JukkBk7wwfE43wOcj4so2aYpGj5r5_XobLfm8CnE,1939
|
|
23
23
|
wizata_dsapi/pipeline.py,sha256=gqZ6R8d8f_uz9xI3Umz2uN3yTD4N3jsBPltAIg--Bjk,31646
|
|
24
24
|
wizata_dsapi/pipeline_deployment.py,sha256=grekBaxUK0EhL9w7lDB8vNuW_wzLnHVm9Mq8Lkbkguk,1722
|
|
25
25
|
wizata_dsapi/pipeline_image.py,sha256=4DhDo1SYftN6QcNbehNbM86VTD6EYGmtlcOmE5DP5Vc,6330
|
|
26
26
|
wizata_dsapi/plot.py,sha256=-gV6rZJQDhGH4CV9BgefjeJWI--X5HDBOjseEzHr3Gc,1971
|
|
27
27
|
wizata_dsapi/request.py,sha256=W4E1BHacQdJiBLPI96yVeHz41rbfFuGrbuw1U60L_DM,27560
|
|
28
28
|
wizata_dsapi/script.py,sha256=DeEciwVpuCYZetgJCoivw_bYe8ma52WuTaTQ_VkLEcg,12930
|
|
29
|
+
wizata_dsapi/search.py,sha256=eJc5Y9_FT14qFzChAlkMSWFrXD5x0WhewQQnrmBR3Yo,1676
|
|
29
30
|
wizata_dsapi/solution_component.py,sha256=8gbZWx2h_xUqI_pAXa3goqAnR5Y-GDMii8MeGlaK1IE,9531
|
|
30
31
|
wizata_dsapi/streamlit_utils.py,sha256=sXBdygktbixV828Zg01Nl27_a4F8zGFc4RY0C8g-1bc,1942
|
|
31
32
|
wizata_dsapi/template.py,sha256=wtCRKKk3PchH4RrNgNYlEF_9C6bzZwKIeLyEvgv6Fdo,13704
|
|
32
33
|
wizata_dsapi/trigger.py,sha256=w3BZYP-L3SUwvaT0oCTanh_Ewn57peZvlt7vxzHv9J8,5129
|
|
33
34
|
wizata_dsapi/twin.py,sha256=S0DUzQf1smZXZTdXpXZPtkZYCfKIhw53EecCnsl9i4Q,11017
|
|
34
35
|
wizata_dsapi/twinregistration.py,sha256=Mi6-YuwroiEXc0c1hgrOaphh4hNVoHupxOnXedVtJtE,13377
|
|
35
|
-
wizata_dsapi/version.py,sha256=
|
|
36
|
+
wizata_dsapi/version.py,sha256=Ejd1lotrE0HYfaP9QMejar4USFssB__7ymeFLYAa_Bo,28
|
|
36
37
|
wizata_dsapi/wizard_function.py,sha256=RbM7W7Gf-6Rhp_1dU9DBYkHaciknGAGvuAndhAS_vyo,942
|
|
37
38
|
wizata_dsapi/wizard_request.py,sha256=v6BaqKLKvTWmUSo0_gda9FabAQz5x_-GOH1Av50GzFo,3762
|
|
38
39
|
wizata_dsapi/wizata_dsapi_client.py,sha256=pClIADBb_CfgT4P4Hz9mopgsuC0Wa_XiZBuej7x5JUM,85056
|
|
@@ -43,8 +44,8 @@ wizata_dsapi/plots/__init__.py,sha256=qgnSFqrjOPur-807M8uh5awIfjM1ZHXUXcAqHc-r2l
|
|
|
43
44
|
wizata_dsapi/plots/common.py,sha256=jdPsJqLHBwSKc6dX83BSGPqSRxzIVNHSYO5yI_8sjGk,6568
|
|
44
45
|
wizata_dsapi/scripts/__init__.py,sha256=hAxiETSQf0qOHde1si1tEAJU48seqEgHrchCzS2-LvQ,80
|
|
45
46
|
wizata_dsapi/scripts/common.py,sha256=efwq-Rd0lvYljIs3gSFz9izogBD7asOU2cTK-IvHTkM,4244
|
|
46
|
-
wizata_dsapi-1.4.0.
|
|
47
|
-
wizata_dsapi-1.4.0.
|
|
48
|
-
wizata_dsapi-1.4.0.
|
|
49
|
-
wizata_dsapi-1.4.0.
|
|
50
|
-
wizata_dsapi-1.4.0.
|
|
47
|
+
wizata_dsapi-1.4.0.dev15.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
48
|
+
wizata_dsapi-1.4.0.dev15.dist-info/METADATA,sha256=EawEuidClP8B_ckAFp139-IqfxCGxwAncd-c24QF9NY,4960
|
|
49
|
+
wizata_dsapi-1.4.0.dev15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
50
|
+
wizata_dsapi-1.4.0.dev15.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
|
|
51
|
+
wizata_dsapi-1.4.0.dev15.dist-info/RECORD,,
|
|
File without changes
|
{wizata_dsapi-1.4.0.dev11.dist-info → wizata_dsapi-1.4.0.dev15.dist-info}/licenses/LICENSE.txt
RENAMED
|
File without changes
|
|
File without changes
|