Skip to content

Commit

Permalink
update sample data to approved centre ids
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Aug 21, 2024
1 parent f7da8c0 commit 8e7429a
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 38 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/tests-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ jobs:
python3 wis2box-ctl.py execute wis2box data ingest -mdi $DISCOVERY_METADATA_ID -p $TEST_DATA_UPDATE
- name: add Italy synop data (bufr2bufr) 🇮🇹
env:
TOPIC_HIERARCHY: origin/a/wis2/it-roma_met_centre/data/core/weather/surface-based-observations/synop
TOPIC_HIERARCHY: origin/a/wis2/it-meteoam/data/core/weather/surface-based-observations/synop
TERRITORY: ITA
DISCOVERY_METADATA: /data/wis2box/metadata/discovery/it-surface-weather-observations.yml
DISCOVERY_METADATA_ID: urn:wmo:md:it-roma_met_centre:surface-weather-observations
DISCOVERY_METADATA_ID: urn:wmo:md:it-meteoam:surface-weather-observations
STATION_METADATA: /data/wis2box/metadata/station/italy.csv
TEST_DATA: /data/wis2box/observations/italy
run: |
Expand All @@ -85,10 +85,10 @@ jobs:
python3 wis2box-ctl.py execute wis2box data ingest -mdi $DISCOVERY_METADATA_ID -p $TEST_DATA
- name: add Algeria synop data (bufr2bufr) 🇩🇿
env:
TOPIC_HIERARCHY: origin/a/wis2/dz-alger_met_centre/data/core/weather/surface-based-observations/synop
TOPIC_HIERARCHY: origin/a/wis2/dz-meteoalgerie/data/core/weather/surface-based-observations/synop
TERRITORY: DZA
DISCOVERY_METADATA: /data/wis2box/metadata/discovery/dz-surface-weather-observations.yml
DISCOVERY_METADATA_ID: urn:wmo:md:dz-alger_met_centre:surface-weather-observations
DISCOVERY_METADATA_ID: urn:wmo:md:dz-meteoalgerie:surface-weather-observations
STATION_METADATA: /data/wis2box/metadata/station/algeria.csv
TEST_DATA: /data/wis2box/observations/algeria
run: |
Expand All @@ -113,10 +113,10 @@ jobs:
python3 wis2box-ctl.py execute wis2box data ingest -mdi $DISCOVERY_METADATA_ID -p $TEST_DATA
- name: add Congo synop data (synop2bufr) 🇨🇩
env:
TOPIC_HIERARCHY: origin/a/wis2/cd-brazza_met_centre/data/core/weather/surface-based-observations/synop
TOPIC_HIERARCHY: origin/a/wis2/cg-met/data/core/weather/surface-based-observations/synop
TERRITORY: COD
DISCOVERY_METADATA: /data/wis2box/metadata/discovery/cd-surface-weather-observations.yml
DISCOVERY_METADATA_ID: urn:wmo:md:cd-brazza_met_centre:surface-weather-observations
DISCOVERY_METADATA_ID: urn:wmo:md:cg-met:surface-weather-observations
STATION_METADATA: /data/wis2box/metadata/station/congo.csv
TEST_DATA: /data/wis2box/observations/congo
run: |
Expand Down
12 changes: 6 additions & 6 deletions docs/source/reference/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ Load initial stations:
.. code-block:: bash
wis2box metadata station publish-collection --path /data/wis2box/metadata/station/malawi.csv --topic-hierarchy mw-mw_met_centre.data.core.weather.surface-based-observations.synop
wis2box metadata station publish-collection --path /data/wis2box/metadata/station/italy.csv --topic-hierarchy it-roma_met_centre.data.core.weather.surface-based-observations.synop
wis2box metadata station publish-collection --path /data/wis2box/metadata/station/algeria.csv --topic-hierarchy dz-alger_met_centre.data.core.weather.surface-based-observations.synop
wis2box metadata station publish-collection --path /data/wis2box/metadata/station/italy.csv --topic-hierarchy it-meteoam.data.core.weather.surface-based-observations.synop
wis2box metadata station publish-collection --path /data/wis2box/metadata/station/algeria.csv --topic-hierarchy dz-meteoalgerie.data.core.weather.surface-based-observations.synop
wis2box metadata station publish-collection --path /data/wis2box/metadata/station/romania.csv --topic-hierarchy ro-rnimh.data.core.weather.surface-based-observations.synop
wis2box metadata station publish-collection --path /data/wis2box/metadata/station/congo.csv --topic-hierarchy cd-brazza_met_centre.data.core.weather.surface-based-observations.synop
wis2box metadata station publish-collection --path /data/wis2box/metadata/station/congo.csv --topic-hierarchy cg-met.data.core.weather.surface-based-observations.synop
wis2box metadata station publish-collection --path /data/wis2box/metadata/station/wmo-test-ship.csv --topic-hierarchy int-wmo-test.data.core.weather.surface-based-observations.ship
wis2box metadata station publish-collection --path /data/wis2box/metadata/station/wmo-test-buoy.csv --topic-hierarchy int-wmo-test.data.core.weather.surface-based-observations.buoy
wis2box metadata station publish-collection --path /data/wis2box/metadata/station/wmo-test-wind-profiler.csv --topic-hierarchy int-wmo-test.data.core.weather.surface-based-observations.wind_profiler
Expand All @@ -76,10 +76,10 @@ Ingest data using the data ingest command to push data to the ``wis2box-incoming
.. code-block:: bash
wis2box data ingest --topic-hierarchy mw-mw_met_centre.data.core.weather.surface-based-observations.synop --path $WIS2BOX_DATADIR/observations/malawi
wis2box data ingest --topic-hierarchy it-roma_met_centre.data.core.weather.surface-based-observations.synop --path $WIS2BOX_DATADIR/observations/italy
wis2box data ingest --topic-hierarchy dz-alger_met_centre.data.core.weather.surface-based-observations.synop --path $WIS2BOX_DATADIR/observations/algeria
wis2box data ingest --topic-hierarchy it-meteoam.data.core.weather.surface-based-observations.synop --path $WIS2BOX_DATADIR/observations/italy
wis2box data ingest --topic-hierarchy dz-meteoalgerie.data.core.weather.surface-based-observations.synop --path $WIS2BOX_DATADIR/observations/algeria
wis2box data ingest --topic-hierarchy ro-rnimh.data.core.weather.surface-based-observations.synop --path $WIS2BOX_DATADIR/observations/romania
wis2box data ingest --topic-hierarchy cd-brazza_met_centre.data.core.weather.surface-based-observations.synop --path $WIS2BOX_DATADIR/observations/congo
wis2box data ingest --topic-hierarchy cg-met.data.core.weather.surface-based-observations.synop --path $WIS2BOX_DATADIR/observations/congo
wis2box data ingest --topic-hierarchy int-wmo-test.data.core.weather.surface-based-observations.ship --path $WIS2BOX_DATADIR/observations/wmo/ship
wis2box data ingest --topic-hierarchy int-wmo-test.data.core.weather.surface-based-observations.buoy --path $WIS2BOX_DATADIR/observations/wmo/buoy
wis2box data ingest --topic-hierarchy int-wmo-test.data.core.weather.surface-based-observations.wind_profiler --path $WIS2BOX_DATADIR/observations/wmo/wind_profiler
Expand Down
2 changes: 1 addition & 1 deletion docs/source/reference/storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The below example copies a local file (``mydata.bin``) to the ``wis2box-incoming
from minio import Minio
filepath = '/home/wis2box-user/local-data/mydata.bin'
minio_path = '/it-roma_met_centre/data/core/weather/surface-based-observations/synop/'
minio_path = '/it-meteoam/data/core/weather/surface-based-observations/synop/'
endpoint = 'http://localhost:9000'
WIS2BOX_STORAGE_USERNAME = 'wis2box'
Expand Down
12 changes: 6 additions & 6 deletions docs/source/user/data-ingest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ Select 'browse' on the ``wis2box-incoming`` bucket and select 'Choose or create

