wizata-dsapi 1.2.2__tar.gz → 1.2.3__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.
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/PKG-INFO +1 -1
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/request.py +36 -0
- wizata_dsapi-1.2.3/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi.egg-info/PKG-INFO +1 -1
- wizata_dsapi-1.2.2/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/LICENSE.txt +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/README.rst +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/setup.cfg +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/setup.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/__init__.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/api_config.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/twin.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/wizata_dsapi_client.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-1.2.2 → wizata_dsapi-1.2.3}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -13,6 +13,25 @@ filter_map = {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
def _format_group(my_group:dict) -> dict:
|
|
17
|
+
"""
|
|
18
|
+
verify and format a group
|
|
19
|
+
:param my_group: group to check and format
|
|
20
|
+
:return: formatted group
|
|
21
|
+
"""
|
|
22
|
+
if my_group is None or not isinstance(my_group, dict):
|
|
23
|
+
raise ValueError(f"illegal group {my_group}")
|
|
24
|
+
if "group_by" not in my_group:
|
|
25
|
+
my_group["group_by"] = "id"
|
|
26
|
+
elif my_group["group_by"] not in ["id" , "type"]:
|
|
27
|
+
raise ValueError(f"illegal group {my_group['group_by']}")
|
|
28
|
+
if "event_ids" in my_group:
|
|
29
|
+
my_group["events"] = my_group["event_ids"]
|
|
30
|
+
if "system_id" not in my_group or my_group["system_id"] is None or not isinstance(["system_id"], str):
|
|
31
|
+
raise ValueError(f"please specify system_id in {my_group}")
|
|
32
|
+
return my_group
|
|
33
|
+
|
|
34
|
+
|
|
16
35
|
class Request(ApiDto):
|
|
17
36
|
"""
|
|
18
37
|
request defines how to fetch data from time-series database.
|
|
@@ -117,6 +136,23 @@ class Request(ApiDto):
|
|
|
117
136
|
else:
|
|
118
137
|
raise TypeError(f'field must be None, str or a list of str')
|
|
119
138
|
|
|
139
|
+
@property
|
|
140
|
+
def groups(self) -> list:
|
|
141
|
+
"""
|
|
142
|
+
return formatted groups list based on group
|
|
143
|
+
:return:
|
|
144
|
+
"""
|
|
145
|
+
if self.group is not None and self.group != {}:
|
|
146
|
+
if not isinstance(self.group, list):
|
|
147
|
+
return [_format_group(self.group)]
|
|
148
|
+
else:
|
|
149
|
+
groups = []
|
|
150
|
+
for group in self.group:
|
|
151
|
+
groups.append(_format_group(group))
|
|
152
|
+
return groups
|
|
153
|
+
else:
|
|
154
|
+
return []
|
|
155
|
+
|
|
120
156
|
def get_template_id(self):
|
|
121
157
|
"""
|
|
122
158
|
extract template id from request if present.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.2.3"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.2.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|