wizata-dsapi 2.1.0.dev5__tar.gz → 2.1.0.dev7__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 (66) hide show
  1. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/PKG-INFO +1 -1
  2. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/execution_log.py +14 -2
  3. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/scripts/common.py +21 -5
  4. wizata_dsapi-2.1.0.dev7/wizata_dsapi/version.py +1 -0
  5. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi.egg-info/PKG-INFO +1 -1
  6. wizata_dsapi-2.1.0.dev5/wizata_dsapi/version.py +0 -1
  7. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/LICENSE.txt +0 -0
  8. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/README.rst +0 -0
  9. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/setup.cfg +0 -0
  10. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/setup.py +0 -0
  11. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/__init__.py +0 -0
  12. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/api_config.py +0 -0
  13. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/api_dto.py +0 -0
  14. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/api_interface.py +0 -0
  15. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/bucket.py +0 -0
  16. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/business_label.py +0 -0
  17. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/context.py +0 -0
  18. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/dashboard.py +0 -0
  19. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/dataframe_toolkit.py +0 -0
  20. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/datapoint.py +0 -0
  21. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/datastore.py +0 -0
  22. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/ds_dataframe.py +0 -0
  23. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/dsapi_json_encoder.py +0 -0
  24. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/edge_config.py +0 -0
  25. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/edge_device.py +0 -0
  26. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/edge_module.py +0 -0
  27. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/evaluation.py +0 -0
  28. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/execution.py +0 -0
  29. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/experiment.py +0 -0
  30. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/graylog_log.py +0 -0
  31. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/group_system.py +0 -0
  32. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/ilogger.py +0 -0
  33. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/insight.py +0 -0
  34. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/mlmodel.py +0 -0
  35. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/mobile_asset.py +0 -0
  36. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/model_toolkit.py +0 -0
  37. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/models/__init__.py +0 -0
  38. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/models/common.py +0 -0
  39. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/notification.py +0 -0
  40. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/paged_query_result.py +0 -0
  41. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/pipeline.py +0 -0
  42. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/pipeline_image.py +0 -0
  43. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/plot.py +0 -0
  44. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/plots/__init__.py +0 -0
  45. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/plots/common.py +0 -0
  46. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/plots/theme.py +0 -0
  47. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/request.py +0 -0
  48. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/script.py +0 -0
  49. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/scripts/__init__.py +0 -0
  50. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/search.py +0 -0
  51. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/solution_component.py +0 -0
  52. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/streamlit_utils.py +0 -0
  53. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/template.py +0 -0
  54. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/template_config.py +0 -0
  55. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/trigger.py +0 -0
  56. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/twin.py +0 -0
  57. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/twinregistration.py +0 -0
  58. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/user.py +0 -0
  59. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/wizard_function.py +0 -0
  60. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/wizard_request.py +0 -0
  61. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/wizata_dsapi_client.py +0 -0
  62. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi/words.py +0 -0
  63. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
  64. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
  65. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/wizata_dsapi.egg-info/requires.txt +0 -0
  66. {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev7}/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: 2.1.0.dev5
3
+ Version: 2.1.0.dev7
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -79,7 +79,9 @@ class ExecutionLog(Dto):
79
79
  message=data.get("message"),
80
80
  messages=data.get("messages"),
81
81
  timestamp=int(data["timestamp"]) if "timestamp" in data and data["timestamp"] is not None else None,
82
- level=data.get("level")
82
+ level=data.get("level"),
83
+ branch=data.get("branch"),
84
+ sha=data.get("sha"),
83
85
  )
84
86
 
85
87
  def __init__(self,
@@ -104,6 +106,8 @@ class ExecutionLog(Dto):
104
106
  message: str = None,
105
107
  messages: list = None,
106
108
  level: str = None,
109
+ branch: str = None,
110
+ sha: str = None,
107
111
  ):
108
112
 
109
113
  # labels
@@ -134,12 +138,18 @@ class ExecutionLog(Dto):
134
138
  self.edge_device_id = edge_device_id
135
139
  self.status = status
136
140
  self.level = level
