1
0
mirror of https://github.com/ilri/csv-metadata-quality.git synced 2024-11-25 07:10:17 +01:00

csv_metadata_quality/check.py: update region output

Add the country to the message about missing regions. This makes it
easier to see which country is triggering the missing region error,
and helps in case of debugging possible mistakes in the data coming
from the country_converter library.
This commit is contained in:
Alan Orth 2022-11-28 17:40:27 +03:00
parent 7097136b7e
commit 141b2e1da3
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -550,7 +550,7 @@ def countries_match_regions(row, exclude):
if un_region != "not found" and un_region not in regions: if un_region != "not found" and un_region not in regions:
print( print(
f"{Fore.YELLOW}Missing region ({un_region}): {Fore.RESET}{row[title_column_name]}" f"{Fore.YELLOW}Missing region ({country} → {un_region}): {Fore.RESET}{row[title_column_name]}"
) )
return return