csv-detective 0.7.5.dev1239__py3-none-any.whl → 0.7.5.dev1244__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.
@@ -12,7 +12,7 @@ def _is(val):
12
12
  if (
13
13
  not isinstance(val, str)
14
14
  or any([k in val for k in ['_', '+', 'e', 'E']])
15
- or (val.startswith('0') and len(val) > 1)
15
+ or (val.startswith("0") and len(val) > 1 and val[1] not in [".", ","])
16
16
  ):
17
17
  return False
18
18
  float_casting(val)
@@ -12,6 +12,7 @@
12
12
  - Handle csv.gz files [#110](https://github.com/datagouv/csv-detective/pull/110)
13
13
  - Refactor file tests [#110](https://github.com/datagouv/csv-detective/pull/110)
14
14
  - Restructure repo (breaking changes) [#111](https://github.com/datagouv/csv-detective/pull/111)
15
+ - Better float detection [#113](https://github.com/datagouv/csv-detective/pull/113)
15
16
 
16
17
  ## 0.7.4 (2024-11-15)
17
18
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csv_detective
3
- Version: 0.7.5.dev1239
3
+ Version: 0.7.5.dev1244
4
4
  Summary: Detect CSV column content
5
5
  Home-page: https://github.com/etalab/csv_detective
6
6
  Author: Etalab
@@ -53,7 +53,7 @@ csv_detective/detect_fields/geo/longitude_wgs/__init__.py,sha256=G7afWOKiGh_Tv7g
53
53
  csv_detective/detect_fields/other/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  csv_detective/detect_fields/other/booleen/__init__.py,sha256=wn_yyTAmGxqo0l0b7JRpGb0da_E27iGxES9zWCrnsqc,497
55
55
  csv_detective/detect_fields/other/email/__init__.py,sha256=O9tgJmq0O8Q-8iin63NqEEDhlsUJjxFZNaNFM4GZaws,178
56
- csv_detective/detect_fields/other/float/__init__.py,sha256=dpEd5ZijmjQ7gqcTnYRoRoLGGJae0RyGwVC6MPra9go,549
56
+ csv_detective/detect_fields/other/float/__init__.py,sha256=7bXuPAmBuIhKJEhq7d20B60WVol1AUpqRkWhreQpWfU,578
57
57
  csv_detective/detect_fields/other/int/__init__.py,sha256=QN3kQJLYqLRBiubUK7g4Xq03PlA5wqVwx2pPPIO9FdI,320
58
58
  csv_detective/detect_fields/other/json/__init__.py,sha256=DhzyvT12kOqgum89silIu3uoSYXmC_s_AaxLtXAD4eU,540
59
59
  csv_detective/detect_fields/other/mongo_object_id/__init__.py,sha256=7fcrHsOZAqXp2_N0IjPskYJ_qi4xRlo9iyNNDQVLzsU,156
@@ -141,18 +141,18 @@ csv_detective/parsing/csv.py,sha256=11mibDnJhIjykXLGZvA5ZEU5U7KgxIrbyO6BNv6jlro,
141
141
  csv_detective/parsing/excel.py,sha256=AslE2S1e67o8yTIAIhp-lAnJ6-XqeBBRz1-VMFqhZBM,7055
142
142
  csv_detective/parsing/load.py,sha256=SpP0pfxswOAPPpwbZfoP1blh0EKV5VMs0TpTgQJKzjs,3621
143
143
  csv_detective/parsing/text.py,sha256=rsfk66BCmdpsCOd0kDJ8tmqMsEWd-OeBkEisWc4Ej9k,1246
144
- csv_detective-0.7.5.dev1239.data/data/share/csv_detective/CHANGELOG.md,sha256=povo1ufNJvsxJLkzdjYLgkTy9E-MNFWTg6elXe2nyqU,7625
145
- csv_detective-0.7.5.dev1239.data/data/share/csv_detective/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
146
- csv_detective-0.7.5.dev1239.data/data/share/csv_detective/README.md,sha256=Qr8xRXc-dxQ-tdXCpCTCKp1Uliqq84r0UOlPRNuGCpI,9506
147
- csv_detective-0.7.5.dev1239.dist-info/licenses/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
144
+ csv_detective-0.7.5.dev1244.data/data/share/csv_detective/CHANGELOG.md,sha256=OhgKjKnSxoFPvzW0BUdnOijCDlaCazFPCH76ZWhlijo,7709
145
+ csv_detective-0.7.5.dev1244.data/data/share/csv_detective/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
146
+ csv_detective-0.7.5.dev1244.data/data/share/csv_detective/README.md,sha256=Qr8xRXc-dxQ-tdXCpCTCKp1Uliqq84r0UOlPRNuGCpI,9506
147
+ csv_detective-0.7.5.dev1244.dist-info/licenses/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
148
148
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
149
149
  tests/test_example.py,sha256=0NfChooJQlFxTo2nY5FOQIcsK4zzWA_SBmt2LwVQovY,2014
150
- tests/test_fields.py,sha256=fcgycaFxacOcN0WdwuUvxef_ejd6tRHNpkD5pxMjMXE,11141
150
+ tests/test_fields.py,sha256=LPLx09cX5u9XHAh65XvTgIqzKylToiHZxXzKhpV0wsk,11148
151
151
  tests/test_file.py,sha256=EleTssys5fCP4N0W1eTZN35uijzoF15e3dIcuIlrMsk,7865
152
152
  tests/test_labels.py,sha256=6MOKrGznkwU5fjZ_3oiB6Scmb480Eu-9geBJs0UDLds,159
153
153
  tests/test_structure.py,sha256=SVsnluVoIIprYw_67I1_gB3cp9m1wlO8C7SpdsLW8cM,1161
154
- csv_detective-0.7.5.dev1239.dist-info/METADATA,sha256=81-Ik3akmjcTO7mTqHRWrMLUP-4uZ4ffPyg9L74pImg,1386
155
- csv_detective-0.7.5.dev1239.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
156
- csv_detective-0.7.5.dev1239.dist-info/entry_points.txt,sha256=JjweTReFqKJmuvkegzlew2j3D5pZzfxvbEGOtGVGmaY,56
157
- csv_detective-0.7.5.dev1239.dist-info/top_level.txt,sha256=M0Nv646VHo-49zWjPkwo2C48UmtfddV8_9mEZeIxy8Q,20
158
- csv_detective-0.7.5.dev1239.dist-info/RECORD,,
154
+ csv_detective-0.7.5.dev1244.dist-info/METADATA,sha256=h8jO7r1lWud7Afh7T0eye7GbdJmukr_a9ZHPl_HeXbs,1386
155
+ csv_detective-0.7.5.dev1244.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
156
+ csv_detective-0.7.5.dev1244.dist-info/entry_points.txt,sha256=JjweTReFqKJmuvkegzlew2j3D5pZzfxvbEGOtGVGmaY,56
157
+ csv_detective-0.7.5.dev1244.dist-info/top_level.txt,sha256=M0Nv646VHo-49zWjPkwo2C48UmtfddV8_9mEZeIxy8Q,20
158
+ csv_detective-0.7.5.dev1244.dist-info/RECORD,,
tests/test_fields.py CHANGED
@@ -501,7 +501,7 @@ def test_not_match_int():
501
501
 
502
502
  # float
503
503
  def test_match_float():
504
- for val in ["1", "0", "1764", "-24", "1.2", "1863.23", "-12.7"]:
504
+ for val in ["1", "0", "1764", "-24", "1.2", "1863.23", "-12.7", "0.1"]:
505
505
  assert test_float._is(val)
506
506
 
507
507