wizata-dsapi 1.4.0.dev20__py3-none-any.whl → 1.4.0.dev21__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/paged_query_result.py +6 -2
- wizata_dsapi/search.py +39 -3
- wizata_dsapi/version.py +1 -1
- {wizata_dsapi-1.4.0.dev20.dist-info → wizata_dsapi-1.4.0.dev21.dist-info}/METADATA +1 -1
- {wizata_dsapi-1.4.0.dev20.dist-info → wizata_dsapi-1.4.0.dev21.dist-info}/RECORD +8 -8
- {wizata_dsapi-1.4.0.dev20.dist-info → wizata_dsapi-1.4.0.dev21.dist-info}/WHEEL +0 -0
- {wizata_dsapi-1.4.0.dev20.dist-info → wizata_dsapi-1.4.0.dev21.dist-info}/licenses/LICENSE.txt +0 -0
- {wizata_dsapi-1.4.0.dev20.dist-info → wizata_dsapi-1.4.0.dev21.dist-info}/top_level.txt +0 -0
|
@@ -7,6 +7,7 @@ class PagedQueryResult:
|
|
|
7
7
|
:ivar int size: number of records per page.
|
|
8
8
|
:ivar str sort: column name used in sorting.
|
|
9
9
|
:ivar int total: total number of results on all pages.
|
|
10
|
+
:ivar dict groups: statistics used for the execution logs charts.
|
|
10
11
|
"""
|
|
11
12
|
|
|
12
13
|
def __init__(self,
|
|
@@ -14,7 +15,8 @@ class PagedQueryResult:
|
|
|
14
15
|
page: int = None,
|
|
15
16
|
size: int = None,
|
|
16
17
|
sort: str = None,
|
|
17
|
-
direction: str = None
|
|
18
|
+
direction: str = None,
|
|
19
|
+
groups: dict = None):
|
|
18
20
|
self.total = total
|
|
19
21
|
self.page = page
|
|
20
22
|
if page < 0:
|
|
@@ -29,6 +31,7 @@ class PagedQueryResult:
|
|
|
29
31
|
if direction != 'asc' and direction != 'desc':
|
|
30
32
|
raise ValueError("direction must be asc or desc")
|
|
31
33
|
self.results = None
|
|
34
|
+
self.groups = groups if groups else {}
|
|
32
35
|
|
|
33
36
|
def to_json(self):
|
|
34
37
|
"""
|
|
@@ -55,5 +58,6 @@ class PagedQueryResult:
|
|
|
55
58
|
"sort": self.sort,
|
|
56
59
|
"direction": sort_dir,
|
|
57
60
|
"total": self.total,
|
|
58
|
-
"results": formatted_results
|
|
61
|
+
"results": formatted_results,
|
|
62
|
+
"groups": self.groups
|
|
59
63
|
}
|
wizata_dsapi/search.py
CHANGED
|
@@ -17,6 +17,26 @@ class FilterOperator:
|
|
|
17
17
|
SEARCH = "_search"
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
class GroupSummaryType:
|
|
21
|
+
"""
|
|
22
|
+
Aggregate methods for group summary types.
|
|
23
|
+
"""
|
|
24
|
+
SUM = "Sum"
|
|
25
|
+
AVG = "Avg"
|
|
26
|
+
MAX = "Max"
|
|
27
|
+
MIN = "Min"
|
|
28
|
+
COUNT = "Count"
|
|
29
|
+
|
|
30
|
+
class GroupOption:
|
|
31
|
+
def __init__(self, property_name: str):
|
|
32
|
+
self.property_name = property_name
|
|
33
|
+
|
|
34
|
+
class GroupSummary:
|
|
35
|
+
def __init__(self, type: str, property_name: str):
|
|
36
|
+
self.type = type
|
|
37
|
+
self.property_name = property_name
|
|
38
|
+
|
|
39
|
+
|
|
20
40
|
class SortOption:
|
|
21
41
|
def __init__(self, field: str, order: str = "asc"):
|
|
22
42
|
self.field = field
|
|
@@ -38,14 +58,26 @@ class SearchQuery:
|
|
|
38
58
|
sort_objs.append(SortOption(field=s["field"], order=s.get("order", "asc")))
|
|
39
59
|
|
|
40
60
|
svc_name = data.get("serviceName") or data.get("service_name") or "pipeline_runner"
|
|
41
|
-
|
|
61
|
+
|
|
62
|
+
# New grouping feature
|
|
63
|
+
raw_groups = data.get("groups", [])
|
|
64
|
+
groups_objs = [GroupOption(g["propertyName"]) for g in raw_groups]
|
|
65
|
+
|
|
66
|
+
# GroupSummaries
|
|
67
|
+
raw_summaries = data.get("groupSummaries", [])
|
|
68
|
+
summaries_objs = [GroupSummary(s["type"], s["propertyName"]) for s in raw_summaries]
|
|
69
|
+
|
|
70
|
+
instance = cls(
|
|
42
71
|
filters=data.get("filters", {}),
|
|
43
72
|
sort=sort_objs,
|
|
44
73
|
limit=data.get("limit", 5000),
|
|
45
74
|
page=data.get("page", 1),
|
|
46
75
|
size=data.get("size", 50),
|
|
47
|
-
service_name=svc_name
|
|
76
|
+
service_name=svc_name,
|
|
77
|
+
groups = groups_objs,
|
|
78
|
+
group_summaries = summaries_objs
|
|
48
79
|
)
|
|
80
|
+
return instance
|
|
49
81
|
|
|
50
82
|
def __init__(self,
|
|
51
83
|
filters: Optional[Dict[str, Any]] = None,
|
|
@@ -53,7 +85,9 @@ class SearchQuery:
|
|
|
53
85
|
limit: int = 5000,
|
|
54
86
|
page: int = 1,
|
|
55
87
|
size: int = 50,
|
|
56
|
-
service_name: str = "pipeline_runner"
|
|
88
|
+
service_name: str = "pipeline_runner",
|
|
89
|
+
groups: Optional[List[GroupOption]] = None,
|
|
90
|
+
group_summaries: Optional[List[GroupSummary]] = None):
|
|
57
91
|
|
|
58
92
|
self.filters = filters if filters is not None else {}
|
|
59
93
|
self.sort = sort if sort is not None else []
|
|
@@ -61,4 +95,6 @@ class SearchQuery:
|
|
|
61
95
|
self.page = page
|
|
62
96
|
self.size = size
|
|
63
97
|
self.service_name = service_name
|
|
98
|
+
self.groups = groups if groups is not None else []
|
|
99
|
+
self.group_summaries = group_summaries if group_summaries is not None else []
|
|
64
100
|
|
wizata_dsapi/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.4.0.
|
|
1
|
+
__version__ = "1.4.0.dev21"
|
|
@@ -19,20 +19,20 @@ 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=WMtxMulIEiWMZxNwdgJcKfmm3mBOGKKO6zMeE1mhcQ0,2129
|
|
23
23
|
wizata_dsapi/pipeline.py,sha256=gqZ6R8d8f_uz9xI3Umz2uN3yTD4N3jsBPltAIg--Bjk,31646
|
|
24
24
|
wizata_dsapi/pipeline_image.py,sha256=4DhDo1SYftN6QcNbehNbM86VTD6EYGmtlcOmE5DP5Vc,6330
|
|
25
25
|
wizata_dsapi/plot.py,sha256=-gV6rZJQDhGH4CV9BgefjeJWI--X5HDBOjseEzHr3Gc,1971
|
|
26
26
|
wizata_dsapi/request.py,sha256=W4E1BHacQdJiBLPI96yVeHz41rbfFuGrbuw1U60L_DM,27560
|
|
27
27
|
wizata_dsapi/script.py,sha256=DeEciwVpuCYZetgJCoivw_bYe8ma52WuTaTQ_VkLEcg,12930
|
|
28
|
-
wizata_dsapi/search.py,sha256=
|
|
28
|
+
wizata_dsapi/search.py,sha256=I19VFsdvKOxnOgkjPWNI_Wd1ac_zacZBxU-zLwwv8Zk,2902
|
|
29
29
|
wizata_dsapi/solution_component.py,sha256=8gbZWx2h_xUqI_pAXa3goqAnR5Y-GDMii8MeGlaK1IE,9531
|
|
30
30
|
wizata_dsapi/streamlit_utils.py,sha256=sXBdygktbixV828Zg01Nl27_a4F8zGFc4RY0C8g-1bc,1942
|
|
31
31
|
wizata_dsapi/template.py,sha256=wtCRKKk3PchH4RrNgNYlEF_9C6bzZwKIeLyEvgv6Fdo,13704
|
|
32
32
|
wizata_dsapi/trigger.py,sha256=w3BZYP-L3SUwvaT0oCTanh_Ewn57peZvlt7vxzHv9J8,5129
|
|
33
33
|
wizata_dsapi/twin.py,sha256=S0DUzQf1smZXZTdXpXZPtkZYCfKIhw53EecCnsl9i4Q,11017
|
|
34
34
|
wizata_dsapi/twinregistration.py,sha256=Mi6-YuwroiEXc0c1hgrOaphh4hNVoHupxOnXedVtJtE,13377
|
|
35
|
-
wizata_dsapi/version.py,sha256=
|
|
35
|
+
wizata_dsapi/version.py,sha256=qFeWqY-JbMX0fcG7ujiygB9jupydyyNEd6_udTU1GJw,28
|
|
36
36
|
wizata_dsapi/wizard_function.py,sha256=RbM7W7Gf-6Rhp_1dU9DBYkHaciknGAGvuAndhAS_vyo,942
|
|
37
37
|
wizata_dsapi/wizard_request.py,sha256=v6BaqKLKvTWmUSo0_gda9FabAQz5x_-GOH1Av50GzFo,3762
|
|
38
38
|
wizata_dsapi/wizata_dsapi_client.py,sha256=pClIADBb_CfgT4P4Hz9mopgsuC0Wa_XiZBuej7x5JUM,85056
|
|
@@ -43,8 +43,8 @@ wizata_dsapi/plots/__init__.py,sha256=qgnSFqrjOPur-807M8uh5awIfjM1ZHXUXcAqHc-r2l
|
|
|
43
43
|
wizata_dsapi/plots/common.py,sha256=jdPsJqLHBwSKc6dX83BSGPqSRxzIVNHSYO5yI_8sjGk,6568
|
|
44
44
|
wizata_dsapi/scripts/__init__.py,sha256=hAxiETSQf0qOHde1si1tEAJU48seqEgHrchCzS2-LvQ,80
|
|
45
45
|
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.
|
|
46
|
+
wizata_dsapi-1.4.0.dev21.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
47
|
+
wizata_dsapi-1.4.0.dev21.dist-info/METADATA,sha256=F6Scf3P5H9pLa7zRq-c9DF0gqXGt42NJ3AJcDrUqyts,4960
|
|
48
|
+
wizata_dsapi-1.4.0.dev21.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
49
|
+
wizata_dsapi-1.4.0.dev21.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
|
|
50
|
+
wizata_dsapi-1.4.0.dev21.dist-info/RECORD,,
|
|
File without changes
|
{wizata_dsapi-1.4.0.dev20.dist-info → wizata_dsapi-1.4.0.dev21.dist-info}/licenses/LICENSE.txt
RENAMED
|
File without changes
|
|
File without changes
|