wizata-dsapi 2.1.0.dev8__tar.gz → 2.1.0.dev10__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-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/PKG-INFO +1 -1
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/context.py +7 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/twin.py +29 -10
- wizata_dsapi-2.1.0.dev10/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi.egg-info/PKG-INFO +1 -1
- wizata_dsapi-2.1.0.dev8/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/LICENSE.txt +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/README.rst +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/setup.cfg +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/setup.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/api_config.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/dashboard.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/edge_config.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/edge_device.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/edge_module.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/execution_log.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/graylog_log.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/mobile_asset.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/notification.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/plots/theme.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/search.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/template_config.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/user.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/wizata_dsapi_client.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -68,6 +68,13 @@ class Context(ILogger):
|
|
|
68
68
|
self.pipeline_id = pipeline_id
|
|
69
69
|
self.execution_id = execution_id
|
|
70
70
|
self.experiment_id = experiment_id
|
|
71
|
+
# Git ref the pipeline body was loaded at (DEV-5895): sha is the exact
|
|
72
|
+
# commit that ran (stamped on the ExecutionLog, DEV-5950), branch is the
|
|
73
|
+
# targeted branch when any. RAW-script resolution reads scripts/<name>.py
|
|
74
|
+
# from git at this sha so a branch run executes the branch's script
|
|
75
|
+
# version — not the Postgres "current" one. Left None off the git path.
|
|
76
|
+
self.branch = None
|
|
77
|
+
self.sha = None
|
|
71
78
|
self.template = template
|
|
72
79
|
self.registration = registration
|
|
73
80
|
self.now = now
|
|
@@ -14,6 +14,31 @@ def is_valid_hex_color(color):
|
|
|
14
14
|
return True
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
def parse_color(color):
|
|
18
|
+
"""
|
|
19
|
+
Normalize a colour coming from a payload or a constructor (DEV-5970).
|
|
20
|
+
|
|
21
|
+
A BLANK value means "no colour", not an invalid one: the platform's own
|
|
22
|
+
.NET side stores `""` on twins it creates, and because this validation runs
|
|
23
|
+
on the READ path (`from_json`) a single such row used to raise and make
|
|
24
|
+
`GET /dsapi/twins/` fail for the WHOLE collection.
|
|
25
|
+
|
|
26
|
+
Anything else non-blank is still validated and still raises, because
|
|
27
|
+
`from_json` is also the write path (`POST` / `PUT /dsapi/twins/` validate
|
|
28
|
+
nowhere else) — a colour typed as `red` must remain a 400.
|
|
29
|
+
|
|
30
|
+
:param color: raw colour value or None.
|
|
31
|
+
:return: the colour string, or None when absent/blank.
|
|
32
|
+
"""
|
|
33
|
+
if color is None:
|
|
34
|
+
return None
|
|
35
|
+
color = str(color)
|
|
36
|
+
if color.strip() == '':
|
|
37
|
+
return None
|
|
38
|
+
is_valid_hex_color(color)
|
|
39
|
+
return color
|
|
40
|
+
|
|
41
|
+
|
|
17
42
|
class TwinType(ApiDto):
|
|
18
43
|
"""
|
|
19
44
|
twin type
|
|
@@ -41,9 +66,7 @@ class TwinType(ApiDto):
|
|
|
41
66
|
self.twin_type_id = twin_type_id
|
|
42
67
|
self.name = name
|
|
43
68
|
self.icon = icon
|
|
44
|
-
self.color = color
|
|
45
|
-
if color is not None:
|
|
46
|
-
is_valid_hex_color(color)
|
|
69
|
+
self.color = parse_color(color)
|
|
47
70
|
self.description = description
|
|
48
71
|
self.createdById = None
|
|
49
72
|
self.createdDate = None
|
|
@@ -62,8 +85,7 @@ class TwinType(ApiDto):
|
|
|
62
85
|
if "name" in obj.keys() and obj["name"] is not None:
|
|
63
86
|
self.name = obj["name"]
|
|
64
87
|
if "color" in obj.keys() and obj["color"] is not None:
|
|
65
|
-
|
|
66
|
-
self.color = str(obj["color"])
|
|
88
|
+
self.color = parse_color(obj["color"])
|
|
67
89
|
if "icon" in obj.keys() and obj["icon"] is not None:
|
|
68
90
|
self.icon = str(obj["icon"])
|
|
69
91
|
if "description" in obj.keys() and obj["description"] is not None:
|
|
@@ -185,9 +207,7 @@ class Twin(ApiDto):
|
|
|
185
207
|
self.longitude = longitude
|
|
186
208
|
self.latitude_id = latitude_id
|
|
187
209
|
self.longitude_id = longitude_id
|
|
188
|
-
|
|
189
|
-
is_valid_hex_color(color)
|
|
190
|
-
self.color = color
|
|
210
|
+
self.color = parse_color(color)
|
|
191
211
|
self.icon = icon
|
|
192
212
|
self.extra_properties = extra_properties
|
|
193
213
|
self.is_asset = is_asset
|
|
@@ -229,8 +249,7 @@ class Twin(ApiDto):
|
|
|
229
249
|
if "longitudeSensorId" in obj.keys() and obj["longitudeSensorId"] is not None:
|
|
230
250
|
self.longitude_id = uuid.UUID(obj["longitudeSensorId"])
|
|
231
251
|
if "color" in obj.keys() and obj["color"] is not None:
|
|
232
|
-
|
|
233
|
-
self.color = str(obj["color"])
|
|
252
|
+
self.color = parse_color(obj["color"])
|
|
234
253
|
if "icon" in obj.keys() and obj["icon"] is not None:
|
|
235
254
|
self.icon = str(obj["icon"])
|
|
236
255
|
if "description" in obj.keys() and obj["description"] is not None:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.0.dev10"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.0.dev8"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wizata_dsapi-2.1.0.dev8 → wizata_dsapi-2.1.0.dev10}/wizata_dsapi.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|