hdx-python-country 3.9.4__tar.gz → 3.9.6__tar.gz

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.
Files changed (50) hide show
  1. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/.pre-commit-config.yaml +4 -4
  2. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/PKG-INFO +1 -1
  3. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/documentation/index.md +2 -2
  4. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/hatch.toml +1 -1
  5. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/requirements.txt +30 -28
  6. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/src/hdx/location/Countries & Territories Taxonomy MVP - C&T Taxonomy with HXL Tags.csv +2 -2
  7. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/src/hdx/location/_version.py +2 -2
  8. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/src/hdx/location/country.py +4 -1
  9. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/hdx/location/Countries_UZB_Deleted.csv +2 -2
  10. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/hdx/location/test_country.py +22 -20
  11. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/.coveragerc +0 -0
  12. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/.github/workflows/publish.yaml +0 -0
  13. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/.github/workflows/run-python-tests.yaml +0 -0
  14. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/.gitignore +0 -0
  15. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/LICENSE +0 -0
  16. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/README.md +0 -0
  17. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/documentation/.readthedocs.yaml +0 -0
  18. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/documentation/mkdocs.yaml +0 -0
  19. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/pyproject.toml +0 -0
  20. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/pytest.ini +0 -0
  21. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/ruff.toml +0 -0
  22. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/src/hdx/location/__init__.py +0 -0
  23. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/src/hdx/location/adminlevel.py +0 -0
  24. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/src/hdx/location/currency.py +0 -0
  25. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/src/hdx/location/int_timestamp.py +0 -0
  26. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/src/hdx/location/wfp_api.py +0 -0
  27. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/src/hdx/location/wfp_exchangerates.py +0 -0
  28. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/adminlevel.yaml +0 -0
  29. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/adminlevelparent.yaml +0 -0
  30. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/download-global-pcode-lengths.csv +0 -0
  31. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/download-global-pcodes-adm-1-2.csv +0 -0
  32. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/secondary_historic_rates.csv +0 -0
  33. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/secondary_rates.json +0 -0
  34. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_List_1.json +0 -0
  35. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_List_2.json +0 -0
  36. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_1.json +0 -0
  37. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_10.json +0 -0
  38. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_2.json +0 -0
  39. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_3.json +0 -0
  40. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_4.json +0 -0
  41. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_5.json +0 -0
  42. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_6.json +0 -0
  43. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_7.json +0 -0
  44. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_8.json +0 -0
  45. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_9.json +0 -0
  46. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/hdx/location/__init__.py +0 -0
  47. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/hdx/location/conftest.py +0 -0
  48. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/hdx/location/test_adminlevel.py +0 -0
  49. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/hdx/location/test_currency.py +0 -0
  50. {hdx_python_country-3.9.4 → hdx_python_country-3.9.6}/tests/hdx/location/test_wfp_exchangerates.py +0 -0
@@ -1,5 +1,5 @@
1
1
  default_language_version:
2
- python: python3.12
2
+ python: python3.13
3
3
  repos:
4
4
  - repo: https://github.com/pre-commit/pre-commit-hooks
5
5
  rev: v5.0.0
@@ -8,15 +8,15 @@ repos:
8
8
  - id: end-of-file-fixer
9
9
  - id: check-ast
10
10
  - repo: https://github.com/astral-sh/ruff-pre-commit
11
- rev: v0.9.10
11
+ rev: v0.12.0
12
12
  hooks:
13
13
  # Run the linter.
14
- - id: ruff
14
+ - id: ruff-check
15
15
  args: [ --fix ]
16
16
  # Run the formatter.
17
17
  - id: ruff-format
18
18
  - repo: https://github.com/astral-sh/uv-pre-commit
19
- rev: 0.6.5
19
+ rev: 0.7.14
20
20
  hooks:
21
21
  # Run the pip compile
22
22
  - id: pip-compile
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hdx-python-country
3
- Version: 3.9.4
3
+ Version: 3.9.6
4
4
  Summary: HDX Python country code and exchange rate (fx) utilities
5
5
  Project-URL: Homepage, https://github.com/OCHA-DAP/hdx-python-country
6
6
  Author: Michael Rans
@@ -96,9 +96,9 @@ The usage of the country mappings functionality is best illustrated by some exam
96
96
  # "#country+alt+i_fr+name+v_m49": "Japon", "#country+alt+i_fr+name+v_unterm": "Japon",
97
97
  # "#country+alt+i_ru+name+v_m49": "Япония", "#country+alt+i_ru+name+v_unterm": "Япония",
