Skip to content

Commit

Permalink
avoid codes.wmo.int issue by adding _view=with_metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Jun 27, 2024
1 parent 0643399 commit cacad85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions wis2box-management/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ RUN apt-get update -y && apt-get install -y ${DEBIAN_PACKAGES} \
&& rm -rf /var/lib/apt/lists/* \
# cache WMDR codelists
&& mkdir -p /home/wis2box/wmdr-codelists \
&& curl -s "https://codes.wmo.int/wmdr/FacilityType?_format=csv&status=valid" > /home/wis2box/wmdr-codelists/FacilityType.csv \
&& curl -s "https://codes.wmo.int/wmdr/InstrumentOperatingStatus?_format=csv&status=valid" > /home/wis2box/wmdr-codelists/InstrumentOperatingStatus.csv \
&& curl -s "https://codes.wmo.int/wmdr/TerritoryName?_format=csv&status=valid" > /home/wis2box/wmdr-codelists/TerritoryName.csv \
&& curl -s "https://codes.wmo.int/wmdr/WMORegion?_format=csv&status=valid" > /home/wis2box/wmdr-codelists/WMORegion.csv
&& curl -s "https://codes.wmo.int/wmdr/FacilityType?_format=csv&_view=with_metadata&status=valid" > /home/wis2box/wmdr-codelists/FacilityType.csv \
&& curl -s "https://codes.wmo.int/wmdr/InstrumentOperatingStatus?_format=csv&_view=with_metadata&status=valid" > /home/wis2box/wmdr-codelists/InstrumentOperatingStatus.csv \
&& curl -s "https://codes.wmo.int/wmdr/TerritoryName?_format=csv&_view=with_metadata&status=valid" > /home/wis2box/wmdr-codelists/TerritoryName.csv \
&& curl -s "https://codes.wmo.int/wmdr/WMORegion?_format=csv&_view=with_metadata&status=valid" > /home/wis2box/wmdr-codelists/WMORegion.csv


# copy the app
Expand Down
2 changes: 1 addition & 1 deletion wis2box-management/wis2box/metadata/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def get_wmdr_codelists() -> dict:
reader = csv.reader(fh)
next(reader)
for row in reader:
codelists[key].append(row[4])
codelists[key].append(row[1])

return codelists

Expand Down

0 comments on commit cacad85

Please sign in to comment.