Skip to content

Commit

Permalink
rename and adjust numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Nov 18, 2024
1 parent 0b60835 commit f6e1046
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/tests-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ jobs:
curl -s http://localhost/data/metadata/$DISCOVERY_METADATA_ID.json --output /tmp/$DISCOVERY_METADATA_ID
pywcmp ets validate /tmp/$DISCOVERY_METADATA_ID
python3 wis2box-ctl.py execute wis2box data ingest -mdi $DISCOVERY_METADATA_ID -p $TEST_DATA
- name: add example-test daycli
- name: add int-daycli-test daycli
env:
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-climate-observations:daily
STATION_METADATA: /data/wis2box/metadata/station/example-daycli-test.csv
TEST_DATA: /data/wis2box/observations/example-daycli-test
TOPIC_HIERARCHY: origin/a/wis2/int-daycli-test/data/core/climate/surface-based-observations/daily
DISCOVERY_METADATA: /data/wis2box/metadata/discovery/int-daycli-test-daycli.yml
DISCOVERY_METADATA_ID: urn:wmo:md:int-daycli-test:surface-climate-observations:daily
STATION_METADATA: /data/wis2box/metadata/station/example-int-daycli-test.csv
TEST_DATA: /data/wis2box/observations/example-int-daycli-test
run: |
python3 wis2box-ctl.py execute wis2box dataset publish $DISCOVERY_METADATA
python3 wis2box-ctl.py execute wis2box metadata station publish-collection --path $STATION_METADATA --topic-hierarchy $TOPIC_HIERARCHY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
wis2box:
retention: P30D
topic_hierarchy: example-test/data/core/climate/surface-based-observations/daily
topic_hierarchy: int-daycli-test/data/core/climate/surface-based-observations/daily
country: int
centre_id: example-test
centre_id: int-daycli-test
data_mappings:
plugins:
csv:
Expand All @@ -18,7 +18,7 @@ mcf:
version: 1.0

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

identification:
Expand Down
12 changes: 6 additions & 6 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/climate/surface-based-observations/daycli': 30 # noqa
'int-daycli-test/data/core/climate/surface-based-observations/daily': 30 # noqa
}

topic_nfiles_dict_found = {}
Expand Down Expand Up @@ -119,15 +119,15 @@ def test_metadata_station_publish():

stations = r.json()

assert stations['numberReturned'] == 103
assert stations['numberMatched'] == 103
assert stations['numberReturned'] == 104
assert stations['numberMatched'] == 104


def test_metadata_discovery_publish():
"""Test discovery metadata publishing"""

r = SESSION.get(f'{API_URL}/collections/discovery-metadata/items').json()
assert r['numberMatched'] == 10
assert r['numberMatched'] == 11

r = SESSION.get(f'{API_URL}/collections/discovery-metadata/items/{ID}').json() # noqa

Expand Down Expand Up @@ -172,7 +172,7 @@ def test_metadata_discovery_publish():
'ro-rnimh-test',
'cg-met',
'int-wmo-test',
'example-test'
'int-daycli-test'
]

for centre_id in centre_ids:
Expand Down Expand Up @@ -307,7 +307,7 @@ def test_message_api():
'cg-met': 15,
'int-wmo': 13,
'cn-cma': 11,
'example-test': 30
'int-daycli-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 f6e1046

Please sign in to comment.