rdt 1.13.0.dev0__tar.gz → 1.13.1.dev0__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.
- {rdt-1.13.0.dev0/rdt.egg-info → rdt-1.13.1.dev0}/PKG-INFO +5 -2
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/pyproject.toml +7 -4
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/__init__.py +1 -1
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/base.py +1 -1
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/numerical.py +1 -1
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/pii/anonymizer.py +1 -2
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/utils.py +3 -1
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0/rdt.egg-info}/PKG-INFO +5 -2
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt.egg-info/requires.txt +5 -1
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/LICENSE +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/README.md +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/errors.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/hyper_transformer.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/__init__.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/datasets/__init__.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/datasets/base.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/datasets/boolean.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/datasets/categorical.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/datasets/datetime.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/datasets/id.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/datasets/numerical.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/datasets/pii.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/datasets/text.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/datasets/utils.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/performance.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/performance/profiling.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/__init__.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/_validators.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/boolean.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/categorical.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/datetime.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/id.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/null.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/pii/__init__.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/pii/anonymization.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/pii/utils.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt/transformers/text.py +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt.egg-info/SOURCES.txt +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt.egg-info/dependency_links.txt +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt.egg-info/entry_points.txt +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/rdt.egg-info/top_level.txt +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/setup.cfg +0 -0
- {rdt-1.13.0.dev0 → rdt-1.13.1.dev0}/tests/test_tasks.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rdt
|
|
3
|
-
Version: 1.13.
|
|
3
|
+
Version: 1.13.1.dev0
|
|
4
4
|
Summary: Reversible Data Transforms
|
|
5
5
|
Author-email: "DataCebo, Inc." <info@sdv.dev>
|
|
6
6
|
License: BSL-1.1
|
|
@@ -39,8 +39,11 @@ Requires-Dist: scikit-learn>=1.1.3; python_version >= "3.11" and python_version
|
|
|
39
39
|
Requires-Dist: scikit-learn>=1.3.1; python_version >= "3.12"
|
|
40
40
|
Requires-Dist: Faker>=17
|
|
41
41
|
Provides-Extra: copulas
|
|
42
|
-
Requires-Dist: copulas>=0.
|
|
42
|
+
Requires-Dist: copulas>=0.12.0; extra == "copulas"
|
|
43
|
+
Provides-Extra: pyarrow
|
|
44
|
+
Requires-Dist: pyarrow>=17.0.0; extra == "pyarrow"
|
|
43
45
|
Provides-Extra: test
|
|
46
|
+
Requires-Dist: rdt[pyarrow]; extra == "test"
|
|
44
47
|
Requires-Dist: rdt[copulas]; extra == "test"
|
|
45
48
|
Requires-Dist: pytest>=3.4.2; extra == "test"
|
|
46
49
|
Requires-Dist: pytest-cov>=2.6.0; extra == "test"
|
|
@@ -48,8 +48,10 @@ dependencies = [
|
|
|
48
48
|
rdt = { main = 'rdt.cli.__main__:main' }
|
|
49
49
|
|
|
50
50
|
[project.optional-dependencies]
|
|
51
|
-
copulas = ['copulas>=0.
|
|
51
|
+
copulas = ['copulas>=0.12.0',]
|
|
52
|
+
pyarrow = ['pyarrow>=17.0.0']
|
|
52
53
|
test = [
|
|
54
|
+
'rdt[pyarrow]',
|
|
53
55
|
'rdt[copulas]',
|
|
54
56
|
|
|
55
57
|
'pytest>=3.4.2',
|
|
@@ -137,7 +139,7 @@ collect_ignore = ['pyproject.toml']
|
|
|
137
139
|
exclude_lines = ['NotImplementedError()']
|
|
138
140
|
|
|
139
141
|
[tool.bumpversion]
|
|
140
|
-
current_version = "1.13.
|
|
142
|
+
current_version = "1.13.1.dev0"
|
|
141
143
|
parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?'
|
|
142
144
|
serialize = [
|
|
143
145
|
'{major}.{minor}.{patch}.{release}{candidate}',
|
|
@@ -203,10 +205,11 @@ select = [
|
|
|
203
205
|
# print statements
|
|
204
206
|
"T201",
|
|
205
207
|
# pandas-vet
|
|
206
|
-
"PD"
|
|
208
|
+
"PD",
|
|
209
|
+
# numpy 2.0
|
|
210
|
+
"NPY201"
|
|
207
211
|
]
|
|
208
212
|
ignore = [
|
|
209
|
-
"E501",
|
|
210
213
|
# pydocstyle
|
|
211
214
|
"D107", # Missing docstring in __init__
|
|
212
215
|
"D417", # Missing argument descriptions in the docstring, this is a bug from pydocstyle: https://github.com/PyCQA/pydocstyle/issues/449
|
|
@@ -343,7 +343,7 @@ class BaseTransformer:
|
|
|
343
343
|
instanced = {
|
|
344
344
|
key: getattr(self, key)
|
|
345
345
|
for key in keys
|
|
346
|
-
if key != 'model_missing_values' # Remove after deprecation
|
|
346
|
+
if key != 'model_missing_values' and hasattr(self, key) # Remove after deprecation
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
if defaults == instanced:
|
|
@@ -104,7 +104,7 @@ class FloatFormatter(BaseTransformer):
|
|
|
104
104
|
|
|
105
105
|
def _validate_values_within_bounds(self, data):
|
|
106
106
|
if not self.computer_representation.startswith('Float'):
|
|
107
|
-
fractions = data[~data.isna() & data
|
|
107
|
+
fractions = data[~data.isna() & (data != (data // 1))]
|
|
108
108
|
if not fractions.empty:
|
|
109
109
|
raise ValueError(
|
|
110
110
|
f"The column '{data.name}' contains float values {fractions.tolist()}. "
|
|
@@ -133,8 +133,7 @@ class AnonymizedFaker(BaseTransformer):
|
|
|
133
133
|
self.provider_name = provider_name if provider_name else 'BaseProvider'
|
|
134
134
|
if self.provider_name != 'BaseProvider' and function_name is None:
|
|
135
135
|
raise TransformerInputError(
|
|
136
|
-
|
|
137
|
-
f"'{self.provider_name}' provider."
|
|
136
|
+
f"Please specify the function name to use from the '{self.provider_name}' provider."
|
|
138
137
|
)
|
|
139
138
|
|
|
140
139
|
self.function_name = function_name if function_name else 'lexify'
|
|
@@ -254,6 +254,8 @@ def learn_rounding_digits(data):
|
|
|
254
254
|
"""
|
|
255
255
|
# check if data has any decimals
|
|
256
256
|
name = data.name
|
|
257
|
+
if str(data.dtype).endswith('[pyarrow]'):
|
|
258
|
+
data = data.to_numpy()
|
|
257
259
|
roundable_data = data[~(np.isinf(data.astype(float)) | pd.isna(data))]
|
|
258
260
|
|
|
259
261
|
# Doesn't contain numbers
|
|
@@ -261,7 +263,7 @@ def learn_rounding_digits(data):
|
|
|
261
263
|
return None
|
|
262
264
|
|
|
263
265
|
# Doesn't contain decimal digits
|
|
264
|
-
if (
|
|
266
|
+
if (roundable_data == roundable_data.astype(int)).all():
|
|
265
267
|
return 0
|
|
266
268
|
|
|
267
269
|
# Try to round to fewer digits
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rdt
|
|
3
|
-
Version: 1.13.
|
|
3
|
+
Version: 1.13.1.dev0
|
|
4
4
|
Summary: Reversible Data Transforms
|
|
5
5
|
Author-email: "DataCebo, Inc." <info@sdv.dev>
|
|
6
6
|
License: BSL-1.1
|
|
@@ -39,8 +39,11 @@ Requires-Dist: scikit-learn>=1.1.3; python_version >= "3.11" and python_version
|
|
|
39
39
|
Requires-Dist: scikit-learn>=1.3.1; python_version >= "3.12"
|
|
40
40
|
Requires-Dist: Faker>=17
|
|
41
41
|
Provides-Extra: copulas
|
|
42
|
-
Requires-Dist: copulas>=0.
|
|
42
|
+
Requires-Dist: copulas>=0.12.0; extra == "copulas"
|
|
43
|
+
Provides-Extra: pyarrow
|
|
44
|
+
Requires-Dist: pyarrow>=17.0.0; extra == "pyarrow"
|
|
43
45
|
Provides-Extra: test
|
|
46
|
+
Requires-Dist: rdt[pyarrow]; extra == "test"
|
|
44
47
|
Requires-Dist: rdt[copulas]; extra == "test"
|
|
45
48
|
Requires-Dist: pytest>=3.4.2; extra == "test"
|
|
46
49
|
Requires-Dist: pytest-cov>=2.6.0; extra == "test"
|
|
@@ -26,7 +26,7 @@ scipy>=1.12.0
|
|
|
26
26
|
scikit-learn>=1.3.1
|
|
27
27
|
|
|
28
28
|
[copulas]
|
|
29
|
-
copulas>=0.
|
|
29
|
+
copulas>=0.12.0
|
|
30
30
|
|
|
31
31
|
[dev]
|
|
32
32
|
rdt[test]
|
|
@@ -42,7 +42,11 @@ tox<5,>=2.9.1
|
|
|
42
42
|
tabulate<1,>=0.8.9
|
|
43
43
|
invoke
|
|
44
44
|
|
|
45
|
+
[pyarrow]
|
|
46
|
+
pyarrow>=17.0.0
|
|
47
|
+
|
|
45
48
|
[test]
|
|
49
|
+
rdt[pyarrow]
|
|
46
50
|
rdt[copulas]
|
|
47
51
|
pytest>=3.4.2
|
|
48
52
|
pytest-cov>=2.6.0
|
|
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
|