98
98
  # "#country+alt+i_zh+name+v_m49": "日本", "#country+alt+i_zh+name+v_unterm": "日本",
99
- # "#country+alt+name+v_dgacm": "", "#country+alt+name+v_fts": "",
99
+ # "#country+alt+name+v_dgacm": "", "#country+alt+name+v_hpctools": "",
100
100
  # "#country+alt+name+v_iso": "", "#country+alt+name+v_reliefweb": "",
101
- # "#country+code+num+v_m49": "392", "#country+code+v_fts": "112",
101
+ # "#country+code+num+v_m49": "392", "#country+code+v_hpctools": "112",
102
102
  # "#country+code+v_iso2": "JP", "#country+code+v_iso3": "JPN",
103
103
  # "#country+code+v_reliefweb": "128", "#country+formal+i_en+name+v_unterm": "Japan",
104
104
  # "#country+name+preferred": "Japan", "#country+name+short+v_reliefweb": "",
@@ -24,7 +24,7 @@ version_scheme = "python-simplified-semver"
24
24
  features = ["test"]
25
25
 
26
26
  [[envs.hatch-test.matrix]]
27
- python = ["3.12"]
27
+ python = ["3.13"]
28
28
 
29
29
  [envs.hatch-test.scripts]
30
30
  run = """
@@ -2,7 +2,7 @@
2
2
  # uv pip compile pyproject.toml --resolver=backtracking --all-extras -o requirements.txt
3
3
  annotated-types==0.7.0
4
4
  # via pydantic
5
- astdoc==1.2.1
5
+ astdoc==1.3.0
6
6
  # via mkapi
7
7
  attrs==25.3.0
8
8
  # via
@@ -12,9 +12,9 @@ attrs==25.3.0
12
12
  # referencing
13
13
  babel==2.17.0
14
14
  # via mkdocs-material
15
- backrefs==5.8
15
+ backrefs==5.9
16
16
  # via mkdocs-material
17
- certifi==2025.4.26
17
+ certifi==2025.7.9
18
18
  # via requests
19
19
  cfgv==3.4.0
20
20
  # via pre-commit
@@ -22,13 +22,13 @@ chardet==5.2.0
22
22
  # via frictionless
23
23
  charset-normalizer==3.4.2
24
24
  # via requests
25
- click==8.1.8
25
+ click==8.2.1
26
26
  # via
27
27
  # mkdocs
28
28
  # typer
29
29
  colorama==0.4.6
30
30
  # via mkdocs-material
31
- coverage==7.8.0
31
+ coverage==7.9.2
32
32
  # via pytest-cov
33
33
  distlib==0.3.9
34
34
  # via virtualenv
@@ -44,7 +44,7 @@ hdx-python-utilities==3.8.7
44
44
  # via hdx-python-country (pyproject.toml)
45
45
  humanize==4.12.3
46
46
  # via frictionless
47
- identify==2.6.10
47
+ identify==2.6.12
48
48
  # via pre-commit
49
49
  idna==3.10
50
50
  # via requests
@@ -64,7 +64,7 @@ jsonlines==4.0.0
64
64
  # via hdx-python-utilities
65
65
  jsonpath-ng==1.7.0
66
66
  # via libhxl
67
- jsonschema==4.23.0
67
+ jsonschema==4.24.0
68
68
  # via
69
69
  # frictionless
70
70
  # tableschema-to-template
@@ -74,14 +74,14 @@ libhxl==5.2.2
74
74
  # via hdx-python-country (pyproject.toml)
75
75
  loguru==0.7.3
76
76
  # via hdx-python-utilities
77
- markdown==3.8
77
+ markdown==3.8.2
78
78
  # via
79
79
  # mkdocs
80
80
  # mkdocs-material
81
81
  # pymdown-extensions
82
82
  markdown-it-py==3.0.0
83
83
  # via rich
84
- marko==2.1.3
84
+ marko==2.1.4
85
85
  # via frictionless
86
86
  markupsafe==3.0.2
87
87
  # via
@@ -93,7 +93,7 @@ mergedeep==1.3.4
93
93
  # via
94
94
  # mkdocs
95
95
  # mkdocs-get-deps
96
- mkapi==4.4.0
96
+ mkapi==4.4.3
97
97
  # via hdx-python-country (pyproject.toml)
98
98
  mkdocs==1.6.1
99
99
  # via
@@ -101,7 +101,7 @@ mkdocs==1.6.1
101
101
  # mkdocs-material
102
102
  mkdocs-get-deps==0.2.0
103
103
  # via mkdocs
104
- mkdocs-material==9.6.14
104
+ mkdocs-material==9.6.15
105
105
  # via mkapi
106
106
  mkdocs-material-extensions==1.3.1
107
107
  # via mkdocs-material
@@ -124,30 +124,33 @@ platformdirs==4.3.8
124
124
  # mkdocs-get-deps
125
125
  # virtualenv
126
126
  pluggy==1.6.0
127
- # via pytest
127
+ # via
128
+ # pytest
129
+ # pytest-cov
128
130
  ply==3.11
129
131
  # via
130
132
  # jsonpath-ng
131
133
  # libhxl
132
134
  pre-commit==4.2.0
133
135
  # via hdx-python-country (pyproject.toml)
134
- pydantic==2.11.4
136
+ pydantic==2.11.7
135
137
  # via frictionless
136
138
  pydantic-core==2.33.2
137
139
  # via pydantic
138
- pygments==2.19.1
140
+ pygments==2.19.2
139
141
  # via
140
142
  # mkdocs-material
143
+ # pytest
141
144
  # rich
142
- pymdown-extensions==10.15
145
+ pymdown-extensions==10.16
143
146
  # via mkdocs-material
144
147
  pyphonetics==0.5.3
145
148
  # via hdx-python-utilities
146
- pytest==8.3.5
149
+ pytest==8.4.1
147
150
  # via
148
151
  # hdx-python-country (pyproject.toml)
149
152
  # pytest-cov
150
- pytest-cov==6.1.1
153
+ pytest-cov==6.2.1
151
154
  # via hdx-python-country (pyproject.toml)
152
155
  python-dateutil==2.9.0.post0
153
156
  # via
@@ -176,7 +179,7 @@ referencing==0.36.2
176
179
  # via
177
180
  # jsonschema
178
181
  # jsonschema-specifications
179
- requests==2.32.3
182
+ requests==2.32.4
180
183
  # via
181
184
  # frictionless
182
185
  # libhxl
@@ -188,11 +191,11 @@ rfc3986==2.0.0
188
191
  # via frictionless
189
192
  rich==14.0.0
190
193
  # via typer
191
- rpds-py==0.25.0
194
+ rpds-py==0.26.0
192
195
  # via
193
196
  # jsonschema
194
197
  # referencing
195
- ruamel-yaml==0.18.10
198
+ ruamel-yaml==0.18.14
196
199
  # via hdx-python-utilities
197
200
  ruamel-yaml-clib==0.2.12
198
201
  # via ruamel-yaml
@@ -202,7 +205,7 @@ simpleeval==1.0.3
202
205
  # via frictionless
203
206
  six==1.17.0
204
207
  # via python-dateutil
205
- structlog==25.3.0
208
+ structlog==25.4.0
206
209
  # via libhxl
207
210
  tableschema-to-template==0.0.13
208
211
  # via hdx-python-utilities
@@ -212,23 +215,22 @@ tenacity==9.1.2
212
215
  # via hdx-python-country (pyproject.toml)
213
216
  text-unidecode==1.3
214
217
  # via python-slugify
215
- typer==0.15.4
218
+ typer==0.16.0
216
219
  # via frictionless
217
- typing-extensions==4.13.2
220
+ typing-extensions==4.14.1
218
221
  # via
219
222
  # frictionless
220
223
  # pydantic
221
224
  # pydantic-core
222
- # referencing
223
225
  # typer
224
226
  # typing-inspection
225
- typing-inspection==0.4.0
227
+ typing-inspection==0.4.1
226
228
  # via pydantic
227
229
  unidecode==1.4.0
228
230
  # via
229
231
  # libhxl
230
232
  # pyphonetics
231
- urllib3==2.4.0
233
+ urllib3==2.5.0
232
234
  # via
233
235
  # libhxl
234
236
  # requests
@@ -240,13 +242,13 @@ watchdog==6.0.0
240
242
  # via mkdocs
241
243
  wheel==0.45.1
242
244
  # via libhxl
243
- xlrd==2.0.1
245
+ xlrd==2.0.2
244
246
  # via hdx-python-utilities
245
247
  xlrd3==1.1.0
246
248
  # via libhxl
247
249
  xlsx2csv==0.8.4
248
250
  # via hdx-python-utilities
249
- xlsxwriter==3.2.3
251
+ xlsxwriter==3.2.5
250
252
  # via tableschema-to-template
251
253
  xlwt==1.3.0
252
254
  # via hdx-python-utilities
@@ -1,5 +1,5 @@
1
- ID,RW ID,m49 numerical code,FTS API ID,Appears in UNTERM list,Appears in DGACM list,Independent,Deprecated,Has HRP,In GHO,ISO 3166-1 Alpha 2-Codes,ISO 3166-1 Alpha 3-Codes,x Alpha2 codes,x Alpha3 codes,Preferred Term,ISO Alt Term,DGACM Alt Term,FTS Alt Term,RW Short Name,RW API Alt Term,English Short,French Short,Spanish Short,Russian Short,Chinese Short,Arabic Short,English Formal,M49 English,M49 French,M49 Spanish,M49 Russian,M49 Chinese,M49 Arabic,Admin Level,Latitude,Longitude,Region Code,Region Name,Sub-region Code,Sub-region Name,Intermediate Region Code,Intermediate Region Name,Regex,World Bank Income Level,Currency,Reference Period Start,Concatenation
2
- #meta +id,#country +code +v_reliefweb,#country +code +num +v_m49,#country +code +v_fts,,,#meta+independent+bool,#meta+deprecated+bool,#indicator+hrp+bool,#indicator+gho+bool,#country +code +v_iso2,#country +code +v_iso3,#country +code +alpha2,#country +code +alpha3,#country +name +preferred,#country +name +alt +v_iso,#country +name +alt +v_dgacm,#country +name +alt +v_fts,#country +name +short +v_reliefweb,#country +name +alt +v_reliefweb,#country +name +i_en +alt +v_unterm,#country +name +i_fr +alt +v_unterm,#country +name +i_es +alt +v_unterm,#country +name +i_ru +alt +v_unterm,#country +name +i_zh +alt +v_unterm,#country +name +i_ar +alt +v_unterm,#country +name +i_en +formal +v_unterm,#country +name +i_en +alt +v_m49,#country +name +i_fr +alt +v_m49,#country +name +i_es +alt +v_m49,#country +name +i_ru +alt +v_m49,#country +name +i_zh +alt +v_m49,#country +name +i_ar +alt +v_m49,#geo +admin_level,#geo +lat,#geo +lon,#region +main +code,#region +main +name +preferred,#region +sub +code,#region +sub +name +preferred,#region +intermediate +code,#region +intermediate +name +preferred,#country +regex,#indicator+incomelevel,#currency +code,#date+start,
1
+ ID,RW ID,m49 numerical code,HPC Tools API ID,Appears in UNTERM list,Appears in DGACM list,Independent,Deprecated,Has HRP,In GHO,ISO 3166-1 Alpha 2-Codes,ISO 3166-1 Alpha 3-Codes,x Alpha2 codes,x Alpha3 codes,Preferred Term,ISO Alt Term,DGACM Alt Term,HPC Tools Alt Term,RW Short Name,RW API Alt Term,English Short,French Short,Spanish Short,Russian Short,Chinese Short,Arabic Short,English Formal,M49 English,M49 French,M49 Spanish,M49 Russian,M49 Chinese,M49 Arabic,Admin Level,Latitude,Longitude,Region Code,Region Name,Sub-region Code,Sub-region Name,Intermediate Region Code,Intermediate Region Name,Regex,World Bank Income Level,Currency,Reference Period Start,Concatenation
2
+ #meta +id,#country +code +v_reliefweb,#country +code +num +v_m49,#country +code +v_hpctools,,,#meta+independent+bool,#meta+deprecated+bool,#indicator+hrp+bool,#indicator+gho+bool,#country +code +v_iso2,#country +code +v_iso3,#country +code +alpha2,#country +code +alpha3,#country +name +preferred,#country +name +alt +v_iso,#country +name +alt +v_dgacm,#country +name +alt +v_hpctools,#country +name +short +v_reliefweb,#country +name +alt +v_reliefweb,#country +name +i_en +alt +v_unterm,#country +name +i_fr +alt +v_unterm,#country +name +i_es +alt +v_unterm,#country +name +i_ru +alt +v_unterm,#country +name +i_zh +alt +v_unterm,#country +name +i_ar +alt +v_unterm,#country +name +i_en +formal +v_unterm,#country +name +i_en +alt +v_m49,#country +name +i_fr +alt +v_m49,#country +name +i_es +alt +v_m49,#country +name +i_ru +alt +v_m49,#country +name +i_zh +alt +v_m49,#country +name +i_ar +alt +v_m49,#geo +admin_level,#geo +lat,#geo +lon,#region +main +code,#region +main +name +preferred,#region +sub +code,#region +sub +name +preferred,#region +intermediate +code,#region +intermediate +name +preferred,#country +regex,#indicator+incomelevel,#currency +code,#date+start,
3
3
  1,13,4,1,Y,Y,Y,N,Y,Y,AF,AFG,,,Afghanistan,,,,,,Afghanistan,Afghanistan,Afganistán,Афганистан,阿富汗,أفغانستان,the Islamic Republic of Afghanistan,Afghanistan,Afghanistan,Afganistán,Афганистан,阿富汗,أفغانستان,0,33.83147477,66.02621828,142,Asia,34,Southern Asia,,,afghan,Low,AFN,2004-01-26,1 - Afghanistan
4
4
  2,14,248,2,,,N,N,,,AX,ALA,,,Åland Islands,,,,,Aland Islands (Finland),Åland Islands,,,,,,,Åland Islands,Îles d’Åland,Islas Åland,Аландских островов,奥兰群岛,جزر ألاند,0,60.18121338,19.89649072,150,Europe,154,Northern Europe,,,^[å|a]land,,EUR,2004-02-13,2 - Åland Islands
5
5
  3,15,8,3,Y,Y,Y,N,,,AL,ALB,,,Albania,,,,,,Albania,Albanie,Albania,Албания,阿尔巴尼亚,ألبانيا,the Republic of Albania,Albania,Albanie,Albania,Албания,阿尔巴尼亚,ألبانيا,0,41.13180899,20.06882519,150,Europe,39,Southern Europe,,,albania,Upper middle,ALL,1974-01-01,3 - Albania
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '3.9.4'
21
- __version_tuple__ = version_tuple = (3, 9, 4)
20
+ __version__ = version = '3.9.6'
21
+ __version_tuple__ = version_tuple = (3, 9, 6)
@@ -743,7 +743,10 @@ class Country:
743
743
  for simplification2 in simplifications:
744
744
  remove.append(simplification2)
745
745
  remove = "|".join(remove)
746
- regex = re.compile(r"[^\w\s]|\b(" + remove + r")\b", flags=re.IGNORECASE)
746
+ regex = re.compile(
747
+ r"[" + punctuation.replace("'", "") + r"]|\b(" + remove + r")\b",
748
+ flags=re.IGNORECASE,
749
+ )
747
750
  countryupper = regex.sub("", countryupper)
748
751
  countryupper = countryupper.strip()
749
752
  countryupper_words = get_words_in_sentence(countryupper)
@@ -1,5 +1,5 @@
1
- ID,RW ID,m49 numerical code,FTS API ID,Appears in UNTERM list,Appears in DGACM list,Independent,Deprecated,Has HRP,In GHO,ISO 3166-1 Alpha 2-Codes,ISO 3166-1 Alpha 3-Codes,x Alpha2 codes,x Alpha3 codes,Preferred Term,ISO Alt Term,DGACM Alt Term,FTS Alt Term,RW Short Name,RW API Alt Term,English Short,French Short,Spanish Short,Russian Short,Chinese Short,Arabic Short,English Formal,M49 English,M49 French,M49 Spanish,M49 Russian,M49 Chinese,M49 Arabic,Admin Level,Latitude,Longitude,Region Code,Region Name,Sub-region Code,Sub-region Name,Intermediate Region Code,Intermediate Region Name,Regex,World Bank Income Level,Currency,Reference Period Start,Concatenation
2
- #meta +id,#country +code +v_reliefweb,#country +code +num +v_m49,#country +code +v_fts,,,#meta+independent+bool,#meta+deprecated+bool,#indicator+hrp+bool,#indicator+gho+bool,#country +code +v_iso2,#country +code +v_iso3,#country +code +alpha2,#country +code +alpha3,#country +name +preferred,#country +name +alt +v_iso,#country +name +alt +v_dgacm,#country +name +alt +v_fts,#country +name +short +v_reliefweb,#country +name +alt +v_reliefweb,#country +name +i_en +alt +v_unterm,#country +name +i_fr +alt +v_unterm,#country +name +i_es +alt +v_unterm,#country +name +i_ru +alt +v_unterm,#country +name +i_zh +alt +v_unterm,#country +name +i_ar +alt +v_unterm,#country +name +i_en +formal +v_unterm,#country +name +i_en +alt +v_m49,#country +name +i_fr +alt +v_m49,#country +name +i_es +alt +v_m49,#country +name +i_ru +alt +v_m49,#country +name +i_zh +alt +v_m49,#country +name +i_ar +alt +v_m49,#geo +admin_level,#geo +lat,#geo +lon,#region +main +code,#region +main +name +preferred,#region +sub +code,#region +sub +name +preferred,#region +intermediate +code,#region +intermediate +name +preferred,#country +regex,#indicator+incomelevel,#currency +code,#date+start,
1
+ ID,RW ID,m49 numerical code,HPC Tools API ID,Appears in UNTERM list,Appears in DGACM list,Independent,Deprecated,Has HRP,In GHO,ISO 3166-1 Alpha 2-Codes,ISO 3166-1 Alpha 3-Codes,x Alpha2 codes,x Alpha3 codes,Preferred Term,ISO Alt Term,DGACM Alt Term,HPC Tools Alt Term,RW Short Name,RW API Alt Term,English Short,French Short,Spanish Short,Russian Short,Chinese Short,Arabic Short,English Formal,M49 English,M49 French,M49 Spanish,M49 Russian,M49 Chinese,M49 Arabic,Admin Level,Latitude,Longitude,Region Code,Region Name,Sub-region Code,Sub-region Name,Intermediate Region Code,Intermediate Region Name,Regex,World Bank Income Level,Currency,Reference Period Start,Concatenation
2
+ #meta +id,#country +code +v_reliefweb,#country +code +num +v_m49,#country +code +v_hpctools,,,#meta+independent+bool,#meta+deprecated+bool,#indicator+hrp+bool,#indicator+gho+bool,#country +code +v_iso2,#country +code +v_iso3,#country +code +alpha2,#country +code +alpha3,#country +name +preferred,#country +name +alt +v_iso,#country +name +alt +v_dgacm,#country +name +alt +v_hpctools,#country +name +short +v_reliefweb,#country +name +alt +v_reliefweb,#country +name +i_en +alt +v_unterm,#country +name +i_fr +alt +v_unterm,#country +name +i_es +alt +v_unterm,#country +name +i_ru +alt +v_unterm,#country +name +i_zh +alt +v_unterm,#country +name +i_ar +alt +v_unterm,#country +name +i_en +formal +v_unterm,#country +name +i_en +alt +v_m49,#country +name +i_fr +alt +v_m49,#country +name +i_es +alt +v_m49,#country +name +i_ru +alt +v_m49,#country +name +i_zh +alt +v_m49,#country +name +i_ar +alt +v_m49,#geo +admin_level,#geo +lat,#geo +lon,#region +main +code,#region +main +name +preferred,#region +sub +code,#region +sub +name +preferred,#region +intermediate +code,#region +intermediate +name +preferred,#country +regex,#indicator+incomelevel,#currency +code,#date+start,
3
3
  1,13,4,1,Y,Y,Y,N,Y,Y,AF,AFG,,,Afghanistan,,,,,,Afghanistan,Afghanistan,Afganistán,Афганистан,阿富汗,أفغانستان,the Islamic Republic of Afghanistan,Afghanistan,Afghanistan,Afganistán,Афганистан,阿富汗,أفغانستان,0,33.83147477,66.02621828,142,Asia,34,Southern Asia,,,afghan,Low,AFN,2004-01-26,1 - Afghanistan
4
4
  2,14,248,2,,,N,N,,,AX,ALA,,,Åland Islands,,,,,Aland Islands (Finland),Åland Islands,,,,,,,Åland Islands,Îles d’Åland,Islas Åland,Аландских островов,奥兰群岛,جزر ألاند,0,60.18121338,19.89649072,150,Europe,154,Northern Europe,,,^[å|a]land,,EUR,2004-02-13,2 - Åland Islands
5
5
  3,15,8,3,Y,Y,Y,N,,,AL,ALB,,,Albania,,,,,,Albania,Albanie,Albania,Албания,阿尔巴尼亚,ألبانيا,the Republic of Albania,Albania,Albanie,Albania,Албания,阿尔巴尼亚,ألبانيا,0,41.13180899,20.06882519,150,Europe,39,Southern Europe,,,albania,Upper middle,ALL,1974-01-01,3 - Albania
@@ -95,11 +95,11 @@ class TestCountry:
95
95
  "#country+alt+i_zh+name+v_m49": "波斯尼亚和黑塞哥维那",
96
96
  "#country+alt+i_zh+name+v_unterm": "波斯尼亚和黑塞哥维那",
97
97
  "#country+alt+name+v_dgacm": "",
98
- "#country+alt+name+v_fts": "",
98
+ "#country+alt+name+v_hpctools": "",
99
99
  "#country+alt+name+v_iso": "",
100
100
  "#country+alt+name+v_reliefweb": "",
101
101
  "#country+code+num+v_m49": "70",
102
- "#country+code+v_fts": "28",
102
+ "#country+code+v_hpctools": "28",
103
103
  "#country+code+v_iso2": "BA",
104
104
  "#country+code+v_iso3": "BIH",
105
105
  "#country+code+v_reliefweb": "40",
@@ -141,11 +141,11 @@ class TestCountry:
141
141
  "#country+alt+i_zh+name+v_m49": "巴勒斯坦国",
142
142
  "#country+alt+i_zh+name+v_unterm": "巴勒斯坦国",
143
143
  "#country+alt+name+v_dgacm": "",
144
- "#country+alt+name+v_fts": "occupied Palestinian territory",
144
+ "#country+alt+name+v_hpctools": "occupied Palestinian territory",
145
145
  "#country+alt+name+v_iso": "Palestine, State of",
146
146
  "#country+alt+name+v_reliefweb": "occupied Palestinian territory",
147
147
  "#country+code+num+v_m49": "275",
148
- "#country+code+v_fts": "171",
148
+ "#country+code+v_hpctools": "171",
149
149
  "#country+code+v_iso2": "PS",
150
150
  "#country+code+v_iso3": "PSE",
151
151
  "#country+code+v_reliefweb": "180",
@@ -191,11 +191,11 @@ class TestCountry:
191
191
  "#country+alt+i_zh+name+v_m49": "",
192
192
  "#country+alt+i_zh+name+v_unterm": "",
193
193
  "#country+alt+name+v_dgacm": "",
194
- "#country+alt+name+v_fts": "",
194
+ "#country+alt+name+v_hpctools": "",
195
195
  "#country+alt+name+v_iso": "",
196
196
  "#country+alt+name+v_reliefweb": "",
197
197
  "#country+code+num+v_m49": "",
198
- "#country+code+v_fts": "",
198
+ "#country+code+v_hpctools": "",
199
199
  "#country+code+v_iso2": "",
200
200
  "#country+code+v_iso3": "",
201
201
  "#country+code+v_reliefweb": "28",
@@ -245,11 +245,11 @@ class TestCountry:
245
245
  "#country+alt+i_zh+name+v_m49": "日本",
246
246
  "#country+alt+i_zh+name+v_unterm": "日本",
247
247
  "#country+alt+name+v_dgacm": "",
248
- "#country+alt+name+v_fts": "",
248
+ "#country+alt+name+v_hpctools": "",
249
249
  "#country+alt+name+v_iso": "",
250
250
  "#country+alt+name+v_reliefweb": "",
251
251
  "#country+code+num+v_m49": "392",
252
- "#country+code+v_fts": "112",
252
+ "#country+code+v_hpctools": "112",
253
253
  "#country+code+v_iso2": "JP",
254
254
  "#country+code+v_iso3": "JPN",
255
255
  "#country+code+v_reliefweb": "128",
@@ -292,11 +292,11 @@ class TestCountry:
292
292
  "#country+alt+i_zh+name+v_m49": "",
293
293
  "#country+alt+i_zh+name+v_unterm": "",
294
294
  "#country+alt+name+v_dgacm": "",
295
- "#country+alt+name+v_fts": "Taiwan, Province of China",
295
+ "#country+alt+name+v_hpctools": "Taiwan, Province of China",
296
296
  "#country+alt+name+v_iso": "",
297
297
  "#country+alt+name+v_reliefweb": "China - Taiwan Province",
298
298
  "#country+code+num+v_m49": "158",
299
- "#country+code+v_fts": "219",
299
+ "#country+code+v_hpctools": "219",
300
300
  "#country+code+v_iso2": "TW",
301
301
  "#country+code+v_iso3": "TWN",
302
302
  "#country+code+v_reliefweb": "61",
@@ -339,11 +339,11 @@ class TestCountry:
339
339
  "#country+alt+i_zh+name+v_m49": "巴勒斯坦国",
340
340
  "#country+alt+i_zh+name+v_unterm": "巴勒斯坦国",
341
341
  "#country+alt+name+v_dgacm": "",
342
- "#country+alt+name+v_fts": "occupied Palestinian territory",
342
+ "#country+alt+name+v_hpctools": "occupied Palestinian territory",
343
343
  "#country+alt+name+v_iso": "Palestine, State of",
344
344
  "#country+alt+name+v_reliefweb": "occupied Palestinian territory",
345
345
  "#country+code+num+v_m49": "275",
346
- "#country+code+v_fts": "171",
346
+ "#country+code+v_hpctools": "171",
347
347
  "#country+code+v_iso2": "PS",
348
348
  "#country+code+v_iso3": "PSE",
349
349
  "#country+code+v_reliefweb": "180",
@@ -389,11 +389,11 @@ class TestCountry:
389
389
  "#country+alt+i_zh+name+v_m49": "",
390
390
  "#country+alt+i_zh+name+v_unterm": "",
391
391
  "#country+alt+name+v_dgacm": "",
392
- "#country+alt+name+v_fts": "",
392
+ "#country+alt+name+v_hpctools": "",
393
393
  "#country+alt+name+v_iso": "",
394
394
  "#country+alt+name+v_reliefweb": "",
395
395
  "#country+code+num+v_m49": "",
396
- "#country+code+v_fts": "",
396
+ "#country+code+v_hpctools": "",
397
397
  "#country+code+v_iso2": "",
398
398
  "#country+code+v_iso3": "",
399
399
  "#country+code+v_reliefweb": "",
@@ -487,11 +487,11 @@ class TestCountry:
487
487
  "#country+alt+i_zh+name+v_m49": "阿富汗",
488
488
  "#country+alt+i_zh+name+v_unterm": "阿富汗",
489
489
  "#country+alt+name+v_dgacm": "",
490
- "#country+alt+name+v_fts": "",
490
+ "#country+alt+name+v_hpctools": "",
491
491
  "#country+alt+name+v_iso": "",
492
492
  "#country+alt+name+v_reliefweb": "",
493
493
  "#country+code+num+v_m49": "4",
494
- "#country+code+v_fts": "1",
494
+ "#country+code+v_hpctools": "1",
495
495
  "#country+code+v_iso2": "AF",
496
496
  "#country+code+v_iso3": "AFG",
497
497
  "#country+code+v_reliefweb": "13",
@@ -533,11 +533,11 @@ class TestCountry:
533
533
  "#country+alt+i_zh+name+v_m49": "萨摩亚",
534
534
  "#country+alt+i_zh+name+v_unterm": "萨摩亚",
535
535
  "#country+alt+name+v_dgacm": "",
536
- "#country+alt+name+v_fts": "",
536
+ "#country+alt+name+v_hpctools": "",
537
537
  "#country+alt+name+v_iso": "",
538
538
  "#country+alt+name+v_reliefweb": "",
539
539
  "#country+code+num+v_m49": "882",
540
- "#country+code+v_fts": "193",
540
+ "#country+code+v_hpctools": "193",
541
541
  "#country+code+v_iso2": "WS",
542
542
  "#country+code+v_iso3": "WSM",
543
543
  "#country+code+v_reliefweb": "204",
@@ -579,11 +579,11 @@ class TestCountry:
579
579
  "#country+alt+i_zh+name+v_m49": "巴勒斯坦国",
580
580
  "#country+alt+i_zh+name+v_unterm": "巴勒斯坦国",
581
581
  "#country+alt+name+v_dgacm": "",
582
- "#country+alt+name+v_fts": "occupied Palestinian territory",
582
+ "#country+alt+name+v_hpctools": "occupied Palestinian territory",
583
583
  "#country+alt+name+v_iso": "Palestine, State of",
584
584
  "#country+alt+name+v_reliefweb": "occupied Palestinian territory",
585
585
  "#country+code+num+v_m49": "275",
586
- "#country+code+v_fts": "171",
586
+ "#country+code+v_hpctools": "171",
587
587
  "#country+code+v_iso2": "PS",
588
588
  "#country+code+v_iso3": "PSE",
589
589
  "#country+code+v_reliefweb": "180",
@@ -674,6 +674,7 @@ class TestCountry:
674
674
  assert Country.simplify_countryname(
675
675
  "The former Yugoslav Republic of Macedonia"
676
676
  ) == ("MACEDONIA", ["THE", "FORMER", "YUGOSLAV", "REPUBLIC", "OF"])
677
+ assert Country.simplify_countryname("d'Ivoire Côte") == ("D'IVOIRE", ["CÔTE"])
677
678
 
678
679
  def test_get_iso3_country_code(self):
679
680
  assert Country.get_iso3_country_code("jpn") == "JPN"
@@ -826,6 +827,7 @@ class TestCountry:
826
827
  self.setup_unofficial_date()
827
828
  assert Country.get_iso3_country_code_fuzzy("Kosovo") == ("XKX", True)
828
829
  assert Country.get_iso3_country_code_fuzzy("Kosovo*") == ("XKX", False)
830
+ assert Country.get_iso3_country_code_fuzzy("d'Ivoire Côte") == ("CIV", False)
829
831
 
830
832
  def test_get_countries_in_region(self):
831
833
  assert Country.get_countries_in_region("Eastern Asia") == [