wizata-dsapi 2.1.0.dev5__tar.gz → 2.1.0.dev6__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.dev5 → wizata_dsapi-2.1.0.dev6}/PKG-INFO +1 -1
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/scripts/common.py +21 -5
- wizata_dsapi-2.1.0.dev6/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi.egg-info/PKG-INFO +1 -1
- wizata_dsapi-2.1.0.dev5/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/LICENSE.txt +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/README.rst +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/setup.cfg +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/setup.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/api_config.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/dashboard.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/edge_config.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/edge_device.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/edge_module.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/execution_log.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/graylog_log.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/mobile_asset.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/notification.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/plots/theme.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/search.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/template_config.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/twin.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/user.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/wizata_dsapi_client.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -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
|
-
#
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
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
|
-
|
|
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.dev6"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.0.dev5"
|
|
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
|
|
File without changes
|
{wizata_dsapi-2.1.0.dev5 → wizata_dsapi-2.1.0.dev6}/wizata_dsapi.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|