Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Nov 8, 2024
1 parent a0ecb74 commit 38c245c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ jobs:
python3 wis2box-ctl.py execute wis2box data ingest -mdi $DISCOVERY_METADATA_ID -p $TEST_DATA
- name: add example-test daycli
env:
TOPIC_HIERARCHY: origin/a/wis2/example-test/data/core/weather/surface-based-observations/daily
TOPIC_HIERARCHY: origin/a/wis2/example-test/data/core/climate/surface-based-observations/daily
DISCOVERY_METADATA: /data/wis2box/metadata/discovery/example-test-daycli.yml
DISCOVERY_METADATA_ID: urn:wmo:md:example-test:surface-weather-observations:daily
DISCOVERY_METADATA_ID: urn:wmo:md:example-test:surface-climate-observations:daily
STATION_METADATA: /data/wis2box/metadata/station/example-daycli-test.csv
TEST_DATA: /data/wis2box/observations/example-daycli-test
run: |
Expand Down
10 changes: 6 additions & 4 deletions tests/data/metadata/discovery/example-test-daycli.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
wis2box:
retention: P30D
topic_hierarchy: example-test/data/core/weather/surface-based-observations/daily
topic_hierarchy: example-test/data/core/climate/surface-based-observations/daily
country: int
centre_id: example-test
data_mappings:
Expand All @@ -18,7 +18,7 @@ mcf:
version: 1.0

metadata:
identifier: urn:wmo:md:example-test:surface-weather-observations:daily
identifier: urn:wmo:md:example-test:surface-climate-observations:daily
hierarchylevel: dataset

identification:
Expand All @@ -29,10 +29,12 @@ identification:
keywords:
default:
keywords:
- surface weather
- temperature
- observations
- snow depth
- precipitation
- climate
- daily
- daycli
wmo:
keywords:
- weather
Expand Down
8 changes: 5 additions & 3 deletions tests/integration/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_wis2downloader():
'origin/a/wis2/int-wmo-test/data/core/weather/surface-based-observations/ship': 5, # noqa
'origin/a/wis2/it-meteoam/data/core/weather/surface-based-observations/synop': 31, # noqa
'origin/a/wis2/int-wmo-test/data/core/weather/advisories-warnings': 1, # noqa
'origin/a/wis2/example-test/data/core/weather/surface-based-observations/daycli': 30 # noqa
'origin/a/wis2/example-test/data/core/climate/surface-based-observations/daycli': 30 # noqa
}

topic_nfiles_dict_found = {}
Expand Down Expand Up @@ -171,7 +171,8 @@ def test_metadata_discovery_publish():
'dz-meteoalgerie',
'ro-rnimh-test',
'cg-met',
'int-wmo-test'
'int-wmo-test',
'example-test'
]

for centre_id in centre_ids:
Expand Down Expand Up @@ -305,7 +306,8 @@ def test_message_api():
'ro-rnimh': 50,
'cg-met': 15,
'int-wmo': 13,
'cn-cma': 11
'cn-cma': 11,
'example-test': 30
}
for key, value in counts.items():
url = f'{API_URL}/collections/messages/items?sortby=-datetime&q={key}&limit=1' # noqa
Expand Down

0 comments on commit 38c245c

Please sign in to comment.