141
+ # git branch this run TARGETS (which version to execute) — a label so
142
+ # runs are queryable per branch. None = default branch / non-git.
143
+ self.branch = branch
137
144
 
138
145
  # values
139
146
  if execution_id is None:
140
147
  execution_id = uuid.uuid4()
141
148
  self.execution_id = execution_id
142
149
  self.pipeline_image_id = pipeline_image_id
150
+ # resolved commit SHA the run executed — INFO only, from the branch HEAD
151
+ # (git) or the image id. Not a target.
152
+ self.sha = sha
143
153
  self.timestamp = timestamp
144
154
  self.started_date = started_date
145
155
  self.queued_date = queued_date
@@ -428,7 +438,8 @@ class ExecutionLog(Dto):
428
438
  "twin": self.get_twin_key(),
429
439
  "edgeDeviceId": self.edge_device_id,
430
440
  "status": self.status.value if hasattr(self.status, 'value') else self.status,
431
- "level": self.level
441
+ "level": self.level,
442
+ "branch": self.branch,
432
443
  }
433
444
  return {k: v for k, v in labels.items() if v is not None}
434
445
 
@@ -443,6 +454,7 @@ class ExecutionLog(Dto):
443
454
  "executionTime": self.execution_time,
444
455
  "executionTriggerId": str(self.trigger_id) if self.trigger_id else None,
445
456
  "version": self.version,
457
+ "sha": self.sha,
446
458
  "message": self.message,
447
459
  "messages": self.messages or None
448
460
  }
@@ -323,10 +323,24 @@ def formula(context: wizata_dsapi.Context):
323
323
  expression = context.properties["expression"]
324
324
  result = context.properties.get("result", "result")
325
325
 
326
- # Whitelist validation: strip everything we allow, flag any leftover token.
327
- sanitized = expression
328
- for col in sorted(df.columns, key=len, reverse=True):
329
- sanitized = sanitized.replace(f"`{col}`", "").replace(col, "")
326
+ # Replace every column name (backticked or bare) with a safe placeholder
327
+ # identifier before evaluation. Column names can contain characters that
328
+ # are illegal in a Python/pandas eval expression — e.g. tag IDs like
329
+ # 'DE_AL_Ark1_1:04800F1?Value', whose numeric segment '04800' is otherwise
330
+ # parsed as a leading-zero integer literal and raises a SyntaxError
331
+ # (DEV-5912). Substituting the whole name atomically sidesteps this.
332
+ placeholders = {} # placeholder -> real column name
333
+ substituted = expression
334
+ for i, col in enumerate(sorted(df.columns, key=len, reverse=True)):
335
+ placeholder = f"__wz_col_{i}__"
336
+ substituted = substituted.replace(f"`{col}`", placeholder).replace(col, placeholder)
337
+ placeholders[placeholder] = col
338
+
339
+ # Whitelist validation: strip placeholders + allowed functions, flag any
340
+ # leftover token as disallowed.
341
+ sanitized = substituted
342
+ for placeholder in placeholders:
343
+ sanitized = sanitized.replace(placeholder, "")
330
344
  for fn in _FORMULA_SAFE_FUNCTIONS:
331
345
  sanitized = sanitized.replace(fn, "")
332
346
  sanitized = re.sub(r"[\d\.\+\-\*/\%\(\)\s,\^]", "", sanitized)
@@ -337,7 +351,9 @@ def formula(context: wizata_dsapi.Context):
337
351
  f"{list(_FORMULA_SAFE_FUNCTIONS.keys())}"
338
352
  )
339
353
 
340
- df[result] = df.eval(expression, local_dict=_FORMULA_SAFE_FUNCTIONS, engine="python")
354
+ # Evaluate against a frame whose columns are the safe placeholder names.
355
+ safe_df = df.rename(columns={real: ph for ph, real in placeholders.items()})
356
+ df[result] = safe_df.eval(substituted, local_dict=_FORMULA_SAFE_FUNCTIONS, engine="python")
341
357
  return df
342
358
 
343
359
 
@@ -0,0 +1 @@
1
+ __version__ = "2.1.0.dev7"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 2.1.0.dev5
3
+ Version: 2.1.0.dev7
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__ = "2.1.0.dev5"