sdv 1.37.2.dev0__tar.gz → 1.37.3.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.
- {sdv-1.37.2.dev0/sdv.egg-info → sdv-1.37.3.dev0}/PKG-INFO +1 -1
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/pyproject.toml +1 -1
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/__init__.py +1 -1
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/cag/programmable_constraint.py +30 -19
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0/sdv.egg-info}/PKG-INFO +1 -1
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/LICENSE +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/README.md +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/_utils.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/cag/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/cag/_errors.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/cag/_utils.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/cag/base.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/cag/fixed_combinations.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/cag/fixed_increments.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/cag/inequality.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/cag/one_hot_encoding.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/cag/range.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/constraints/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/constraints/base.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/constraints/errors.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/constraints/tabular.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/constraints/utils.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/data_processing/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/data_processing/data_processor.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/data_processing/datetime_formatter.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/data_processing/errors.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/data_processing/numerical_formatter.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/data_processing/utils.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/datasets/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/datasets/demo.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/datasets/local.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/errors.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/evaluation/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/evaluation/_utils.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/evaluation/multi_table.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/evaluation/single_table.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/io/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/io/local/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/io/local/local.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/lite/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/lite/single_table.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/logging/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/logging/logger.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/logging/sdv_logger_config.yml +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/logging/utils.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metadata/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metadata/errors.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metadata/metadata.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metadata/metadata_upgrader.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metadata/multi_table.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metadata/single_table.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metadata/utils.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metadata/visualization.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metrics/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metrics/demos.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metrics/relational.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metrics/tabular.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/metrics/timeseries.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/multi_table/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/multi_table/base.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/multi_table/dayz.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/multi_table/hma.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/multi_table/utils.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/sampling/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/sampling/hierarchical_sampler.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/sampling/independent_sampler.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/sampling/tabular.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/sequential/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/sequential/par.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/single_table/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/single_table/base.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/single_table/copulagan.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/single_table/copulas.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/single_table/ctgan.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/single_table/dayz.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/single_table/utils.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/utils/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/utils/mixins.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/utils/poc.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/utils/utils.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv/version/__init__.py +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv.egg-info/SOURCES.txt +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv.egg-info/dependency_links.txt +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv.egg-info/entry_points.txt +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv.egg-info/requires.txt +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/sdv.egg-info/top_level.txt +0 -0
- {sdv-1.37.2.dev0 → sdv-1.37.3.dev0}/setup.cfg +0 -0
|
@@ -149,7 +149,7 @@ namespaces = false
|
|
|
149
149
|
version = {attr = 'sdv.__version__'}
|
|
150
150
|
|
|
151
151
|
[tool.bumpversion]
|
|
152
|
-
current_version = "1.37.
|
|
152
|
+
current_version = "1.37.3.dev0"
|
|
153
153
|
parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?'
|
|
154
154
|
serialize = [
|
|
155
155
|
'{major}.{minor}.{patch}.{release}{candidate}',
|
|
@@ -12,6 +12,35 @@ class ProgrammableConstraint:
|
|
|
12
12
|
|
|
13
13
|
_is_single_table = False
|
|
14
14
|
|
|
15
|
+
def get_constraint_dict(self):
|
|
16
|
+
"""Return the constraint as a serialiazable dict.
|
|
17
|
+
|
|
18
|
+
Returns:
|
|
19
|
+
dict:
|
|
20
|
+
A dictionary with the following keys:
|
|
21
|
+
- `class_name` [str]: The name of the constraint class.
|
|
22
|
+
- `parameters` [dict]: A dictionary of the init parameters used to
|
|
23
|
+
create this constraint instance.
|
|
24
|
+
"""
|
|
25
|
+
args = inspect.getfullargspec(self.__init__)
|
|
26
|
+
keys = args.args[1:]
|
|
27
|
+
instanced = {}
|
|
28
|
+
for key in keys:
|
|
29
|
+
if hasattr(self, key) or hasattr(self, f'_{key}'):
|
|
30
|
+
instanced[key] = getattr(self, key, getattr(self, f'_{key}', None))
|
|
31
|
+
missing_attrs = list(set(keys) - set(instanced.keys()))
|
|
32
|
+
if missing_attrs:
|
|
33
|
+
missing_attrs = sorted(missing_attrs)
|
|
34
|
+
raise AttributeError(
|
|
35
|
+
'Cannot convert constraint to dictionary because required parameters '
|
|
36
|
+
f'{missing_attrs} are not saved as attributes on the constraint.'
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
'class_name': self.__class__.__name__,
|
|
41
|
+
'parameters': instanced,
|
|
42
|
+
}
|
|
43
|
+
|
|
15
44
|
@classmethod
|
|
16
45
|
def load_constraint_from_dict(cls, parameters):
|
|
17
46
|
"""Uses the given parameters to recreate an instance of the constraint."""
|
|
@@ -160,25 +189,7 @@ class ProgrammableConstraintHarness(BaseConstraint):
|
|
|
160
189
|
- `parameters` [dict]: A dictionary of the init parameters used to
|
|
161
190
|
create this constraint instance.
|
|
162
191
|
"""
|
|
163
|
-
|
|
164
|
-
keys = args.args[1:]
|
|
165
|
-
instanced = {}
|
|
166
|
-
constraint = self.programmable_constraint
|
|
167
|
-
for key in keys:
|
|
168
|
-
if hasattr(constraint, key) or hasattr(constraint, f'_{key}'):
|
|
169
|
-
instanced[key] = getattr(constraint, key, getattr(constraint, f'_{key}', None))
|
|
170
|
-
missing_attrs = list(set(keys) - set(instanced.keys()))
|
|
171
|
-
if missing_attrs:
|
|
172
|
-
missing_attrs = sorted(missing_attrs)
|
|
173
|
-
raise AttributeError(
|
|
174
|
-
'Cannot convert constraint to dictionary because required parameters '
|
|
175
|
-
f'{missing_attrs} are not saved as attributes on the constraint.'
|
|
176
|
-
)
|
|
177
|
-
|
|
178
|
-
return {
|
|
179
|
-
'class_name': self.programmable_constraint.__class__.__name__,
|
|
180
|
-
'parameters': instanced,
|
|
181
|
-
}
|
|
192
|
+
return self.programmable_constraint.get_constraint_dict()
|
|
182
193
|
|
|
183
194
|
def _validate_constraint_with_metadata(self, metadata):
|
|
184
195
|
if self._is_programmable_single_table_constraint and len(metadata.tables) != 1:
|
|
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
|
|
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
|