Skip to content

Commit 475c1e8

Browse files
committed
Format modules
1 parent e7c4565 commit 475c1e8

File tree

90 files changed

+9012
-5928
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+9012
-5928
lines changed

dbldatagen/__init__.py

Lines changed: 64 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,44 @@
2424
"""
2525

2626
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+
)
3350

3451
from ._version import __version__
3552
from .column_generation_spec import ColumnGenerationSpec
3653
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+
)
3965
from .data_analyzer import DataAnalyzer
4066
from .schema_parser import SchemaParser
4167
from .daterange import DateRange
@@ -48,24 +74,45 @@
4874
from .html_utils import HtmlUtils
4975
from .datasets_object import Datasets
5076
from .config import OutputDataset
77+
from .multi_table_builder import MultiTableBuilder
78+
from .relation import ForeignKeyRelation
79+
from .datagen_types import ColumnLike
5180

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-
]
81+
__all__ = [
82+
"data_generator",
83+
"data_analyzer",
84+
"schema_parser",
85+
"daterange",
86+
"nrange",
87+
"column_generation_spec",
88+
"utils",
89+
"function_builder",
90+
"spark_singleton",
91+
"text_generators",
92+
"datarange",
93+
"datagen_constants",
94+
"text_generator_plugins",
95+
"html_utils",
96+
"datasets_object",
97+
"constraints",
98+
"config",
99+
"multi_table_builder",
100+
"relation",
101+
"datagen_types",
102+
]
57103

58104

59105
def python_version_check(python_version_expected):
60106
"""Check against Python version
61107
62-
Allows minimum version to be passed in to facilitate unit testing
108+
Allows minimum version to be passed in to facilitate unit testing
63109
64-
:param python_version_expected: = minimum version of python to support as tuple e.g (3,6)
65-
:return: True if passed
110+
:param python_version_expected: = minimum version of python to support as tuple e.g (3,6)
111+
:return: True if passed
66112
67-
"""
113+
"""
68114
import sys
115+
69116
return sys.version_info >= python_version_expected
70117

71118

dbldatagen/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
def get_version(version: str) -> VersionInfo:
25-
""" Get version info object for library.
25+
"""Get version info object for library.
2626
2727
:param version: version string to parse for version information
2828

0 commit comments

Comments
 (0)