|
24 | 24 | """ |
25 | 25 |
|
26 | 26 | from .data_generator import DataGenerator |
27 | | -from .datagen_constants import DEFAULT_RANDOM_SEED, RANDOM_SEED_RANDOM, RANDOM_SEED_FIXED, \ |
28 | | - RANDOM_SEED_HASH_FIELD_NAME, MIN_PYTHON_VERSION, MIN_SPARK_VERSION, \ |
29 | | - INFER_DATATYPE, SPARK_DEFAULT_PARALLELISM |
30 | | -from .utils import ensure, topologicalSort, mkBoundsList, coalesce_values, \ |
31 | | - deprecated, parse_time_interval, DataGenError, split_list_matching_condition, strip_margins, \ |
32 | | - json_value_from_path, system_time_millis |
| 27 | +from .datagen_constants import ( |
| 28 | + DEFAULT_RANDOM_SEED, |
| 29 | + RANDOM_SEED_RANDOM, |
| 30 | + RANDOM_SEED_FIXED, |
| 31 | + RANDOM_SEED_HASH_FIELD_NAME, |
| 32 | + MIN_PYTHON_VERSION, |
| 33 | + MIN_SPARK_VERSION, |
| 34 | + INFER_DATATYPE, |
| 35 | + SPARK_DEFAULT_PARALLELISM, |
| 36 | +) |
| 37 | +from .utils import ( |
| 38 | + ensure, |
| 39 | + topologicalSort, |
| 40 | + mkBoundsList, |
| 41 | + coalesce_values, |
| 42 | + deprecated, |
| 43 | + parse_time_interval, |
| 44 | + DataGenError, |
| 45 | + split_list_matching_condition, |
| 46 | + strip_margins, |
| 47 | + json_value_from_path, |
| 48 | + system_time_millis, |
| 49 | +) |
33 | 50 |
|
34 | 51 | from ._version import __version__ |
35 | 52 | from .column_generation_spec import ColumnGenerationSpec |
36 | 53 | from .column_spec_options import ColumnSpecOptions |
37 | | -from .constraints import Constraint, ChainedRelation, LiteralRange, LiteralRelation, NegativeValues, PositiveValues, \ |
38 | | - RangedValues, SqlExpr, UniqueCombinations |
| 54 | +from .constraints import ( |
| 55 | + Constraint, |
| 56 | + ChainedRelation, |
| 57 | + LiteralRange, |
| 58 | + LiteralRelation, |
| 59 | + NegativeValues, |
| 60 | + PositiveValues, |
| 61 | + RangedValues, |
| 62 | + SqlExpr, |
| 63 | + UniqueCombinations, |
| 64 | +) |
39 | 65 | from .data_analyzer import DataAnalyzer |
40 | 66 | from .schema_parser import SchemaParser |
41 | 67 | from .daterange import DateRange |
|
48 | 74 | from .html_utils import HtmlUtils |
49 | 75 | from .datasets_object import Datasets |
50 | 76 | from .config import OutputDataset |
| 77 | +from .datagen_types import ColumnLike |
51 | 78 |
|
52 | | -__all__ = ["data_generator", "data_analyzer", "schema_parser", "daterange", "nrange", |
53 | | - "column_generation_spec", "utils", "function_builder", |
54 | | - "spark_singleton", "text_generators", "datarange", "datagen_constants", |
55 | | - "text_generator_plugins", "html_utils", "datasets_object", "constraints", "config" |
56 | | - ] |
| 79 | +__all__ = [ |
| 80 | + "data_generator", |
| 81 | + "data_analyzer", |
| 82 | + "schema_parser", |
| 83 | + "daterange", |
| 84 | + "nrange", |
| 85 | + "column_generation_spec", |
| 86 | + "utils", |
| 87 | + "function_builder", |
| 88 | + "spark_singleton", |
| 89 | + "text_generators", |
| 90 | + "datarange", |
| 91 | + "datagen_constants", |
| 92 | + "text_generator_plugins", |
| 93 | + "html_utils", |
| 94 | + "datasets_object", |
| 95 | + "constraints", |
| 96 | + "config", |
| 97 | + "datagen_types", |
| 98 | +] |
57 | 99 |
|
58 | 100 |
|
59 | 101 | def python_version_check(python_version_expected): |
60 | 102 | """Check against Python version |
61 | 103 |
|
62 | | - Allows minimum version to be passed in to facilitate unit testing |
| 104 | + Allows minimum version to be passed in to facilitate unit testing |
63 | 105 |
|
64 | | - :param python_version_expected: = minimum version of python to support as tuple e.g (3,6) |
65 | | - :return: True if passed |
| 106 | + :param python_version_expected: = minimum version of python to support as tuple e.g (3,6) |
| 107 | + :return: True if passed |
66 | 108 |
|
67 | | - """ |
| 109 | + """ |
68 | 110 | import sys |
| 111 | + |
69 | 112 | return sys.version_info >= python_version_expected |
70 | 113 |
|
71 | 114 |
|
|
0 commit comments