Skip to content

Commit b59067b

Browse files
committed
improve op container printing
more tests on replace code rebuild and retest
1 parent 583c90c commit b59067b

File tree

7 files changed

+62
-33
lines changed

7 files changed

+62
-33
lines changed

build/lib/data_algebra/op_container.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@ def fit_transform(self, X, y=None):
257257
def get_feature_names(self, input_features=None):
258258
return self.ops.get_feature_names(input_features=input_features)
259259

260+
def __str__(self) -> str:
261+
return f"OpC({self.ops})"
262+
263+
def __repr__(self) -> str:
264+
return f"OpC({self.ops})"
265+
260266

261267
# pop 0343 context manager
262268
# https://www.python.org/dev/peps/pep-0343/#use-cases

coverage.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,14 @@ data_algebra/BigQuery.py 130 71 45% 22-23, 27, 131-135,
131131
data_algebra/MySQL.py 31 8 74% 16-17, 79, 91-97
132132
data_algebra/OrderedSet.py 82 7 91% 33, 46, 49, 55, 58, 61, 64
133133
data_algebra/PostgreSQL.py 30 7 77% 15-16, 69-75
134-
data_algebra/SQLite.py 193 25 87% 92, 102, 126, 140, 142, 154, 170-171, 192, 200, 232, 259, 267-270, 290, 311-315, 445, 486, 491
134+
data_algebra/SQLite.py 193 29 85% 92, 102, 126, 140, 142, 154, 170-171, 192, 200, 232, 259, 267-270, 280, 288-291, 311-315, 445, 486, 491
135135
data_algebra/SparkSQL.py 87 46 47% 16-17, 21-22, 26-28, 89, 94, 132-136, 142-146, 170-172, 178-185, 192-207, 218-223
136136
data_algebra/__init__.py 5 0 100%
137137
data_algebra/arrow.py 142 41 71% 46, 53, 57-58, 67, 70, 74, 93, 97, 103, 114-117, 122, 130, 137, 156, 159, 172-173, 204, 213, 222-235, 238-246, 259, 261, 263, 267, 271
138138
data_algebra/cdata.py 364 66 82% 42, 44, 48, 50, 58, 60-61, 67, 71, 74, 79, 81-84, 92, 100, 104-105, 137, 195, 197, 203, 208, 237, 259, 284, 288, 291-294, 298, 308, 375, 379, 385, 388, 405, 407, 409, 412, 415, 422-424, 441-446, 462, 494, 500-503, 512, 535-540, 551, 586, 607, 612, 617, 622, 626
139139
data_algebra/connected_components.py 22 0 100%
140140
data_algebra/data_model.py 13 0 100%
141-
data_algebra/data_ops.py 1333 212 84% 37-38, 57-58, 95, 131, 225, 264, 281, 340, 377, 379, 381, 383, 387, 449, 489, 492, 520, 526, 550, 584, 590, 592, 677, 679, 728, 751, 757, 772, 774, 785, 797, 825, 827, 840, 842, 848, 860, 863, 875, 878, 891, 893, 895, 897, 908, 910, 946, 962, 982, 984, 986, 988, 992, 1027-1035, 1038-1048, 1064, 1088, 1126-1129, 1134, 1138, 1260, 1265, 1270, 1272, 1279, 1281, 1289, 1295, 1297, 1299, 1302, 1305, 1308, 1313, 1330, 1342, 1357, 1400, 1402, 1404, 1406, 1408, 1410, 1450, 1460, 1475, 1550, 1552, 1562, 1568, 1571, 1589, 1599, 1659, 1661, 1663, 1666, 1677, 1750, 1752, 1788-1792, 1796, 1800, 1812, 1864, 1868, 1871, 1873, 1904-1908, 1912, 1914, 1926, 1976, 1981, 1986, 2017-2021, 2025, 2027, 2038, 2089, 2094, 2100, 2103, 2119-2123, 2129, 2131, 2133, 2135, 2147, 2217, 2265-2269, 2273, 2275, 2277, 2288, 2403-2407, 2411, 2413, 2424, 2502, 2517, 2547, 2567, 2569, 2571, 2573, 2584, 2657, 2663, 2665, 2685-2689, 2698, 2700, 2702, 2704, 2715, 2785, 2801-2805, 2809, 2811, 2857, 2934-2945, 2948-2956, 2961
141+
data_algebra/data_ops.py 1333 204 85% 37-38, 57-58, 95, 131, 225, 264, 281, 340, 377, 379, 381, 383, 387, 449, 489, 492, 520, 526, 550, 584, 590, 592, 677, 679, 728, 751, 757, 772, 774, 785, 797, 825, 827, 840, 842, 848, 860, 863, 875, 878, 891, 893, 895, 897, 908, 910, 946, 962, 982, 984, 986, 988, 992, 1027-1035, 1038-1048, 1064, 1088, 1126-1129, 1134, 1138, 1260, 1265, 1270, 1272, 1279, 1281, 1289, 1295, 1297, 1299, 1302, 1305, 1308, 1313, 1330, 1342, 1357, 1400, 1402, 1404, 1406, 1408, 1410, 1450, 1460, 1475, 1550, 1552, 1562, 1568, 1571, 1589, 1599, 1659, 1661, 1663, 1666, 1677, 1750, 1752, 1788-1792, 1796, 1800, 1812, 1864, 1868, 1871, 1873, 1904-1908, 1912, 1914, 1926, 1976, 1981, 1986, 2017-2021, 2025, 2027, 2038, 2089, 2094, 2100, 2103, 2119-2123, 2129, 2131, 2133, 2135, 2147, 2217, 2265-2269, 2273, 2275, 2277, 2288, 2403-2407, 2411, 2413, 2424, 2502, 2517, 2547, 2567, 2569, 2571, 2573, 2584, 2657, 2663, 2665, 2685-2689, 2698, 2700, 2702, 2704, 2715, 2785, 2801-2805, 2809, 2811, 2857, 2937-2945, 2949, 2951, 2953, 2955, 2961
142142
data_algebra/data_ops_types.py 82 10 88% 326, 340-341, 345-349, 354, 362
143143
data_algebra/data_ops_utils.py 49 5 90% 30, 42, 44, 48, 58
144144
data_algebra/db_model.py 984 87 91% 46, 61, 69-71, 207, 342-343, 423, 850, 862, 922, 927, 949-953, 963, 977-981, 1005, 1017, 1076, 1078, 1084, 1095, 1107, 1139, 1143, 1148, 1181, 1185, 1201, 1204, 1284, 1295, 1300, 1323, 1327, 1368, 1375, 1413, 1417, 1450, 1454, 1476, 1480, 1494, 1534, 1538, 1574, 1578, 1639, 1643, 1645, 1648, 1673, 1752, 1756, 1760, 1763, 1768, 1811, 1822, 1960, 2078-2079, 2097, 2106, 2121, 2127, 2129, 2133, 2142, 2157, 2166, 2207, 2244, 2247, 2254, 2362, 2428-2431, 2436-2437, 2441
@@ -148,17 +148,17 @@ data_algebra/expr_rep.py 642 86 87% 205-208, 213, 221,
148148
data_algebra/flow_text.py 17 0 100%
149149
data_algebra/near_sql.py 237 3 99% 41, 256-257
150150
data_algebra/op_catalog.py 3 0 100%
151-
data_algebra/op_container.py 134 58 57% 46-47, 64-73, 83-84, 92-93, 96-97, 100-101, 104-105, 108, 111, 115-116, 121, 126, 135-143, 154-155, 158-164, 176-195, 198-201, 204-205, 216-217, 224-225, 232-233, 236-237, 240-244, 250-251, 255, 258
151+
data_algebra/op_container.py 138 58 58% 46-47, 64-73, 83-84, 92-93, 96-97, 100-101, 104-105, 108, 111, 115-116, 121, 126, 154-155, 158-164, 176-195, 198-201, 204-205, 216-217, 224-225, 232-233, 236-237, 240-244, 250-251, 255, 258, 261, 264
152152
data_algebra/pandas_base.py 513 45 91% 29, 69, 71, 84, 94, 104, 119, 122, 127, 132, 341, 407, 413-420, 429, 455, 466, 487, 501, 510, 512, 549, 596, 637, 654, 674, 692, 702, 717, 767, 775, 790, 801, 813, 833, 848, 876, 888, 925, 942, 945, 956
153153
data_algebra/pandas_model.py 5 0 100%
154154
data_algebra/parse_by_lark.py 164 24 85% 71, 93, 108, 129-130, 137, 161, 171, 185-186, 188, 200, 206, 213-217, 245, 253, 263-266
155155
data_algebra/python3_lark.py 1 0 100%
156156
data_algebra/solutions.py 135 4 97% 63, 303, 384, 467
157157
data_algebra/sql_format_options.py 15 2 87% 61, 69
158-
data_algebra/test_util.py 290 56 81% 88, 110, 120, 123, 127, 150, 153, 157, 159-162, 173, 230-231, 247-252, 256, 268, 270-278, 324, 327, 335, 346, 353, 357, 369, 380, 464-467, 469-472, 474-477, 479-482, 556-561, 567-568, 571
158+
data_algebra/test_util.py 290 62 79% 88, 110, 120, 123, 127, 150, 153, 157, 159-162, 173, 216-217, 230-231, 234-252, 256, 268, 270-278, 324, 327, 335, 346, 353, 357, 369, 380, 464-467, 469-472, 474-477, 479-482, 556-561, 567-568, 571
159159
data_algebra/util.py 140 29 79% 26, 51, 56, 61, 84-85, 88-89, 92-93, 96-97, 100-101, 104-105, 108-109, 112-113, 116-117, 120-121, 192, 207, 248, 252, 254
160160
--------------------------------------------------------------------
161-
TOTAL 5929 892 85%
161+
TOTAL 5933 894 85%
162162

163163

164-
======================= 316 passed in 867.49s (0:14:27) ========================
164+
======================= 316 passed in 840.85s (0:14:00) ========================

data_algebra/op_container.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@ def fit_transform(self, X, y=None):
257257
def get_feature_names(self, input_features=None):
258258
return self.ops.get_feature_names(input_features=input_features)
259259

260+
def __str__(self) -> str:
261+
return f"OpC({self.ops})"
262+
263+
def __repr__(self) -> str:
264+
return f"OpC({self.ops})"
265+
260266

261267
# pop 0343 context manager
262268
# https://www.python.org/dev/peps/pep-0343/#use-cases
34 Bytes
Binary file not shown.

dist/data_algebra-1.4.3.tar.gz

26 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)