wizata-dsapi 1.4.0.dev20__tar.gz → 1.4.0.dev21__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 (56) hide show
  1. {wizata_dsapi-1.4.0.dev20/wizata_dsapi.egg-info → wizata_dsapi-1.4.0.dev21}/PKG-INFO +1 -1
  2. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/paged_query_result.py +6 -2
  3. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/search.py +39 -3
  4. wizata_dsapi-1.4.0.dev21/wizata_dsapi/version.py +1 -0
  5. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21/wizata_dsapi.egg-info}/PKG-INFO +1 -1
  6. wizata_dsapi-1.4.0.dev20/wizata_dsapi/version.py +0 -1
  7. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/LICENSE.txt +0 -0
  8. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/README.rst +0 -0
  9. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/setup.cfg +0 -0
  10. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/setup.py +0 -0
  11. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/__init__.py +0 -0
  12. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/api_config.py +0 -0
  13. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/api_dto.py +0 -0
  14. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/api_interface.py +0 -0
  15. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/bucket.py +0 -0
  16. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/business_label.py +0 -0
  17. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/context.py +0 -0
  18. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/dataframe_toolkit.py +0 -0
  19. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/datapoint.py +0 -0
  20. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/datastore.py +0 -0
  21. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/ds_dataframe.py +0 -0
  22. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/dsapi_json_encoder.py +0 -0
  23. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/evaluation.py +0 -0
  24. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/execution.py +0 -0
  25. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/execution_log.py +0 -0
  26. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/experiment.py +0 -0
  27. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/group_system.py +0 -0
  28. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/ilogger.py +0 -0
  29. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/insight.py +0 -0
  30. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/mlmodel.py +0 -0
  31. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/model_toolkit.py +0 -0
  32. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/models/__init__.py +0 -0
  33. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/models/common.py +0 -0
  34. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/pipeline.py +0 -0
  35. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/pipeline_image.py +0 -0
  36. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/plot.py +0 -0
  37. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/plots/__init__.py +0 -0
  38. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/plots/common.py +0 -0
  39. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/request.py +0 -0
  40. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/script.py +0 -0
  41. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/scripts/__init__.py +0 -0
  42. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/scripts/common.py +0 -0
  43. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/solution_component.py +0 -0
  44. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/streamlit_utils.py +0 -0
  45. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/template.py +0 -0
  46. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/trigger.py +0 -0
  47. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/twin.py +0 -0
  48. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/twinregistration.py +0 -0
  49. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/wizard_function.py +0 -0
  50. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/wizard_request.py +0 -0
  51. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/wizata_dsapi_client.py +0 -0
  52. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi/words.py +0 -0
  53. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
  54. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
  55. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/wizata_dsapi.egg-info/requires.txt +0 -0
  56. {wizata_dsapi-1.4.0.dev20 → wizata_dsapi-1.4.0.dev21}/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.dev21
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
  }
@@ -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
- return cls(
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
 
@@ -0,0 +1 @@
1
+ __version__ = "1.4.0.dev21"
@@ -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.dev21
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -1 +0,0 @@
1
- __version__ = "1.4.0.dev20"