wizata-dsapi 1.4.0.dev20__tar.gz → 1.4.0.dev22__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.
Files changed (57) hide show
  1. {wizata_dsapi-1.4.0.dev20/wizata_dsapi.egg-info → wizata_dsapi-1.4.0.dev22}/PKG-INFO +1 -1
  2. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/paged_query_result.py +6 -2
  3. wizata_dsapi-1.4.0.dev22/wizata_dsapi/search.py +114 -0
  4. wizata_dsapi-1.4.0.dev22/wizata_dsapi/version.py +1 -0
  5. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22/wizata_dsapi.egg-info}/PKG-INFO +1 -1
  6. wizata_dsapi-1.4.0.dev20/wizata_dsapi/search.py +0 -64
  7. wizata_dsapi-1.4.0.dev20/wizata_dsapi/version.py +0 -1
  8. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/LICENSE.txt +0 -0
  9. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/README.rst +0 -0
  10. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/setup.cfg +0 -0
  11. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/setup.py +0 -0
  12. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/__init__.py +0 -0
  13. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/api_config.py +0 -0
  14. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/api_dto.py +0 -0
  15. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/api_interface.py +0 -0
  16. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/bucket.py +0 -0
  17. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/business_label.py +0 -0
  18. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/context.py +0 -0
  19. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/dataframe_toolkit.py +0 -0
  20. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/datapoint.py +0 -0
  21. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/datastore.py +0 -0
  22. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/ds_dataframe.py +0 -0
  23. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/dsapi_json_encoder.py +0 -0
  24. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/evaluation.py +0 -0
  25. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/execution.py +0 -0
  26. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/execution_log.py +0 -0
  27. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/experiment.py +0 -0
  28. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/group_system.py +0 -0
  29. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/ilogger.py +0 -0
  30. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/insight.py +0 -0
  31. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/mlmodel.py +0 -0
  32. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/model_toolkit.py +0 -0
  33. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/models/__init__.py +0 -0
  34. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/models/common.py +0 -0
  35. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/pipeline.py +0 -0
  36. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/pipeline_image.py +0 -0
  37. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/plot.py +0 -0
  38. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/plots/__init__.py +0 -0
  39. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/plots/common.py +0 -0
  40. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/request.py +0 -0
  41. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/script.py +0 -0
  42. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/scripts/__init__.py +0 -0
  43. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/scripts/common.py +0 -0
  44. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/solution_component.py +0 -0
  45. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/streamlit_utils.py +0 -0
  46. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/template.py +0 -0
  47. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/trigger.py +0 -0
  48. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/twin.py +0 -0
  49. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/twinregistration.py +0 -0
  50. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/wizard_function.py +0 -0
  51. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/wizard_request.py +0 -0
  52. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/wizata_dsapi_client.py +0 -0
  53. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi/words.py +0 -0
  54. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
  55. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
  56. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi.egg-info/requires.txt +0 -0
  57. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev22}/wizata_dsapi.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 1.4.0.dev20
3
+ Version: 1.4.0.dev22
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -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
  }
@@ -0,0 +1,114 @@
1
+ from dataclasses import dataclass, field
2
+ from typing import Dict, List, Any, Optional, Union
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 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
+
40
+ class SortOption:
41
+ def __init__(self, field: str, order: str = "asc"):
42
+ self.field = field
43
+ self.order = order
44
+
45
+
46
+ class SearchQuery:
47
+ """
48
+ Generic class to represent JSON request structure.
49
+ """
50
+ @classmethod
51
+ def from_dict(cls, data: dict):
52
+ """
53
+ Helper to convert dictionary coming from endpoint to SearchQuery object.
54
+ """
55
+
56
+ svc_name = data.get("serviceName") or data.get("service_name") or "pipeline_runner"
57
+
58
+ return cls(
59
+ filters=data.get("filters"),
60
+ sort=data.get("sort"),
61
+ limit=data.get("limit", 5000),
62
+ page=data.get("page", 1),
63
+ size=data.get("size", 50),
64
+ service_name=svc_name,
65
+ groups=data.get("groups"),
66
+ group_summaries=data.get("groupSummaries")
67
+ )
68
+
69
+
70
+ def __init__(self,
71
+ filters: Optional[Dict[str, Any]] = None,
72
+ sort: Optional[List[SortOption]] = None,
73
+ limit: int = 5000,
74
+ page: int = 1,
75
+ size: int = 50,
76
+ service_name: str = "pipeline_runner",
77
+ groups: Optional[List[Union[GroupOption, dict]]] = None,
78
+ group_summaries: Optional[List[Union[GroupSummary, dict]]] = None):
79
+
80
+ self.filters = filters if filters is not None else {}
81
+ self.limit = limit
82
+ self.page = page
83
+ self.size = size
84
+ self.service_name = service_name
85
+
86
+ self.sort: List[SortOption] = []
87
+ if sort:
88
+ for s in sort:
89
+ if isinstance(s, SortOption):
90
+ self.sort.append(s)
91
+ elif isinstance(s, dict):
92
+ self.sort.append(SortOption(field=s.get("field"), order=s.get("order", "asc")))
93
+
94
+
95
+ # New grouping feature
96
+ self.groups: List[GroupOption] = []
97
+ if groups:
98
+ for g in groups:
99
+ if isinstance(g, GroupOption):
100
+ self.groups.append(g)
101
+ elif isinstance(g, dict) and g.get("propertyName"):
102
+ self.groups.append(GroupOption(property_name=g.get("propertyName")))
103
+
104
+
105
+ # GroupSummaries
106
+ self.group_summaries: List[GroupSummary] = []
107
+ if group_summaries:
108
+ for gs in group_summaries:
109
+ if isinstance(gs, GroupSummary):
110
+ self.group_summaries.append(gs)
111
+ elif isinstance(gs, dict) and gs.get("propertyName"):
112
+ sum_type = gs.get("type", "Count")
113
+ self.group_summaries.append(GroupSummary(type=sum_type, property_name=gs.get("propertyName")))
114
+
@@ -0,0 +1 @@
1
+ __version__ = "1.4.0.dev22"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 1.4.0.dev20
3
+ Version: 1.4.0.dev22
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -1,64 +0,0 @@
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", 5000),
45
- page=data.get("page", 1),
46
- size=data.get("size", 50),
47
- service_name=svc_name
48
- )
49
-
50
- def __init__(self,
51
- filters: Optional[Dict[str, Any]] = None,
52
- sort: Optional[List[SortOption]] = None,
53
- limit: int = 5000,
54
- page: int = 1,
55
- size: int = 50,
56
- service_name: str = "pipeline_runner"):
57
-
58
- self.filters = filters if filters is not None else {}
59
- self.sort = sort if sort is not None else []
60
- self.limit = limit
61
- self.page = page
62
- self.size = size
63
- self.service_name = service_name
64
-
@@ -1 +0,0 @@
1
- __version__ = "1.4.0.dev20"