Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

drpt

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drpt - npm Package Compare versions

Comparing version
0.7.0
to
0.8.0
+1
-1
PKG-INFO
Metadata-Version: 2.1
Name: drpt
Version: 0.7.0
Version: 0.8.0
Summary: Tool for preparing a dataset for publishing by dropping, renaming, scaling, and obfuscating columns defined in a recipe.

@@ -5,0 +5,0 @@ Author-email: Constantinos Xanthopoulos <conx@xanthopoulos.info>

@@ -7,3 +7,3 @@ [build-system]

name = "drpt"
version = "0.7.0"
version = "0.8.0"
description = "Tool for preparing a dataset for publishing by dropping, renaming, scaling, and obfuscating columns defined in a recipe."

@@ -40,3 +40,3 @@ readme = "README.md"

[tool.bumpver]
current_version = "0.7.0"
current_version = "0.8.0"
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"

@@ -43,0 +43,0 @@ commit_message = "Bump version {old_version} -> {new_version}"

Metadata-Version: 2.1
Name: drpt
Version: 0.7.0
Version: 0.8.0
Summary: Tool for preparing a dataset for publishing by dropping, renaming, scaling, and obfuscating columns defined in a recipe.

@@ -5,0 +5,0 @@ Author-email: Constantinos Xanthopoulos <conx@xanthopoulos.info>

@@ -1,1 +0,1 @@

__version__ = "0.7.0"
__version__ = "0.8.0"

@@ -69,2 +69,18 @@ #!/usr/bin/env python3.9

class NpEncoder(json.JSONEncoder):
"""
JSON Encoder for numpy types
Source: https://stackoverflow.com/a/57915246
"""
def default(self, obj):
if isinstance(obj, np.integer):
return int(obj)
if isinstance(obj, np.floating):
return float(obj)
if isinstance(obj, np.ndarray):
return obj.tolist()
return super(NpEncoder, self).default(obj)
class ProgressMessage:

@@ -249,5 +265,7 @@ def __init__(self, message, parent=None):

# Prepare compute processes for a non-skipped column
if not skip_scaling:
col_min = self.data[col].min()
col_max = self.data[col].max()
# Custom limits scaling
if self.limits is not None and col in self.limits:

@@ -261,4 +279,15 @@ min, max = self.limits[col]["min"], self.limits[col]["max"]

)
target = compute(
min_max_scale_limits(min, col_min, col_max)
)[0]
min, max = col_min, col_max
self._report_log("SCALE_DEFAULT", col, f"[{min},{max}]")
scale_properties = {
"range": [min, max],
"target": target,
}
self._report_log(
"SCALE_DEFAULT_TARGET",
col,
json.dumps(scale_properties, cls=NpEncoder),
)
else:

@@ -305,2 +334,3 @@ if pd.isna(min):

)
# Default Min/Max scaling
else:

@@ -329,2 +359,3 @@ self._report_log(

# Execute scaling processes using Dask
if not self.dry_run:

@@ -331,0 +362,0 @@ if len(min_max_scale_limit_futures) > 0: