csv-detective 0.10.1.dev2616__py3-none-any.whl → 0.10.1.dev2642__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.
@@ -7,17 +7,17 @@ proportion = 1
7
7
  tags = ["geo"]
8
8
 
9
9
  with open(join(dirname(__file__), "data", "iso_country_code_alpha3.txt"), "r") as iofile:
10
- liste_pays = iofile.read().split("\n")
10
+ liste_pays = set(iofile.read().split("\n"))
11
11
 
12
12
 
13
13
  def _is(val):
14
14
  """Renvoie True si val peut etre un code iso pays alpha-3, False sinon"""
15
- if not isinstance(val, str) or not bool(re.match(r"[A-Z]{3}$", val)):
15
+ if not isinstance(val, str) or not bool(re.match(r"[a-zA-Z]{3}$", val)):
16
16
  return False
17
- return val in set(liste_pays)
17
+ return val.upper() in liste_pays
18
18
 
19
19
 
20
20
  _test_values = {
21
- True: ["FRA"],
21
+ True: ["FRA", "brb"],
22
22
  False: ["XXX", "FR", "A"],
23
23
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: csv-detective
3
- Version: 0.10.1.dev2616
3
+ Version: 0.10.1.dev2642
4
4
  Summary: Detect tabular files column content
5
5
  Keywords: CSV,data processing,encoding,guess,parser,tabular
6
6
  Author: data.gouv.fr
@@ -24,7 +24,7 @@ Requires-Dist: pytest>=8.3.0 ; extra == 'dev'
24
24
  Requires-Dist: responses>=0.25.0 ; extra == 'dev'
25
25
  Requires-Dist: ruff>=0.9.3 ; extra == 'dev'
26
26
  Requires-Python: >=3.10, <3.15
27
- Project-URL: Source, https://github.com/datagouv/csv_detective
27
+ Project-URL: Source, https://github.com/datagouv/csv-detective
28
28
  Provides-Extra: dev
29
29
  Description-Content-Type: text/markdown
30
30
 
@@ -27,10 +27,10 @@ csv_detective/formats/code_waldec.py,sha256=j4-xpj_73c7IdgLoZJY_kRVj3HkpB7RFfGPN
27
27
  csv_detective/formats/commune.py,sha256=QVscVy5Ij9kdzKJgIG2aFC_v1IRsov5M9Zkj_SHDWgs,541
28
28
  csv_detective/formats/csp_insee.py,sha256=y1w9zPQvijQi5v1Cuye0aX87ZVDC4FeFx1YC0dLqqp8,688
29
29
  csv_detective/formats/data/csp_insee.txt,sha256=kgKaKc-5PHu5U4--ugLjpFyMNtTU9CGdZ9ANU3YAsM4,32879
30
- csv_detective/formats/data/insee_ape700.txt,sha256=nKgslakENwgE7sPkVNHqR23iXuxF02p9-v5MC2_ntx8,4398
31
- csv_detective/formats/data/iso_country_code_alpha2.txt,sha256=YyPlDqCdz65ecf4Wes_r0P4rDSJG35niXtjc4MmctXM,1740
32
- csv_detective/formats/data/iso_country_code_alpha3.txt,sha256=aYqKSohgXuBtcIBfF52f8JWYDdxL_HV_Ol1srGnWBp4,1003
33
- csv_detective/formats/data/iso_country_code_numeric.txt,sha256=2GtEhuporsHYV-pU4q9kfXU5iOtfW5C0GYBTTKQtnnA,1004
30
+ csv_detective/formats/data/insee_ape700.txt,sha256=-_N-zAmcT7rK7ACRfsrM01Ton4_XtZGcNk-7lU28VHU,4397
31
+ csv_detective/formats/data/iso_country_code_alpha2.txt,sha256=mLt_qcQ6D8hfy9zdi7fAK_zON1ojReKlKMA8c2VDoRU,752
32
+ csv_detective/formats/data/iso_country_code_alpha3.txt,sha256=XFPdGBsyZCBg4D8IDn6VgwsycCwYVfuqPbyHfNeqGv0,1003
33
+ csv_detective/formats/data/iso_country_code_numeric.txt,sha256=sdGpn0PqDMlc59-7prThkihHrf7mwB6j5uEHpxGvLFE,1003
34
34
  csv_detective/formats/date.py,sha256=Q6w1azLKNshJJVLOPBHj-77ZinXYMW_EKp_BGDshLLE,2802
35
35
  csv_detective/formats/date_fr.py,sha256=YnNXSgT6QekfTUJoS5yuRX8LeK-fmVDgLgVP9cP0e4M,505
36
36
  csv_detective/formats/datetime_aware.py,sha256=izKo6CA-MNIzmmM3Br4-FOESyqCS_YYK8N4V9D6CVEI,1909
@@ -43,8 +43,8 @@ csv_detective/formats/geojson.py,sha256=jXKpTHnEsEH_0JJ393mgvF0IYP5AoarJC_-aTuNY
43
43
  csv_detective/formats/insee_ape700.py,sha256=WxblAHFCOIxigANQKV6mMjMwKauPGQmxqvk8DIKHD2Q,833
44
44
  csv_detective/formats/insee_canton.py,sha256=_jTL47d46PosKO-1Kg5ak88QPCyeKkEP-noj1fCRMTE,545
45
45
  csv_detective/formats/int.py,sha256=VSAPL0MCxTsdi2CgtHratd2e_7FSEZHTfdUgGnVuP5U,518
46
- csv_detective/formats/iso_country_code_alpha2.py,sha256=qHvNv2xavoy4yIfqs9P5OrohjiGeTcMFXWrpg01pWfw,652
47
- csv_detective/formats/iso_country_code_alpha3.py,sha256=2f762WgNPZnUbxGFOVCkG37deU2V-gxiI6uQhcvzHUA,600
46
+ csv_detective/formats/iso_country_code_alpha2.py,sha256=4WI4vSVQOW5JURjN1lu32M8Mce5t29zshgjCPNB3dk8,644
47
+ csv_detective/formats/iso_country_code_alpha3.py,sha256=zcOb0UFECoMBuDXxvKwc46xQowyuWws_jxf5Aod8jTE,618
48
48
  csv_detective/formats/iso_country_code_numeric.py,sha256=bpBUb5IQTU-s_-E81iq9dA6_ld7hrSY9jLi0fyWNNNo,617
49
49
  csv_detective/formats/jour_de_la_semaine.py,sha256=5ScA-UU1EGP_WgycP3NpGVxTeKOyAZlNFOA2mtOuCdc,603
50
50
  csv_detective/formats/json.py,sha256=5mCr50RvKFsbMQ-Ad1ORZ6UvOS9v3GUCh6z37mNT57I,534
@@ -86,7 +86,7 @@ csv_detective/parsing/load.py,sha256=f-8aKiNpy_47qg4Lq-UZUR4NNrbJ_-KEGvcUQZ8cmb0
86
86
  csv_detective/parsing/text.py,sha256=yDAcop5xJQc25UtbZcV0guHXAZQfm-H8WuJORTy8Rr8,1734
87
87
  csv_detective/utils.py,sha256=RJ_zFOJ1DRY8HtDrKPiCdNk5gU6-KwOrOKOyfSkBZZY,1118
88
88
  csv_detective/validate.py,sha256=CjZXhhDP-n6wGgEqbwrGRqebU8L5bidwnvQp-TbnvFA,5424
89
- csv_detective-0.10.1.dev2616.dist-info/WHEEL,sha256=xDCZ-UyfvkGuEHPeI7BcJzYKIZzdqN8A8o1M5Om8IyA,79
90
- csv_detective-0.10.1.dev2616.dist-info/entry_points.txt,sha256=1J86TQNCanjsLMboAufdEUla03qEQaC9QmVGYgt2FCQ,57
91
- csv_detective-0.10.1.dev2616.dist-info/METADATA,sha256=iib4MHLNBeDYLj_7hWV32zRaYz-lxiAf0icNu_Gmb4c,11064
92
- csv_detective-0.10.1.dev2616.dist-info/RECORD,,
89
+ csv_detective-0.10.1.dev2642.dist-info/WHEEL,sha256=xDCZ-UyfvkGuEHPeI7BcJzYKIZzdqN8A8o1M5Om8IyA,79
90
+ csv_detective-0.10.1.dev2642.dist-info/entry_points.txt,sha256=1J86TQNCanjsLMboAufdEUla03qEQaC9QmVGYgt2FCQ,57
91
+ csv_detective-0.10.1.dev2642.dist-info/METADATA,sha256=985RRKeEOhqPv3Vx3P8anI-ZBxsWCe0WwEZBsJHVRBw,11064
92
+ csv_detective-0.10.1.dev2642.dist-info/RECORD,,