For example, using a filepath matching the metadata identifier:

* Metadata identifier: ``urn:wmo:md:it-roma_met_centre:surface-weather-observations.synop``
* upload data in path containing: ``it-roma_met_centre:surface-weather-observations.synop``
* Metadata identifier: ``urn:wmo:md:it-meteoam:surface-weather-observations.synop``
* upload data in path containing: ``it-meteoam:surface-weather-observations.synop``

For example using a filepath matching the topic hierarchy:

* Topic Hierarchy: ``origin/a/wis2/cd-brazza_met_centre/data/core/weather/surface-based-observations/synop``
* upload data in the path containing: ``cd-brazza_met_centre/data/core/weather/surface-based-observations/synop``
* Topic Hierarchy: ``origin/a/wis2/cg-met/data/core/weather/surface-based-observations/synop``
* upload data in the path containing: ``cg-met/data/core/weather/surface-based-observations/synop``

The error message ``Path validation error: Could not match http://minio:9000/wis2box-incoming/... to dataset, ...`` indicates that a file was stored in a directory that could not be matched to a dataset.

Expand Down Expand Up @@ -138,7 +138,7 @@ See below a Python example to upload data using the MinIO package:
filepath = '/home/wis2box-user/local-data/mydata.bin'
# path should match the metadata or the topic in the data mappings
minio_path = 'urn:wmo:md:it-roma_met_centre:surface-weather-observations'
minio_path = 'urn:wmo:md:it-meteoam:surface-weather-observations'
endpoint = 'http://localhost:9000'
WIS2BOX_STORAGE_USERNAME = 'wis2box'
Expand Down Expand Up @@ -200,7 +200,7 @@ Then start the ``wis2box-ftp`` service with the following command:
When using the wis2box-ftp service to ingest data, please note that the topic is determined by the directory structure in which the data arrives.

For example, to correctly ingest data on the topic ``it-roma_met_centre.data.core.weather.surface-based-observations.synop`` you need to copy the data into the directory ``/it-roma_met_centre/data/core/weather/surface-based-observations/synop`` on the FTP server:
For example, to correctly ingest data on the topic ``it-meteoam.data.core.weather.surface-based-observations.synop`` you need to copy the data into the directory ``/it-meteoam/data/core/weather/surface-based-observations/synop`` on the FTP server:

