wizata-dsapi 1.2.24__tar.gz → 1.2.25__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.24 → wizata_dsapi-1.2.25}/PKG-INFO +1 -1
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/template.py +14 -4
- wizata_dsapi-1.2.25/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi.egg-info/PKG-INFO +1 -1
- wizata_dsapi-1.2.24/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/LICENSE.txt +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/README.rst +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/setup.cfg +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/setup.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/__init__.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/api_config.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/twin.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/wizata_dsapi_client.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-1.2.24 → wizata_dsapi-1.2.25}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import uuid
|
|
2
2
|
import json
|
|
3
|
+
from typing import Optional
|
|
3
4
|
|
|
4
5
|
from .api_dto import ApiDto, VarType
|
|
5
6
|
|
|
@@ -243,7 +244,8 @@ class Template(ApiDto):
|
|
|
243
244
|
p_type: VarType,
|
|
244
245
|
required: bool = True,
|
|
245
246
|
template_property_id: uuid.UUID = None,
|
|
246
|
-
description: str = None
|
|
247
|
+
description: str = None,
|
|
248
|
+
unit_id: uuid.UUID = None):
|
|
247
249
|
"""
|
|
248
250
|
add a property to the template.
|
|
249
251
|
:param str name: name of the property.
|
|
@@ -251,6 +253,7 @@ class Template(ApiDto):
|
|
|
251
253
|
:param bool required: set if property is required (default: true)
|
|
252
254
|
:param uuid.UUID template_property_id: technical id of the template property.
|
|
253
255
|
:param str description: additional information as a description.
|
|
256
|
+
:param uuid.UUID unit_id: unique identifier of unit for datapoint property.
|
|
254
257
|
"""
|
|
255
258
|
|
|
256
259
|
if self.properties is None:
|
|
@@ -264,7 +267,8 @@ class Template(ApiDto):
|
|
|
264
267
|
name=name,
|
|
265
268
|
p_type=p_type,
|
|
266
269
|
required=required,
|
|
267
|
-
description=description
|
|
270
|
+
description=description,
|
|
271
|
+
unit_id=unit_id
|
|
268
272
|
)
|
|
269
273
|
property_value.template_id = self.template_id
|
|
270
274
|
|
|
@@ -275,7 +279,7 @@ class Template(ApiDto):
|
|
|
275
279
|
|
|
276
280
|
self.properties.append(property_value)
|
|
277
281
|
|
|
278
|
-
def get_property(self, property_name) -> TemplateProperty:
|
|
282
|
+
def get_property(self, property_name) -> Optional[TemplateProperty]:
|
|
279
283
|
"""
|
|
280
284
|
get a property from its name.
|
|
281
285
|
:param property_name: name of the property.
|
|
@@ -284,6 +288,7 @@ class Template(ApiDto):
|
|
|
284
288
|
for t_property in self.properties:
|
|
285
289
|
if t_property.name == property_name:
|
|
286
290
|
return t_property
|
|
291
|
+
return None
|
|
287
292
|
|
|
288
293
|
def add_property(self, property_value):
|
|
289
294
|
"""
|
|
@@ -317,11 +322,16 @@ class Template(ApiDto):
|
|
|
317
322
|
if "description" in property_value:
|
|
318
323
|
description = property_value["description"]
|
|
319
324
|
|
|
325
|
+
unit_id = None
|
|
326
|
+
if "unitId" in property_value and property_value["unitId"] is not None:
|
|
327
|
+
unit_id = uuid.UUID(property_value["unitId"])
|
|
328
|
+
|
|
320
329
|
self.add(template_property_id=template_property_id,
|
|
321
330
|
name=name,
|
|
322
331
|
p_type=p_type,
|
|
323
332
|
required=required,
|
|
324
|
-
description=description
|
|
333
|
+
description=description,
|
|
334
|
+
unit_id=unit_id)
|
|
325
335
|
elif isinstance(property_value, TemplateProperty):
|
|
326
336
|
property_value.template_id = self.template_id
|
|
327
337
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.2.25"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.2.24"
|
|
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
|