hdx-python-country 4.1.2__tar.gz → 4.1.4__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-4.1.2 → hdx_python_country-4.1.4}/.github/workflows/run-python-tests.yaml +2 -2
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/PKG-INFO +28 -1
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/README.md +25 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/pyproject.toml +13 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/src/hdx/location/Countries & Territories Taxonomy MVP - C&T Taxonomy.csv +257 -257
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/src/hdx/location/_version.py +2 -2
- hdx_python_country-4.1.4/src/hdx/location/wfp_api.py +323 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/src/hdx/location/wfp_exchangerates.py +15 -14
- hdx_python_country-4.1.4/tests/fixtures/wfp/Markets_List_AFG_1.json +28 -0
- hdx_python_country-4.1.4/tests/fixtures/wfp/Markets_List_AFG_2.json +5 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/hdx/location/Countries_UZB_Deleted.csv +27 -27
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/hdx/location/test_country.py +1 -1
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/hdx/location/test_currency.py +1 -1
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/hdx/location/test_wfp_exchangerates.py +6 -1
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/uv.lock +205 -103
- hdx_python_country-4.1.2/src/hdx/location/wfp_api.py +0 -171
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/.github/workflows/publish.yaml +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/.gitignore +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/.pre-commit-config.yaml +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/LICENSE +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/documentation/.readthedocs.yaml +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/documentation/index.md +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/documentation/mkdocs.yaml +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/src/hdx/location/__init__.py +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/src/hdx/location/adminlevel.py +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/src/hdx/location/country.py +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/src/hdx/location/currency.py +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/src/hdx/location/int_timestamp.py +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/adminlevel.yaml +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/adminlevelparent.yaml +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/fixtures-download-global-pcode-lengths.csv +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/fixtures-download-global-pcodes-adm-1-2.csv +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/secondary_historic_rates.csv +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/secondary_rates.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_List_1.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_List_2.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_1.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_10.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_2.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_3.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_4.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_5.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_6.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_7.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_8.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_9.json +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/hdx/location/__init__.py +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/hdx/location/conftest.py +0 -0
- {hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/tests/hdx/location/test_adminlevel.py +0 -0
{hdx_python_country-4.1.2 → hdx_python_country-4.1.4}/.github/workflows/run-python-tests.yaml
RENAMED
|
@@ -25,7 +25,7 @@ jobs:
|
|
|
25
25
|
python-version: "3.13"
|
|
26
26
|
|
|
27
27
|
- name: Install dependencies
|
|
28
|
-
run: uv sync --frozen
|
|
28
|
+
run: uv sync --frozen --extra wfp
|
|
29
29
|
|
|
30
30
|
- name: Check styling
|
|
31
31
|
run: |
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
|
|
38
38
|
- name: Publish Unit Test Results
|
|
39
39
|
uses: EnricoMi/publish-unit-test-result-action@v2
|
|
40
|
-
if:
|
|
40
|
+
if: success()
|
|
41
41
|
with:
|
|
42
42
|
files: test-results.xml
|
|
43
43
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hdx-python-country
|
|
3
|
-
Version: 4.1.
|
|
3
|
+
Version: 4.1.4
|
|
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
|
Project-URL: Repository, https://github.com/OCHA-DAP/hdx-python-country
|
|
@@ -31,6 +31,8 @@ Requires-Dist: hdx-python-utilities<5,>=4.1.2
|
|
|
31
31
|
Requires-Dist: tenacity
|
|
32
32
|
Provides-Extra: docs
|
|
33
33
|
Requires-Dist: mkapi; extra == 'docs'
|
|
34
|
+
Provides-Extra: wfp
|
|
35
|
+
Requires-Dist: data-bridges-client<10,>=9.0.0; extra == 'wfp'
|
|
34
36
|
Description-Content-Type: text/markdown
|
|
35
37
|
|
|
36
38
|
[](https://github.com/OCHA-DAP/hdx-python-country/actions/workflows/run-python-tests.yaml)
|
|
@@ -140,3 +142,28 @@ To run the tests and view coverage, execute:
|
|
|
140
142
|
The documentation, including API documentation, is generated using ReadtheDocs and
|
|
141
143
|
MkDocs with Material. As you change the source code, remember to update the
|
|
142
144
|
documentation at `documentation/index.md`.
|
|
145
|
+
|
|
146
|
+
## WFP DataBridges Client
|
|
147
|
+
|
|
148
|
+
The `WFPAPI` class (`hdx.location.wfp_api`) uses WFP's `data-bridges-client` library, which is
|
|
149
|
+
published on WFP's own package index rather than PyPI. To install it, use the `wfp` extra with
|
|
150
|
+
that index added:
|
|
151
|
+
|
|
152
|
+
```shell
|
|
153
|
+
pip install "hdx-python-country[wfp]" \
|
|
154
|
+
--extra-index-url https://d2i4vvypvg40rv.cloudfront.net/pypi/ \
|
|
155
|
+
--index-strategy unsafe-best-match
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
If using `uv`, add the following to your project's `pyproject.toml`:
|
|
159
|
+
|
|
160
|
+
```toml
|
|
161
|
+
[tool.uv]
|
|
162
|
+
index-strategy = "unsafe-best-match"
|
|
163
|
+
|
|
164
|
+
[[tool.uv.index]]
|
|
165
|
+
name = "wfp"
|
|
166
|
+
url = "https://d2i4vvypvg40rv.cloudfront.net/pypi/"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
then run `uv sync --extra wfp`.
|
|
@@ -105,3 +105,28 @@ To run the tests and view coverage, execute:
|
|
|
105
105
|
The documentation, including API documentation, is generated using ReadtheDocs and
|
|
106
106
|
MkDocs with Material. As you change the source code, remember to update the
|
|
107
107
|
documentation at `documentation/index.md`.
|
|
108
|
+
|
|
109
|
+
## WFP DataBridges Client
|
|
110
|
+
|
|
111
|
+
The `WFPAPI` class (`hdx.location.wfp_api`) uses WFP's `data-bridges-client` library, which is
|
|
112
|
+
published on WFP's own package index rather than PyPI. To install it, use the `wfp` extra with
|
|
113
|
+
that index added:
|
|
114
|
+
|
|
115
|
+
```shell
|
|
116
|
+
pip install "hdx-python-country[wfp]" \
|
|
117
|
+
--extra-index-url https://d2i4vvypvg40rv.cloudfront.net/pypi/ \
|
|
118
|
+
--index-strategy unsafe-best-match
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
If using `uv`, add the following to your project's `pyproject.toml`:
|
|
122
|
+
|
|
123
|
+
```toml
|
|
124
|
+
[tool.uv]
|
|
125
|
+
index-strategy = "unsafe-best-match"
|
|
126
|
+
|
|
127
|
+
[[tool.uv.index]]
|
|
128
|
+
name = "wfp"
|
|
129
|
+
url = "https://d2i4vvypvg40rv.cloudfront.net/pypi/"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
then run `uv sync --extra wfp`.
|
|
@@ -42,6 +42,7 @@ dependencies = [
|
|
|
42
42
|
|
|
43
43
|
[project.optional-dependencies]
|
|
44
44
|
docs = ["mkapi"]
|
|
45
|
+
wfp = ["data-bridges-client>=9.0.0,<10"]
|
|
45
46
|
|
|
46
47
|
[dependency-groups]
|
|
47
48
|
dev = [
|
|
@@ -49,6 +50,7 @@ dev = [
|
|
|
49
50
|
"pytest-cov",
|
|
50
51
|
"pre-commit",
|
|
51
52
|
"ruff==0.14.13",
|
|
53
|
+
"data-bridges-client>=9.0.0,<10",
|
|
52
54
|
]
|
|
53
55
|
|
|
54
56
|
[project.urls]
|
|
@@ -76,6 +78,17 @@ packages = ["src/hdx"]
|
|
|
76
78
|
[tool.hatch.metadata]
|
|
77
79
|
allow-direct-references = true
|
|
78
80
|
|
|
81
|
+
# ----------------------------------------------------------------------------
|
|
82
|
+
# uv (Package Management)
|
|
83
|
+
# ----------------------------------------------------------------------------
|
|
84
|
+
|
|
85
|
+
[tool.uv]
|
|
86
|
+
index-strategy = "unsafe-best-match"
|
|
87
|
+
|
|
88
|
+
[[tool.uv.index]]
|
|
89
|
+
name = "wfp"
|
|
90
|
+
url = "https://d2i4vvypvg40rv.cloudfront.net/pypi/"
|
|
91
|
+
|
|
79
92
|
# ----------------------------------------------------------------------------
|
|
80
93
|
# Ruff (Linting & Formatting)
|
|
81
94
|
# ----------------------------------------------------------------------------
|