csv-detective 0.9.3.dev1948__py3-none-any.whl → 0.9.3.dev2010__py3-none-any.whl
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.
- csv_detective/detect_fields/FR/geo/latitude_l93/__init__.py +1 -1
- csv_detective/detect_fields/FR/geo/latitude_wgs_fr_metropole/__init__.py +1 -1
- csv_detective/detect_fields/FR/geo/longitude_l93/__init__.py +1 -1
- csv_detective/detect_fields/FR/geo/longitude_wgs_fr_metropole/__init__.py +1 -1
- csv_detective/detect_fields/geo/latitude_wgs/__init__.py +1 -1
- csv_detective/detect_fields/geo/longitude_wgs/__init__.py +1 -1
- {csv_detective-0.9.3.dev1948.dist-info → csv_detective-0.9.3.dev2010.dist-info}/METADATA +1 -1
- {csv_detective-0.9.3.dev1948.dist-info → csv_detective-0.9.3.dev2010.dist-info}/RECORD +13 -13
- tests/test_fields.py +25 -0
- {csv_detective-0.9.3.dev1948.dist-info → csv_detective-0.9.3.dev2010.dist-info}/WHEEL +0 -0
- {csv_detective-0.9.3.dev1948.dist-info → csv_detective-0.9.3.dev2010.dist-info}/entry_points.txt +0 -0
- {csv_detective-0.9.3.dev1948.dist-info → csv_detective-0.9.3.dev2010.dist-info}/licenses/LICENSE +0 -0
- {csv_detective-0.9.3.dev1948.dist-info → csv_detective-0.9.3.dev2010.dist-info}/top_level.txt +0 -0
|
@@ -17,10 +17,10 @@ csv_detective/detect_fields/FR/geo/code_region/__init__.py,sha256=9pR2tVS4J2Kryt
|
|
|
17
17
|
csv_detective/detect_fields/FR/geo/commune/__init__.py,sha256=5vw4zjlmWaR2djxuQOUrmwsNIc9HgAE-zdxwerVR3S0,380
|
|
18
18
|
csv_detective/detect_fields/FR/geo/departement/__init__.py,sha256=UsMEW1EVVgnw-daOc1jBkEaGKvqTONSAGnj1s3QgM8w,400
|
|
19
19
|
csv_detective/detect_fields/FR/geo/insee_canton/__init__.py,sha256=YsAGiblFexBxvu_E3XaXhy_bordc6c1oKPgDzTsDeXw,374
|
|
20
|
-
csv_detective/detect_fields/FR/geo/latitude_l93/__init__.py,sha256=
|
|
21
|
-
csv_detective/detect_fields/FR/geo/latitude_wgs_fr_metropole/__init__.py,sha256=
|
|
22
|
-
csv_detective/detect_fields/FR/geo/longitude_l93/__init__.py,sha256=
|
|
23
|
-
csv_detective/detect_fields/FR/geo/longitude_wgs_fr_metropole/__init__.py,sha256=
|
|
20
|
+
csv_detective/detect_fields/FR/geo/latitude_l93/__init__.py,sha256=7ONo0MxrJY1gPWRwyPCX4ZDbCINmxnKRV85zscADxT8,435
|
|
21
|
+
csv_detective/detect_fields/FR/geo/latitude_wgs_fr_metropole/__init__.py,sha256=lIgWebNapfrnPt0XeNUMs78Xa_csGNAtTk8VEk9wXXo,342
|
|
22
|
+
csv_detective/detect_fields/FR/geo/longitude_l93/__init__.py,sha256=YXTWSymmcXW9eD2OfiSlmX7N-IUtZkDrNYHd6vTnJTc,439
|
|
23
|
+
csv_detective/detect_fields/FR/geo/longitude_wgs_fr_metropole/__init__.py,sha256=7tZ8sgIkQ9zuSOZ-vGYBkH04Vv1xlPlJDM78xYfD57Y,342
|
|
24
24
|
csv_detective/detect_fields/FR/geo/pays/__init__.py,sha256=85y-5qNRAWJrKqL0wh9iPMUBQjvPwc9lv1cYB2m0daQ,364
|
|
25
25
|
csv_detective/detect_fields/FR/geo/region/__init__.py,sha256=6mJRaGsCPBY5JHHe8EWxEjDpAOIfvBPTaZKJb3_n3gU,1077
|
|
26
26
|
csv_detective/detect_fields/FR/other/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -50,9 +50,9 @@ csv_detective/detect_fields/geo/iso_country_code_alpha3/iso_country_code_alpha3.
|
|
|
50
50
|
csv_detective/detect_fields/geo/iso_country_code_numeric/__init__.py,sha256=AnAridM4C8hcm4PeNdr8969czgrzM4KemGVZWAJSM1U,436
|
|
51
51
|
csv_detective/detect_fields/geo/iso_country_code_numeric/iso_country_code_numeric.txt,sha256=2GtEhuporsHYV-pU4q9kfXU5iOtfW5C0GYBTTKQtnnA,1004
|
|
52
52
|
csv_detective/detect_fields/geo/json_geojson/__init__.py,sha256=6wlwlxQmsVIZ21g-THvH3nBj-I8FuoF2sBlZAoEMGiQ,393
|
|
53
|
-
csv_detective/detect_fields/geo/latitude_wgs/__init__.py,sha256=
|
|
53
|
+
csv_detective/detect_fields/geo/latitude_wgs/__init__.py,sha256=PI-wlTJmPk6nznzu_Fou_SSCET90wIf78mXwb1W1K70,325
|
|
54
54
|
csv_detective/detect_fields/geo/latlon_wgs/__init__.py,sha256=IXDTqD4YFUJYI1FYZ5ZfkqXY6KvNY7sgBVFRAvgTHtI,454
|
|
55
|
-
csv_detective/detect_fields/geo/longitude_wgs/__init__.py,sha256=
|
|
55
|
+
csv_detective/detect_fields/geo/longitude_wgs/__init__.py,sha256=B7YFfvEI48DfAn8xbc-vpVERQaKh9_59ERfieo2D6OY,328
|
|
56
56
|
csv_detective/detect_fields/geo/lonlat_wgs/__init__.py,sha256=CnBMYevfGdhBvureF3oc_zqT-RZjG419iAuUlugQFLc,454
|
|
57
57
|
csv_detective/detect_fields/other/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
58
|
csv_detective/detect_fields/other/booleen/__init__.py,sha256=37ZUJACrZA9FQBYLDeVJGze7_I9x-ZWv5yWuBcqHcwI,497
|
|
@@ -150,10 +150,10 @@ csv_detective/parsing/csv.py,sha256=fJkjKvyk7InkNnYKtmivyi48mmcwvrha7gvZ5J4-86A,
|
|
|
150
150
|
csv_detective/parsing/excel.py,sha256=sKD5PRN1TlzPPOKFnZ3VRb0r1yIjPLlpxVWmZQeLYFk,7027
|
|
151
151
|
csv_detective/parsing/load.py,sha256=C3M8nvgWenOb8aDFi5dpDGCoAw9EBqr4EB63zbz2M14,3699
|
|
152
152
|
csv_detective/parsing/text.py,sha256=uz8wfmNTQnOd_4fjrIZ_5rxmFmgrg343hJh2szB73Hc,1770
|
|
153
|
-
csv_detective-0.9.3.
|
|
153
|
+
csv_detective-0.9.3.dev2010.dist-info/licenses/LICENSE,sha256=A1dQrzxyxRHRih02KwibWj1khQyF7GeA6SqdOU87Gk4,1088
|
|
154
154
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
155
155
|
tests/test_example.py,sha256=uTWswvUzBWEADGXZmMAdZvKhKvIjvT5zWOVVABgCDN4,1987
|
|
156
|
-
tests/test_fields.py,sha256
|
|
156
|
+
tests/test_fields.py,sha256=m5wGyHIl7e8PFmBe5OuWST9J0YVvdqniUEuCvWEj1qU,13558
|
|
157
157
|
tests/test_file.py,sha256=QEBv69P0bAKWBzhQ3KKOR1Z1RQSf5CVEilqBojwP2Yc,10791
|
|
158
158
|
tests/test_labels.py,sha256=Y0XlOpztCyV65pk7iAS_nMMfdysoBujlBmz10vHul9A,469
|
|
159
159
|
tests/test_structure.py,sha256=GRDYKy0UcdqlN4qglzsRC0puFj5cb-SVvONjvcPvtAA,1400
|
|
@@ -161,8 +161,8 @@ tests/test_validation.py,sha256=ie-Xf0vk6-M6GQq-x7kY5yse1EmXfxQkbaV7fR3fvYo,3308
|
|
|
161
161
|
venv/bin/activate_this.py,sha256=NRy3waFmwW1pOaNUp33wNN0vD1Kzkd-zXX-Sgl4EiVI,1286
|
|
162
162
|
venv/bin/jp.py,sha256=7z7dvRg0M7HzpZG4ssQID7nScjvQx7bcYTxJWDOrS6E,1717
|
|
163
163
|
venv/bin/runxlrd.py,sha256=YlZMuycM_V_hzNt2yt3FyXPuwouMCmMhvj1oZaBeeuw,16092
|
|
164
|
-
csv_detective-0.9.3.
|
|
165
|
-
csv_detective-0.9.3.
|
|
166
|
-
csv_detective-0.9.3.
|
|
167
|
-
csv_detective-0.9.3.
|
|
168
|
-
csv_detective-0.9.3.
|
|
164
|
+
csv_detective-0.9.3.dev2010.dist-info/METADATA,sha256=w-cEDW1eccAuznvXEiNZI_uw6gQox5xvpZT6ZgHr_1c,9767
|
|
165
|
+
csv_detective-0.9.3.dev2010.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
166
|
+
csv_detective-0.9.3.dev2010.dist-info/entry_points.txt,sha256=JjweTReFqKJmuvkegzlew2j3D5pZzfxvbEGOtGVGmaY,56
|
|
167
|
+
csv_detective-0.9.3.dev2010.dist-info/top_level.txt,sha256=cYKb4Ok3XgYA7rMDOYtxysjSJp_iUA9lJjynhVzue8g,30
|
|
168
|
+
csv_detective-0.9.3.dev2010.dist-info/RECORD,,
|
tests/test_fields.py
CHANGED
|
@@ -79,6 +79,7 @@ from csv_detective.detection.variables import (
|
|
|
79
79
|
from csv_detective.load_tests import return_all_tests
|
|
80
80
|
from csv_detective.output.dataframe import cast
|
|
81
81
|
from csv_detective.output.utils import prepare_output_dict
|
|
82
|
+
from csv_detective.parsing.columns import test_col as col_test # to prevent pytest from testing it
|
|
82
83
|
|
|
83
84
|
|
|
84
85
|
def test_all_tests_return_bool():
|
|
@@ -461,3 +462,27 @@ def test_early_detection(args):
|
|
|
461
462
|
res = module._is(value)
|
|
462
463
|
assert res
|
|
463
464
|
mock_func.assert_not_called()
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
def test_all_proportion_1():
|
|
468
|
+
all_tests = return_all_tests("ALL", "detect_fields")
|
|
469
|
+
prop_1 = {
|
|
470
|
+
t.__name__.split(".")[-1]: eval(
|
|
471
|
+
t.__name__.split(".")[-1]
|
|
472
|
+
if t.__name__.split(".")[-1] not in ["int", "float"]
|
|
473
|
+
else "test_" + t.__name__.split(".")[-1]
|
|
474
|
+
)
|
|
475
|
+
for t in all_tests
|
|
476
|
+
if t.PROPORTION == 1
|
|
477
|
+
}
|
|
478
|
+
# building a table that uses only correct values for these formats, except on one row
|
|
479
|
+
table = pd.DataFrame(
|
|
480
|
+
{
|
|
481
|
+
test_name: (fields[test_module][True] * 100)[:100] + ["not_suitable"]
|
|
482
|
+
for test_name, test_module in prop_1.items()
|
|
483
|
+
}
|
|
484
|
+
)
|
|
485
|
+
# testing columns for all formats
|
|
486
|
+
returned_table = col_test(table, all_tests, limited_output=True)
|
|
487
|
+
# the analysis should have found no match on any format
|
|
488
|
+
assert all(returned_table[col].sum() == 0 for col in table.columns)
|
|
File without changes
|
{csv_detective-0.9.3.dev1948.dist-info → csv_detective-0.9.3.dev2010.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{csv_detective-0.9.3.dev1948.dist-info → csv_detective-0.9.3.dev2010.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{csv_detective-0.9.3.dev1948.dist-info → csv_detective-0.9.3.dev2010.dist-info}/top_level.txt
RENAMED
|
File without changes
|