.. image:: ../_static/winscp_wis2box-ftp_example.png
:width: 600
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
wis2box:
retention: P180D
topic_hierarchy: cd-brazza_met_centre/data/core/weather/surface-based-observations/synop
topic_hierarchy: cg-met/data/core/weather/surface-based-observations/synop
country: cog
centre_id: cd-brazza_met_centre
centre_id: cg-met
data_mappings:
plugins:
txt:
Expand All @@ -19,7 +19,7 @@ mcf:
version: 1.0

metadata:
identifier: urn:wmo:md:cd-brazza_met_centre:surface-weather-observations
identifier: urn:wmo:md:cg-met:surface-weather-observations
hierarchylevel: dataset

identification:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
wis2box:
retention: P30D
topic_hierarchy: dz-alger_met_centre/data/core/weather/surface-based-observations/synop
topic_hierarchy: dz-meteoalgerie/data/core/weather/surface-based-observations/synop
country: dza
centre_id: dz-alger_met_centre
centre_id: dz-meteoalgerie
data_mappings:
plugins:
bufr4:
Expand All @@ -20,7 +20,7 @@ mcf:
version: 1.0

metadata:
identifier: urn:wmo:md:dz-alger_met_centre:surface-weather-observations
identifier: urn:wmo:md:dz-meteoalgerie:surface-weather-observations
hierarchylevel: dataset

identification:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
wis2box:
retention: P30D
topic_hierarchy: it-roma_met_centre/data/core/weather/surface-based-observations/synop
topic_hierarchy: it-meteoam/data/core/weather/surface-based-observations/synop
country: ita
centre_id: it-roma_met_centre
centre_id: it-meteoam
data_mappings:
plugins:
bin:
Expand All @@ -17,7 +17,7 @@ mcf:
version: 1.0

metadata:
identifier: urn:wmo:md:it-roma_met_centre:surface-weather-observations
identifier: urn:wmo:md:it-meteoam:surface-weather-observations
hierarchylevel: dataset

identification:
Expand Down
20 changes: 10 additions & 10 deletions tests/integration/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ def test_wis2downloader():

topic_nfiles_dict = {
'origin/a/wis2/mw-mw_met_centre/data/core/weather/surface-based-observations/synop': 23, # noqa
'origin/a/wis2/dz-alger_met_centre/data/core/weather/surface-based-observations/synop': 28, # noqa
'origin/a/wis2/dz-meteoalgerie/data/core/weather/surface-based-observations/synop': 28, # noqa
'origin/a/wis2/cn-cma/data/core/weather/prediction/forecast/medium-range/probabilistic/global': 10, # noqa
'origin/a/wis2/ro-rnimh/data/core/weather/surface-based-observations/synop': 49, # noqa
'origin/a/wis2/cd-brazza_met_centre/data/core/weather/surface-based-observations/synop': 14, # noqa
'origin/a/wis2/cg-met/data/core/weather/surface-based-observations/synop': 14, # noqa
'origin/a/wis2/int-wmo-test/data/core/weather/surface-based-observations/buoy': 2, # noqa
'origin/a/wis2/int-wmo-test/data/core/weather/surface-based-observations/wind_profiler': 1, # noqa
'origin/a/wis2/int-wmo-test/data/core/weather/surface-based-observations/ship': 5, # noqa
'origin/a/wis2/it-roma_met_centre/data/core/weather/surface-based-observations/synop': 31 # noqa
'origin/a/wis2/it-meteoam/data/core/weather/surface-based-observations/synop': 31 # noqa
}

topic_nfiles_dict_found = {}
Expand Down Expand Up @@ -165,10 +165,10 @@ def test_metadata_discovery_publish():

centre_ids = [
'mw-mw_met_centre',
'it-roma_met_centre',
'dz-alger_met_centre',
'it-meteoam',
'dz-meteoalgerie',
'ro-rnimh',
'cd-brazza_met_centre',
'cg-met',
'int-wmo-test'
]

Expand Down Expand Up @@ -287,10 +287,10 @@ def test_message_api():
# test messages per test dataset
counts = {
'mw-mw_met_centre': 25,
'it-roma_met_centre': 33,
'dz-alger_met_centre': 29,
'it-meteoam': 33,
'dz-meteoalgerie': 29,
'ro-rnimh': 50,
'cd-brazza_met_centre': 15,
'cg-met': 15,
'int-wmo-test': 11,
'cn-cma': 11
}
Expand All @@ -306,7 +306,7 @@ def test_message_api():
assert r['numberMatched'] == sum(counts.values())

# we want to find a particular message with data ID
target_data_id = "cd-brazza_met_centre:surface-weather-observations/WIGOS_0-20000-0-64406_20230803T090000" # noqa
target_data_id = "cg-met:surface-weather-observations/WIGOS_0-20000-0-64406_20230803T090000" # noqa

msg = None
for feature in r['features']:
Expand Down

0 comments on commit 8e7429a

Please sign in to comment.