rdt 1.19.1.dev0__tar.gz → 1.20.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.19.1.dev0/rdt.egg-info → rdt-1.20.1.dev0}/PKG-INFO +4 -5
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/README.md +1 -1
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/pyproject.toml +4 -5
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/__init__.py +1 -1
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/utils.py +37 -26
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0/rdt.egg-info}/PKG-INFO +4 -5
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/LICENSE +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/_utils.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/errors.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/hyper_transformer.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/__init__.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/datasets/__init__.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/datasets/base.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/datasets/boolean.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/datasets/categorical.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/datasets/datetime.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/datasets/id.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/datasets/numerical.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/datasets/pii.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/datasets/text.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/datasets/utils.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/performance.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/performance/profiling.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/__init__.py +4 -4
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/_validators.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/base.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/boolean.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/categorical.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/datetime.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/id.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/null.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/numerical.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/pii/__init__.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/pii/anonymization.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/pii/anonymizer.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/pii/utils.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt/transformers/text.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt.egg-info/SOURCES.txt +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt.egg-info/dependency_links.txt +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt.egg-info/entry_points.txt +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt.egg-info/requires.txt +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/rdt.egg-info/top_level.txt +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/setup.cfg +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/tests/test_scripts.py +0 -0
- {rdt-1.19.1.dev0 → rdt-1.20.1.dev0}/tests/test_tasks.py +0 -0
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rdt
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.20.1.dev0
|
|
4
4
|
Summary: Reversible Data Transforms
|
|
5
5
|
Author-email: "DataCebo, Inc." <info@sdv.dev>
|
|
6
|
-
License:
|
|
6
|
+
License-Expression: BUSL-1.1
|
|
7
7
|
Project-URL: Source Code, https://github.com/sdv-dev/RDT/
|
|
8
8
|
Project-URL: Issue Tracker, https://github.com/sdv-dev/RDT/issues
|
|
9
9
|
Project-URL: Changes, https://github.com/sdv-dev/RDT/blob/main/HISTORY.md
|
|
10
10
|
Project-URL: Twitter, https://twitter.com/sdv_dev
|
|
11
|
-
Project-URL: Chat, https://
|
|
11
|
+
Project-URL: Chat, https://forum.datacebo.com/
|
|
12
12
|
Keywords: machine learning,synthetic data generation,benchmark,generative models
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: License :: Free for non-commercial use
|
|
16
15
|
Classifier: Natural Language :: English
|
|
17
16
|
Classifier: Programming Language :: Python :: 3
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -89,7 +88,7 @@ Dynamic: license-file
|
|
|
89
88
|
[](https://github.com/sdv-dev/RDT/actions/workflows/unit.yml)
|
|
90
89
|
[](https://pepy.tech/project/rdt)
|
|
91
90
|
[](https://codecov.io/gh/sdv-dev/RDT)
|
|
92
|
-
[](https://forum.datacebo.com)
|
|
93
92
|
|
|
94
93
|
<div align="left">
|
|
95
94
|
<br/>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](https://github.com/sdv-dev/RDT/actions/workflows/unit.yml)
|
|
10
10
|
[](https://pepy.tech/project/rdt)
|
|
11
11
|
[](https://codecov.io/gh/sdv-dev/RDT)
|
|
12
|
-
[](https://forum.datacebo.com)
|
|
13
13
|
|
|
14
14
|
<div align="left">
|
|
15
15
|
<br/>
|
|
@@ -5,7 +5,6 @@ authors = [{ name = 'DataCebo, Inc.', email = 'info@sdv.dev' }]
|
|
|
5
5
|
classifiers = [
|
|
6
6
|
'Development Status :: 5 - Production/Stable',
|
|
7
7
|
'Intended Audience :: Developers',
|
|
8
|
-
'License :: Free for non-commercial use',
|
|
9
8
|
'Natural Language :: English',
|
|
10
9
|
'Programming Language :: Python :: 3',
|
|
11
10
|
'Programming Language :: Python :: 3.9',
|
|
@@ -18,7 +17,8 @@ classifiers = [
|
|
|
18
17
|
]
|
|
19
18
|
keywords = ['machine learning', 'synthetic data generation', 'benchmark', 'generative models']
|
|
20
19
|
dynamic = ['version']
|
|
21
|
-
license =
|
|
20
|
+
license = 'BUSL-1.1'
|
|
21
|
+
license-files = ['LICENSE']
|
|
22
22
|
requires-python = '>=3.9,<3.15'
|
|
23
23
|
readme = 'README.md'
|
|
24
24
|
dependencies = [
|
|
@@ -52,7 +52,7 @@ dependencies = [
|
|
|
52
52
|
"Issue Tracker" = "https://github.com/sdv-dev/RDT/issues"
|
|
53
53
|
"Changes" = "https://github.com/sdv-dev/RDT/blob/main/HISTORY.md"
|
|
54
54
|
"Twitter" = "https://twitter.com/sdv_dev"
|
|
55
|
-
"Chat" = "https://
|
|
55
|
+
"Chat" = "https://forum.datacebo.com/"
|
|
56
56
|
|
|
57
57
|
[project.entry-points]
|
|
58
58
|
rdt = { main = 'rdt.cli.__main__:main' }
|
|
@@ -101,7 +101,6 @@ readme = ['rundoc>=0.4.3,<0.5',]
|
|
|
101
101
|
|
|
102
102
|
[tool.setuptools]
|
|
103
103
|
include-package-data = true
|
|
104
|
-
license-files = ['LICENSE']
|
|
105
104
|
|
|
106
105
|
[tool.setuptools.packages.find]
|
|
107
106
|
include = ['rdt', 'rdt.*']
|
|
@@ -151,7 +150,7 @@ collect_ignore = ['pyproject.toml']
|
|
|
151
150
|
exclude_lines = ['NotImplementedError()']
|
|
152
151
|
|
|
153
152
|
[tool.bumpversion]
|
|
154
|
-
current_version = "1.
|
|
153
|
+
current_version = "1.20.1.dev0"
|
|
155
154
|
parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?'
|
|
156
155
|
serialize = [
|
|
157
156
|
'{major}.{minor}.{patch}.{release}{candidate}',
|
|
@@ -15,7 +15,10 @@ from dateutil import parser
|
|
|
15
15
|
from dateutil.parser import ParserError, UnknownTimezoneWarning
|
|
16
16
|
from dateutil.tz import UTC
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
if sys.version_info >= (3, 11): # isort:skip # pragma: no cover
|
|
19
|
+
from re import _parser
|
|
20
|
+
else: # pragma: no cover
|
|
21
|
+
import sre_parse as _parser
|
|
19
22
|
|
|
20
23
|
LOGGER = logging.getLogger(__name__)
|
|
21
24
|
|
|
@@ -54,7 +57,7 @@ def _any(options, max_repeat):
|
|
|
54
57
|
|
|
55
58
|
def _max_repeat(options, max_repeat):
|
|
56
59
|
min_, max_, options = options
|
|
57
|
-
if max_ ==
|
|
60
|
+
if max_ == _parser.MAXREPEAT:
|
|
58
61
|
max_ = max_repeat
|
|
59
62
|
|
|
60
63
|
option, args = options[0]
|
|
@@ -80,12 +83,12 @@ def _category_chars(regex):
|
|
|
80
83
|
|
|
81
84
|
|
|
82
85
|
_CATEGORIES = {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
_parser.CATEGORY_SPACE: _category_chars(re.compile(r'\s')),
|
|
87
|
+
_parser.CATEGORY_NOT_SPACE: _category_chars(re.compile(r'\S')),
|
|
88
|
+
_parser.CATEGORY_DIGIT: _category_chars(re.compile(r'\d')),
|
|
89
|
+
_parser.CATEGORY_NOT_DIGIT: _category_chars(re.compile(r'\D')),
|
|
90
|
+
_parser.CATEGORY_WORD: _category_chars(re.compile(r'\w')),
|
|
91
|
+
_parser.CATEGORY_NOT_WORD: _category_chars(re.compile(r'\W')),
|
|
89
92
|
}
|
|
90
93
|
|
|
91
94
|
|
|
@@ -95,13 +98,31 @@ def _category(category, max_repeat):
|
|
|
95
98
|
return iter(characters), len(characters)
|
|
96
99
|
|
|
97
100
|
|
|
101
|
+
def _parse_pattern(pattern, max_repeat):
|
|
102
|
+
generators = []
|
|
103
|
+
sizes = []
|
|
104
|
+
for option, args in reversed(pattern):
|
|
105
|
+
if option != _parser.AT:
|
|
106
|
+
generator, size = _GENERATORS[option](args, max_repeat)
|
|
107
|
+
generators.append((generator, option, args))
|
|
108
|
+
sizes.append(size)
|
|
109
|
+
|
|
110
|
+
return _from_generators(generators, max_repeat), np.prod(sizes, dtype=np.complex128).real
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def _subpattern(args, max_repeat):
|
|
114
|
+
# args is (group_id, add_flags, del_flags, pattern)
|
|
115
|
+
return _parse_pattern(args[3], max_repeat)
|
|
116
|
+
|
|
117
|
+
|
|
98
118
|
_GENERATORS = {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
119
|
+
_parser.LITERAL: _literal,
|
|
120
|
+
_parser.IN: _in,
|
|
121
|
+
_parser.RANGE: _range,
|
|
122
|
+
_parser.ANY: _any,
|
|
123
|
+
_parser.MAX_REPEAT: _max_repeat,
|
|
124
|
+
_parser.CATEGORY: _category,
|
|
125
|
+
_parser.SUBPATTERN: _subpattern,
|
|
105
126
|
}
|
|
106
127
|
|
|
107
128
|
|
|
@@ -149,8 +170,6 @@ def strings_from_regex(regex, max_repeat=16):
|
|
|
149
170
|
the indicated regular expressions alongside an integer indicating the
|
|
150
171
|
total length of the generator.
|
|
151
172
|
|
|
152
|
-
WARNING: Subpatterns are currently not supported.
|
|
153
|
-
|
|
154
173
|
Args:
|
|
155
174
|
regex (str):
|
|
156
175
|
String representing a valid python regular expression.
|
|
@@ -163,16 +182,8 @@ def strings_from_regex(regex, max_repeat=16):
|
|
|
163
182
|
* Generator that produces strings that match the given regex.
|
|
164
183
|
* Total length of the generator.
|
|
165
184
|
"""
|
|
166
|
-
parsed =
|
|
167
|
-
|
|
168
|
-
sizes = []
|
|
169
|
-
for option, args in reversed(parsed):
|
|
170
|
-
if option != sre_parse.AT:
|
|
171
|
-
generator, size = _GENERATORS[option](args, max_repeat)
|
|
172
|
-
generators.append((generator, option, args))
|
|
173
|
-
sizes.append(size)
|
|
174
|
-
|
|
175
|
-
return _from_generators(generators, max_repeat), np.prod(sizes, dtype=np.complex128).real
|
|
185
|
+
parsed = _parser.parse(regex, flags=_parser.SRE_FLAG_UNICODE)
|
|
186
|
+
return _parse_pattern(parsed, max_repeat)
|
|
176
187
|
|
|
177
188
|
|
|
178
189
|
def _fill_nan_with_none_series(data):
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rdt
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.20.1.dev0
|
|
4
4
|
Summary: Reversible Data Transforms
|
|
5
5
|
Author-email: "DataCebo, Inc." <info@sdv.dev>
|
|
6
|
-
License:
|
|
6
|
+
License-Expression: BUSL-1.1
|
|
7
7
|
Project-URL: Source Code, https://github.com/sdv-dev/RDT/
|
|
8
8
|
Project-URL: Issue Tracker, https://github.com/sdv-dev/RDT/issues
|
|
9
9
|
Project-URL: Changes, https://github.com/sdv-dev/RDT/blob/main/HISTORY.md
|
|
10
10
|
Project-URL: Twitter, https://twitter.com/sdv_dev
|
|
11
|
-
Project-URL: Chat, https://
|
|
11
|
+
Project-URL: Chat, https://forum.datacebo.com/
|
|
12
12
|
Keywords: machine learning,synthetic data generation,benchmark,generative models
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: License :: Free for non-commercial use
|
|
16
15
|
Classifier: Natural Language :: English
|
|
17
16
|
Classifier: Programming Language :: Python :: 3
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -89,7 +88,7 @@ Dynamic: license-file
|
|
|
89
88
|
[](https://github.com/sdv-dev/RDT/actions/workflows/unit.yml)
|
|
90
89
|
[](https://pepy.tech/project/rdt)
|
|
91
90
|
[](https://codecov.io/gh/sdv-dev/RDT)
|
|
92
|
-
[](https://forum.datacebo.com)
|
|
93
92
|
|
|
94
93
|
<div align="left">
|
|
95
94
|
<br/>
|
|
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
|
|
@@ -75,13 +75,13 @@ def get_transformer_name(transformer):
|
|
|
75
75
|
transformer:
|
|
76
76
|
A transformer class.
|
|
77
77
|
|
|
78
|
-
Raises:
|
|
79
|
-
ValueError:
|
|
80
|
-
Crashes when the transformer is not passed as a class.
|
|
81
|
-
|
|
82
78
|
Returns:
|
|
83
79
|
string:
|
|
84
80
|
The path of the transformer.
|
|
81
|
+
|
|
82
|
+
Raises:
|
|
83
|
+
ValueError:
|
|
84
|
+
Crashes when the transformer is not passed as a class.
|
|
85
85
|
"""
|
|
86
86
|
if inspect.isclass(transformer):
|
|
87
87
|
return transformer.__module__ + '.' + transformer.get_name()
|
|
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
|