csv-detective 0.9.3.dev2039__py3-none-any.whl → 0.9.3.dev2057__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/temp/datetime_naive/__init__.py +2 -6
- {csv_detective-0.9.3.dev2039.dist-info → csv_detective-0.9.3.dev2057.dist-info}/METADATA +1 -1
- {csv_detective-0.9.3.dev2039.dist-info → csv_detective-0.9.3.dev2057.dist-info}/RECORD +8 -8
- tests/test_fields.py +8 -1
- {csv_detective-0.9.3.dev2039.dist-info → csv_detective-0.9.3.dev2057.dist-info}/WHEEL +0 -0
- {csv_detective-0.9.3.dev2039.dist-info → csv_detective-0.9.3.dev2057.dist-info}/entry_points.txt +0 -0
- {csv_detective-0.9.3.dev2039.dist-info → csv_detective-0.9.3.dev2057.dist-info}/licenses/LICENSE +0 -0
- {csv_detective-0.9.3.dev2039.dist-info → csv_detective-0.9.3.dev2057.dist-info}/top_level.txt +0 -0
|
@@ -9,7 +9,7 @@ threshold = 0.7
|
|
|
9
9
|
# matches AAAA-MM-JJTHH:MM:SS(.dddddd)Z with any of the listed separators for the date OR NO SEPARATOR
|
|
10
10
|
pat = (
|
|
11
11
|
aaaammjj_pattern.replace("$", "")
|
|
12
|
-
+ r"(T|\s)(0\d|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(.\d{1,6})?Z
|
|
12
|
+
+ r"(T|\s)(0\d|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(.\d{1,6})?Z?$"
|
|
13
13
|
)
|
|
14
14
|
|
|
15
15
|
|
|
@@ -26,8 +26,4 @@ def _is(val: Optional[Any]) -> bool:
|
|
|
26
26
|
if sum([char.isdigit() or char in {"-", "/", ":", " "} for char in val]) / len(val) < threshold:
|
|
27
27
|
return False
|
|
28
28
|
res = date_casting(val)
|
|
29
|
-
return (
|
|
30
|
-
res is not None
|
|
31
|
-
and bool(res.hour or res.minute or res.second or res.microsecond)
|
|
32
|
-
and not bool(res.tzinfo)
|
|
33
|
-
)
|
|
29
|
+
return res is not None and not bool(res.tzinfo)
|
|
@@ -68,7 +68,7 @@ csv_detective/detect_fields/other/uuid/__init__.py,sha256=XFxbIsdIhRw0dtFxBXQBhi
|
|
|
68
68
|
csv_detective/detect_fields/temp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
69
69
|
csv_detective/detect_fields/temp/date/__init__.py,sha256=JtWaK8hkzBaIUc-fu0G7lIFpWqCfraRh6l0Mo65U3b0,2155
|
|
70
70
|
csv_detective/detect_fields/temp/datetime_aware/__init__.py,sha256=ZDNUcbU0ZJzaxUt0Utc1Y9dRrq4HHW9uCbcnOuz5Sfk,1247
|
|
71
|
-
csv_detective/detect_fields/temp/datetime_naive/__init__.py,sha256=
|
|
71
|
+
csv_detective/detect_fields/temp/datetime_naive/__init__.py,sha256=U1mlQdbvEeJNZgMiYY7xv-_EIBRqzxHsKUgU3ZoF0FM,1088
|
|
72
72
|
csv_detective/detect_fields/temp/datetime_rfc822/__init__.py,sha256=-pFdIIPgaLq2_QbFJ9zwy4YIwZuC73F0A_cNDntTuvQ,512
|
|
73
73
|
csv_detective/detect_fields/temp/year/__init__.py,sha256=gHchVciZExbGZLMBcbBaDXB0IgGptkQc4RhfSOMY0Ww,194
|
|
74
74
|
csv_detective/detect_labels/__init__.py,sha256=93s93DRNeFw9fJiGp0rW3iRWZX3WOeVau2PAaF4QlPE,1777
|
|
@@ -149,18 +149,18 @@ csv_detective/parsing/csv.py,sha256=fJkjKvyk7InkNnYKtmivyi48mmcwvrha7gvZ5J4-86A,
|
|
|
149
149
|
csv_detective/parsing/excel.py,sha256=sKD5PRN1TlzPPOKFnZ3VRb0r1yIjPLlpxVWmZQeLYFk,7027
|
|
150
150
|
csv_detective/parsing/load.py,sha256=C3M8nvgWenOb8aDFi5dpDGCoAw9EBqr4EB63zbz2M14,3699
|
|
151
151
|
csv_detective/parsing/text.py,sha256=uz8wfmNTQnOd_4fjrIZ_5rxmFmgrg343hJh2szB73Hc,1770
|
|
152
|
-
csv_detective-0.9.3.
|
|
152
|
+
csv_detective-0.9.3.dev2057.dist-info/licenses/LICENSE,sha256=A1dQrzxyxRHRih02KwibWj1khQyF7GeA6SqdOU87Gk4,1088
|
|
153
153
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
154
154
|
tests/test_example.py,sha256=uTWswvUzBWEADGXZmMAdZvKhKvIjvT5zWOVVABgCDN4,1987
|
|
155
|
-
tests/test_fields.py,sha256=
|
|
155
|
+
tests/test_fields.py,sha256=IjUvDz155fl0XRw2ENEy5j_auyB3LTidXFi1bEWOCHg,13725
|
|
156
156
|
tests/test_file.py,sha256=QEBv69P0bAKWBzhQ3KKOR1Z1RQSf5CVEilqBojwP2Yc,10791
|
|
157
157
|
tests/test_labels.py,sha256=Y0XlOpztCyV65pk7iAS_nMMfdysoBujlBmz10vHul9A,469
|
|
158
158
|
tests/test_structure.py,sha256=GRDYKy0UcdqlN4qglzsRC0puFj5cb-SVvONjvcPvtAA,1400
|
|
159
159
|
tests/test_validation.py,sha256=ie-Xf0vk6-M6GQq-x7kY5yse1EmXfxQkbaV7fR3fvYo,3308
|
|
160
160
|
venv/bin/activate_this.py,sha256=NRy3waFmwW1pOaNUp33wNN0vD1Kzkd-zXX-Sgl4EiVI,1286
|
|
161
161
|
venv/bin/runxlrd.py,sha256=YlZMuycM_V_hzNt2yt3FyXPuwouMCmMhvj1oZaBeeuw,16092
|
|
162
|
-
csv_detective-0.9.3.
|
|
163
|
-
csv_detective-0.9.3.
|
|
164
|
-
csv_detective-0.9.3.
|
|
165
|
-
csv_detective-0.9.3.
|
|
166
|
-
csv_detective-0.9.3.
|
|
162
|
+
csv_detective-0.9.3.dev2057.dist-info/METADATA,sha256=-Pb3w9H4Mf1DUC9wdM-g_ZMVtE7ZriqcGf7nggFXLWo,9735
|
|
163
|
+
csv_detective-0.9.3.dev2057.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
164
|
+
csv_detective-0.9.3.dev2057.dist-info/entry_points.txt,sha256=JjweTReFqKJmuvkegzlew2j3D5pZzfxvbEGOtGVGmaY,56
|
|
165
|
+
csv_detective-0.9.3.dev2057.dist-info/top_level.txt,sha256=cYKb4Ok3XgYA7rMDOYtxysjSJp_iUA9lJjynhVzue8g,30
|
|
166
|
+
csv_detective-0.9.3.dev2057.dist-info/RECORD,,
|
tests/test_fields.py
CHANGED
|
@@ -363,11 +363,18 @@ fields = {
|
|
|
363
363
|
False: ["2021-06-22T30:20:10", "Sun, 06 Nov 1994 08:49:37 GMT", "2021-06-44 10:20:10"],
|
|
364
364
|
},
|
|
365
365
|
datetime_naive: {
|
|
366
|
-
True: [
|
|
366
|
+
True: [
|
|
367
|
+
"2021-06-22 10:20:10",
|
|
368
|
+
"1999-12-01T00:00:00Z",
|
|
369
|
+
"2030/06-22 00:00:00",
|
|
370
|
+
"2030/06/22 00:00:00.0028",
|
|
371
|
+
],
|
|
367
372
|
False: [
|
|
368
373
|
"2021-06-22T30:20:10",
|
|
369
374
|
"Sun, 06 Nov 1994 08:49:37 GMT",
|
|
370
375
|
"2021-06-44 10:20:10+02:00",
|
|
376
|
+
"2021-06-44",
|
|
377
|
+
"15 décembre 1985",
|
|
371
378
|
],
|
|
372
379
|
},
|
|
373
380
|
datetime_rfc822: {
|
|
File without changes
|
{csv_detective-0.9.3.dev2039.dist-info → csv_detective-0.9.3.dev2057.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{csv_detective-0.9.3.dev2039.dist-info → csv_detective-0.9.3.dev2057.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{csv_detective-0.9.3.dev2039.dist-info → csv_detective-0.9.3.dev2057.dist-info}/top_level.txt
RENAMED
|
File without changes
|