Skip to content

Commit b0e8b29

Browse files
author
Mike
committed
get_location_iso3s returns uppercase
1 parent 767f62c commit b0e8b29

5 files changed

Lines changed: 10 additions & 8 deletions

File tree

doc/main.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ The library has detailed API documentation which can be found in the menu at the
4848

4949

5050
## Breaking Changes
51+
From 5.9.9, get_location_iso3s returns uppercase codes instead of lowercase
52+
5153
From 5.9.8, get_date_of_dataset has become get_reference_period,
5254
set_date_of_dataset has become set_reference_period and set_dataset_year_range
5355
has become set_reference_period_year_range

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ckanapi==4.7
22
defopt==6.4.0
33
email_validator==1.3.1
44
hdx-python-country==3.4.6
5-
makefun==1.15.0
5+
makefun==1.15.1
66
ndg-httpsclient==0.5.1
77
pyasn1==0.4.8
88
pyOpenSSL==23.0.0

src/hdx/data/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ def get_location_iso3s(
14701470
configuration=self.configuration,
14711471
)
14721472
if countryiso:
1473-
countryisos.append(countryiso.lower())
1473+
countryisos.append(countryiso)
14741474
return countryisos
14751475

14761476
def get_location_names(

test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pytest==7.2.1
22
pytest-cov==4.0.0
3-
tox==4.4.5
3+
tox==4.4.6
44
-r requirements.txt

tests/hdx/data/test_dataset_noncore.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,11 @@ def test_get_add_location(self, locations):
284284
"Mozambique",
285285
]
286286
assert dataset.get_location_iso3s() == [
287-
"dza",
288-
"zwe",
289-
"sdn",
290-
"ken",
291-
"moz",
287+
"DZA",
288+
"ZWE",
289+
"SDN",
290+
"KEN",
291+
"MOZ",
292292
]
293293
dataset.remove_location("sdn")
294294
assert dataset.get_location_names() == [

0 commit comments

Comments
 (0)