Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 559098b

Browse files
authored
Merge pull request #320 from datafold/nov25_cleanup
Cleanup
2 parents c905430 + 8896ea7 commit 559098b

File tree

11 files changed

+58
-20
lines changed

11 files changed

+58
-20
lines changed

data_diff/databases/_connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from data_diff.sqeleton.databases.connect import Connect
1+
from data_diff.sqeleton.databases import Connect
22

33
from .postgresql import PostgreSQL
44
from .mysql import MySQL

data_diff/hashdiff_tables.py

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

1212
from .utils import safezip
1313
from .thread_utils import ThreadedYielder
14-
from .sqeleton.abcs.database_types import ColType_UUID, NumericType, PrecisionType, StringType
14+
from .sqeleton.abcs import ColType_UUID, NumericType, PrecisionType, StringType
1515
from .table_segment import TableSegment
1616

1717
from .diff_tables import TableDiffer

data_diff/joindiff_tables.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,27 @@
1010

1111
from runtype import dataclass
1212

13-
from .sqeleton.databases import Database, MySQL, BigQuery, Presto, Oracle, Snowflake
14-
from .sqeleton.abcs.database_types import DbPath, NumericType
15-
from .sqeleton.queries import table, sum_, min_, max_, avg
16-
from .sqeleton.queries.api import and_, if_, or_, outerjoin, leftjoin, rightjoin, this, ITable
17-
from .sqeleton.queries.ast_classes import Concat, Count, Expr, Random, TablePath, Code
18-
from .sqeleton.queries.compiler import Compiler
13+
from .sqeleton.databases import Database, MySQL, BigQuery, Presto, Oracle, Snowflake, DbPath
14+
from .sqeleton.abcs import NumericType
15+
from .sqeleton.queries import (
16+
table,
17+
sum_,
18+
min_,
19+
max_,
20+
avg,
21+
and_,
22+
if_,
23+
or_,
24+
outerjoin,
25+
leftjoin,
26+
rightjoin,
27+
this,
28+
Compiler,
29+
)
30+
from .sqeleton.queries.ast_classes import Concat, Count, Expr, Random, TablePath, Code, ITable
1931
from .sqeleton.queries.extras import NormalizeAsString
2032

21-
from .info_tree import InfoTree, SegmentInfo
33+
from .info_tree import InfoTree
2234

2335
from .query_utils import append_to_table, drop_table
2436
from .utils import safezip
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
1-
from .database_types import AbstractDatabase, AbstractDialect, DbKey, DbPath, DbTime, IKey
1+
from .database_types import (
2+
AbstractDatabase,
3+
AbstractDialect,
4+
DbKey,
5+
DbPath,
6+
DbTime,
7+
IKey,
8+
ColType_UUID,
9+
NumericType,
10+
PrecisionType,
11+
StringType,
12+
)
213
from .compiler import AbstractCompiler, Compilable

data_diff/sqeleton/databases/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from .base import MD5_HEXDIGITS, CHECKSUM_HEXDIGITS, QueryError, ConnectError, BaseDialect, Database
2-
from ..abcs import DbPath, DbKey
2+
from ..abcs import DbPath, DbKey, DbTime
3+
from .connect import Connect
34

45
from .postgresql import PostgreSQL
56
from .mysql import MySQL
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
from .compiler import Compiler
2-
from .api import this, join, outerjoin, table, SKIP, sum_, avg, min_, max_, cte, commit, when, coalesce
2+
from .api import (
3+
this,
4+
join,
5+
outerjoin,
6+
table,
7+
SKIP,
8+
sum_,
9+
avg,
10+
min_,
11+
max_,
12+
cte,
13+
commit,
14+
when,
15+
coalesce,
16+
and_,
17+
if_,
18+
or_,
19+
leftjoin,
20+
rightjoin,
21+
)
322
from .ast_classes import Expr, ExprNode, Select, Count, BinOp, Explain, In, Code, Column
423
from .extras import Checksum, NormalizeAsString, ApplyFuncAndNormalizeAsString

data_diff/table_segment.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
from runtype import dataclass
66

77
from .sqeleton.utils import ArithString, split_space
8-
from .sqeleton.databases import Database
9-
from .sqeleton.abcs import DbPath, DbKey, DbTime
8+
from .sqeleton.databases import Database, DbPath, DbKey, DbTime
109
from .sqeleton.schema import Schema, create_schema
1110
from .sqeleton.queries import Count, Checksum, SKIP, table, this, Expr, min_, max_, Code
1211
from .sqeleton.queries.extras import ApplyFuncAndNormalizeAsString, NormalizeAsString

tests/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from data_diff import databases as db
1313
from data_diff import tracking
1414
from data_diff import connect
15-
from data_diff.sqeleton.queries.api import table
15+
from data_diff.sqeleton.queries import table
1616
from data_diff.sqeleton.databases import Database
1717
from data_diff.query_utils import drop_table
1818

tests/sqeleton/test_database.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
from ..common import str_to_checksum, TEST_MYSQL_CONN_STRING
55
from ..common import str_to_checksum, test_each_database_in_list, DiffTestCase, get_conn, random_table_suffix
66

7-
# from data_diff.sqeleton import databases as db
8-
# from data_diff.sqeleton import connect
9-
107
from data_diff.sqeleton.queries import table
118

129
from data_diff import databases as dbs

tests/test_database_types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from parameterized import parameterized
1515

1616
from data_diff import databases as db
17-
from data_diff.databases import postgresql, oracle, duckdb
1817
from data_diff.query_utils import drop_table
1918
from data_diff.utils import accumulate
2019
from data_diff.sqeleton.utils import number_to_human

0 commit comments

Comments
 (0)