hdx-python-country 3.9.5__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.
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/.pre-commit-config.yaml +4 -4
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/PKG-INFO +1 -1
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/hatch.toml +1 -1
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/requirements.txt +30 -28
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/src/hdx/location/_version.py +2 -2
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/src/hdx/location/country.py +4 -1
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/hdx/location/test_country.py +2 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/.coveragerc +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/.github/workflows/publish.yaml +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/.github/workflows/run-python-tests.yaml +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/.gitignore +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/LICENSE +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/README.md +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/documentation/.readthedocs.yaml +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/documentation/index.md +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/documentation/mkdocs.yaml +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/pyproject.toml +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/pytest.ini +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/ruff.toml +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/src/hdx/location/Countries & Territories Taxonomy MVP - C&T Taxonomy with HXL Tags.csv +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/src/hdx/location/__init__.py +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/src/hdx/location/adminlevel.py +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/src/hdx/location/currency.py +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/src/hdx/location/int_timestamp.py +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/src/hdx/location/wfp_api.py +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/src/hdx/location/wfp_exchangerates.py +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/adminlevel.yaml +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/adminlevelparent.yaml +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/download-global-pcode-lengths.csv +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/download-global-pcodes-adm-1-2.csv +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/secondary_historic_rates.csv +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/secondary_rates.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_List_1.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_List_2.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_1.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_10.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_2.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_3.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_4.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_5.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_6.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_7.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_8.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_9.json +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/hdx/location/Countries_UZB_Deleted.csv +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/hdx/location/__init__.py +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/hdx/location/conftest.py +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/hdx/location/test_adminlevel.py +0 -0
- {hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/hdx/location/test_currency.py +0 -0
- {hdx_python_country-3.9.5 → 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.
|
|
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.
|
|
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.
|
|
19
|
+
rev: 0.7.14
|
|
20
20
|
hooks:
|
|
21
21
|
# Run the pip compile
|
|
22
22
|
- id: pip-compile
|
|
@@ -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.
|
|
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.
|
|
15
|
+
backrefs==5.9
|
|
16
16
|
# via mkdocs-material
|
|
17
|
-
certifi==2025.
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
136
|
+
pydantic==2.11.7
|
|
135
137
|
# via frictionless
|
|
136
138
|
pydantic-core==2.33.2
|
|
137
139
|
# via pydantic
|
|
138
|
-
pygments==2.19.
|
|
140
|
+
pygments==2.19.2
|
|
139
141
|
# via
|
|
140
142
|
# mkdocs-material
|
|
143
|
+
# pytest
|
|
141
144
|
# rich
|
|
142
|
-
pymdown-extensions==10.
|
|
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.
|
|
149
|
+
pytest==8.4.1
|
|
147
150
|
# via
|
|
148
151
|
# hdx-python-country (pyproject.toml)
|
|
149
152
|
# pytest-cov
|
|
150
|
-
pytest-cov==6.
|
|
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.
|
|
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.
|
|
194
|
+
rpds-py==0.26.0
|
|
192
195
|
# via
|
|
193
196
|
# jsonschema
|
|
194
197
|
# referencing
|
|
195
|
-
ruamel-yaml==0.18.
|
|
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.
|
|
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.
|
|
218
|
+
typer==0.16.0
|
|
216
219
|
# via frictionless
|
|
217
|
-
typing-extensions==4.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
251
|
+
xlsxwriter==3.2.5
|
|
250
252
|
# via tableschema-to-template
|
|
251
253
|
xlwt==1.3.0
|
|
252
254
|
# via hdx-python-utilities
|
|
@@ -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(
|
|
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)
|
|
@@ -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") == [
|
|
File without changes
|
|
File without changes
|
{hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/.github/workflows/run-python-tests.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/secondary_historic_rates.csv
RENAMED
|
File without changes
|
|
File without changes
|
{hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_List_1.json
RENAMED
|
File without changes
|
{hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/fixtures/wfp/Currency_List_2.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/hdx/location/Countries_UZB_Deleted.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_country-3.9.5 → hdx_python_country-3.9.6}/tests/hdx/location/test_wfp_exchangerates.py
RENAMED
|
File without changes
|