Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDXDSYS-1783 Investigate HAPI Pipelines failure #226

Merged
merged 3 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ requires-python = ">=3.8"

dependencies = [
"hapi-schema>= 0.9.8",
"hdx-python-api>= 6.3.7",
"hdx-python-api>= 6.3.8",
"hdx-python-country>= 3.8.8",
"hdx-python-database[postgresql]>= 1.3.5",
"hdx-python-scraper>= 2.5.8",
"hdx-python-scraper>= 2.6.2",
"hdx-python-utilities>= 3.8.3",
"libhxl",
"sqlalchemy"
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ gspread==6.1.4
# via hdx-python-scraper
hapi-schema==0.9.8
# via hapi-pipelines (pyproject.toml)
hdx-python-api==6.3.7
hdx-python-api==6.3.8
# via
# hapi-pipelines (pyproject.toml)
# hdx-python-scraper
Expand All @@ -67,15 +67,15 @@ hdx-python-country==3.8.8
# hdx-python-scraper
hdx-python-database==1.3.5
# via hapi-pipelines (pyproject.toml)
hdx-python-scraper==2.5.9
hdx-python-scraper==2.6.2
# via hapi-pipelines (pyproject.toml)
hdx-python-utilities==3.8.3
# via
# hapi-pipelines (pyproject.toml)
# hdx-python-api
# hdx-python-country
# hdx-python-scraper
humanize==4.11.0
humanize==4.12.0
# via frictionless
identify==2.6.7
# via pre-commit
Expand Down Expand Up @@ -234,7 +234,7 @@ shellingham==1.5.4
# via typer
simpleeval==1.0.3
# via frictionless
simplejson==3.19.3
simplejson==3.20.1
# via ckanapi
six==1.17.0
# via
Expand All @@ -261,7 +261,7 @@ tenacity==9.0.0
# via hdx-python-country
text-unidecode==1.3
# via python-slugify
typeguard==4.4.1
typeguard==4.4.2
# via inflect
typer==0.15.1
# via frictionless
Expand Down
8 changes: 4 additions & 4 deletions src/hapi/pipelines/configs/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ admin1:
"SOM|Juba Hoose": "SO28"
"SOM|Shabelle Dhexe": "SO21"
"SOM|Shabelle Hoose": "SO23"
"TCD|Mayo Kebbi Ouest": "TD12"
"TCD|Mayo Kebbi Ouest": "TCD12"
"UKR|Avtonomna Respublika Krym": "UA01"
"UKR|Kyivska": "UA80"
"YEM|Amanat Al Asimah": "YE13"
Expand Down Expand Up @@ -156,9 +156,9 @@ admin2:
"SD12|Al Gedaref Rural": "SD12080"
"SD15|Wad Madani El Kobra": "SD15030"
"SD18|El Salam": "SD18086"
"TD11|La kabbia": "TD1102"
"TD17|Iriba": "TD1703"
"TD22|Tibest-Ouest": "TD2202"
"TCD11|La kabbia": "TCD1102"
"TCD17|Iriba": "TCD1703"
"TCD22|Tibest-Ouest": "TCD2202"
"TG05|Kpendial- Ouest": "TG0513"
"TZ12|Mbozi": "TZ2606" # TODO: this unit is not getting picked up because of the mismatched admin1
"UA12|Apostolivskyi": "UA1206"
Expand Down
142 changes: 70 additions & 72 deletions tests/fixtures/input/download-global-pcode-lengths.csv
Original file line number Diff line number Diff line change
@@ -1,160 +1,158 @@
Location,Country Length,Admin 1 Length,Admin 2 Length,Admin 3 Length,Admin 4 Length,Admin 5 Length
Location,Country Length,Admin 1 Length,Admin 2 Length,Admin 3 Length,Admin 4 Length,Admin 5 Length
#country+code,#country+len,#adm1+len,#adm2+len,#adm3+len,#adm4+len,#adm5+len
AFG,2,2,2,,,
AGO,2,2,3,3,,
ALB,2,2,2,2,,
ARE,2,2,,,,
DZA,2,3,3,,,
AGO,2,2,3,3,,
ARG,2,3,3,,,
ARM,2,2,1,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