hdx-python-country 4.1.0__tar.gz → 4.1.1__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 (49) hide show
  1. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/PKG-INFO +2 -3
  2. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/documentation/index.md +11 -9
  3. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/pyproject.toml +1 -2
  4. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/src/hdx/location/_version.py +2 -2
  5. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/src/hdx/location/adminlevel.py +132 -197
  6. hdx_python_country-4.1.1/tests/fixtures/adminlevel.yaml +563 -0
  7. hdx_python_country-4.1.1/tests/fixtures/adminlevelparent.yaml +25 -0
  8. hdx_python_country-4.1.0/tests/fixtures/download-global-pcode-lengths.csv → hdx_python_country-4.1.1/tests/fixtures/fixtures-download-global-pcode-lengths.csv +0 -1
  9. hdx_python_country-4.1.0/tests/fixtures/download-global-pcodes-adm-1-2.csv → hdx_python_country-4.1.1/tests/fixtures/fixtures-download-global-pcodes-adm-1-2.csv +0 -1
  10. hdx_python_country-4.1.1/tests/hdx/location/test_adminlevel.py +783 -0
  11. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/uv.lock +1 -81
  12. hdx_python_country-4.1.0/tests/fixtures/adminlevel.yaml +0 -563
  13. hdx_python_country-4.1.0/tests/fixtures/adminlevelparent.yaml +0 -25
  14. hdx_python_country-4.1.0/tests/hdx/location/test_adminlevel.py +0 -749
  15. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/.github/workflows/publish.yaml +0 -0
  16. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/.github/workflows/run-python-tests.yaml +0 -0
  17. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/.gitignore +0 -0
  18. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/.pre-commit-config.yaml +0 -0
  19. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/LICENSE +0 -0
  20. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/README.md +0 -0
  21. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/documentation/.readthedocs.yaml +0 -0
  22. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/documentation/mkdocs.yaml +0 -0
  23. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/src/hdx/location/Countries & Territories Taxonomy MVP - C&T Taxonomy.csv +0 -0
  24. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/src/hdx/location/__init__.py +0 -0
  25. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/src/hdx/location/country.py +0 -0
  26. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/src/hdx/location/currency.py +0 -0
  27. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/src/hdx/location/int_timestamp.py +0 -0
  28. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/src/hdx/location/wfp_api.py +0 -0
  29. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/src/hdx/location/wfp_exchangerates.py +0 -0
  30. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/secondary_historic_rates.csv +0 -0
  31. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/secondary_rates.json +0 -0
  32. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_List_1.json +0 -0
  33. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_List_2.json +0 -0
  34. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_1.json +0 -0
  35. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_10.json +0 -0
  36. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_2.json +0 -0
  37. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_3.json +0 -0
  38. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_4.json +0 -0
  39. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_5.json +0 -0
  40. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_6.json +0 -0
  41. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_7.json +0 -0
  42. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_8.json +0 -0
  43. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_9.json +0 -0
  44. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/hdx/location/Countries_UZB_Deleted.csv +0 -0
  45. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/hdx/location/__init__.py +0 -0
  46. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/hdx/location/conftest.py +0 -0
  47. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/hdx/location/test_country.py +0 -0
  48. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/hdx/location/test_currency.py +0 -0
  49. {hdx_python_country-4.1.0 → hdx_python_country-4.1.1}/tests/hdx/location/test_wfp_exchangerates.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hdx-python-country
3
- Version: 4.1.0
3
+ Version: 4.1.1
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
@@ -25,8 +25,7 @@ Classifier: Programming Language :: Python :: 3.13
25
25
  Classifier: Programming Language :: Python :: 3.14
26
26
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
27
  Requires-Python: >=3.10
28
- Requires-Dist: hdx-python-utilities>=4.0.4
29
- Requires-Dist: libhxl>=5.2.2
28
+ Requires-Dist: hdx-python-utilities<5,>=4.0.4
30
29
  Requires-Dist: tenacity
31
30
  Provides-Extra: docs
32
31
  Requires-Dist: mkapi; extra == 'docs'
@@ -42,6 +42,10 @@ The code for the library is [here](https://github.com/OCHA-DAP/hdx-python-countr
42
42
  The library has detailed API documentation which can be found in the menu at the top.
43
43
 
44
44
  ## Breaking Changes
45
+ From 4.1.1, HXL hashtags no longer used in AdminLevel class. The header names are used
46
+ instead. setup_from_iterable replaces setup_from_admin_info and
47
+ setup_from_libhxl_dataset using keys: "Location", "P-Code", "Name" and "Parent P-Code".
48
+
45
49
  From 4.1.0, HXL hashtags no longer used in Country class. The header names are used
46
50
  instead.
47
51
 
@@ -154,23 +158,21 @@ A Retrieve object can be passed in the *retriever* parameter that enables
154
158
  saving data downloaded to a file or loading previously saved data depending
155
159
  on how the Retrieve object is configured.
156
160
 
157
- Once an AdminLevel object is constructed, one of three setup methods must be
158
- called: *setup_from_admin_info*, *setup_from_libhxl_dataset* or
159
- *setup_from_url*.
161
+ Once an AdminLevel object is constructed, either *setup_from_iterable* or
162
+ *setup_from_url* must be called.
163
+
164
+ Method *setup_from_iterable* takes an iterable (eg. iterator or sequence) of the form:
160
165
 
161
- Method *setup_from_admin_info* takes key *admin_info* which is a list with
162
- values of the form:
166
+ {"Location": "AFG", "P-Code": "AF01", "Name": "Kabul"}
167
+ {"Location": "AFG", "P-Code": "AF0101", "Name": "Kabul", "Parent P-Code": "AF01"}
163
168
 
164
- {"iso3": "AFG", "pcode": "AF01", "name": "Kabul"}
165
- {"iso3": "AFG", "pcode": "AF0101", "name": "Kabul", "parent": "AF01"}
166
169
 
167
170
  Dictionaries *pcode_to_name* and *pcode_to_iso3* are populated in the
168
- AdminLevel object. *parent* is optional, but if provided enables lookup of
171
+ AdminLevel object. *Parent P-Code* is optional, but if provided enables lookup of
169
172
  location names by both country and parent rather than just country which should
170
173
  help with any name clashes. It also results in the population of a dictionary
171
174
  in the AdminLevel object *pcode_to_parent*.
172
175
 
173
- Method *setup_from_libhxl_dataset* takes a libhxl Dataset object, while
174
176
  *setup_from_url* takes a URL which defaults to a resource in the global p-codes
175
177
  dataset on HDX.
176
178
 
@@ -36,8 +36,7 @@ dynamic = ["version"]
36
36
  requires-python = ">=3.10"
37
37
 
38
38
  dependencies = [
39
- "hdx-python-utilities>=4.0.4",
40
- "libhxl>=5.2.2",
39
+ "hdx-python-utilities>=4.0.4,<5",
41
40
  "tenacity",
42
41
  ]
43
42
 
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '4.1.0'
32
- __version_tuple__ = version_tuple = (4, 1, 0)
31
+ __version__ = version = '4.1.1'
32
+ __version_tuple__ = version_tuple = (4, 1, 1)
33
33
 
34
34
  __commit_id__ = commit_id = None