From ac1236eecb3be3a1bbe09ceef787a0aa987cded4 Mon Sep 17 00:00:00 2001 From: Maaike Date: Mon, 18 Dec 2023 10:39:44 +0100 Subject: [PATCH 1/2] remove > dev/null (#602) --- wis2box-ctl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wis2box-ctl.py b/wis2box-ctl.py index 75f9bee51..bc239ca31 100755 --- a/wis2box-ctl.py +++ b/wis2box-ctl.py @@ -166,7 +166,7 @@ def make(args) -> None: print("ERROR: wis2box.env file does not exist. Please create one manually or by running `python3 wis2box-create-config.py`") exit(1) run(args, split( - 'docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions > /dev/null 2>&1')) + 'docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions')) run(args, split( 'docker plugin enable loki')) if containers: From 190ad7d6f4d0761b22ffc557ebc09452036ed4bf Mon Sep 17 00:00:00 2001 From: Maaike Date: Mon, 18 Dec 2023 10:42:49 +0100 Subject: [PATCH 2/2] minor-doc-update-1.0b6 (#603) * minor-doc-update-1.0b6 * update for add-topic --- docs/source/user/setup.rst | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/docs/source/user/setup.rst b/docs/source/user/setup.rst index d8c35e7f1..e25b06237 100644 --- a/docs/source/user/setup.rst +++ b/docs/source/user/setup.rst @@ -62,8 +62,10 @@ The discovery metadata is provided in the form of a YAML file. If you used the ``python3 wis2box-create-config.py`` command to initialize your wis2box, you will find two initial the discovery metadata files in the directory you specified for your configuration files, under the ``metadata/discovery/`` directory: -* ``metadata-synop.yml``: contains the discovery metadata for the ``synop`` dataset -* ``metadata-temp.yml``: contains the discovery metadata for the ``temp`` dataset +* ``metadata-synop-centreid.yml``: contains the discovery metadata for the ``synop`` dataset +* ``metadata-temp-centreid.yml``: contains the discovery metadata for the ``temp`` dataset + +Where ``centreid`` is the centre-id you specified during the configuration step. Please review the content of these files and edit them as needed. @@ -152,11 +154,11 @@ Login to the wis2box-management container The first step is to add your collection to the wis2box API, using the discovery metadata file you created above. -For example to add the data collection defined in ``metadata/discovery/metadata-synop.yml`` in the directory you specified for your configuration files: +For example to add the data collection defined in ``metadata/discovery/metadata-synop-centreid.yml`` in the directory you specified for your configuration files: .. code-block:: bash - wis2box data add-collection /data/wis2box/metadata/discovery/metadata-synop.yml + wis2box data add-collection /data/wis2box/metadata/discovery/metadata-synop-centreid.yml .. note:: If you see an error like ``ValueError: No plugins for XXX defined in data mappings``, exit the wis2box-management container and edit the ``data-mappings.yml`` file @@ -174,7 +176,7 @@ The second step is to publish discovery metadata and cache its content in the wi .. code-block:: bash - wis2box metadata discovery publish /data/wis2box/metadata/discovery/metadata-synop.yml + wis2box metadata discovery publish /data/wis2box/metadata/discovery/metadata-synop-centreid.yml This command publishes an MQTT message with information about your dataset to the WIS2 Global Discovery Catalogue. Repeat this command whenever you have to provide updated metadata about your dataset. @@ -223,6 +225,9 @@ The wis2box-webapp can be accessed by visiting the URL you specified during the Please note only data for stations that have been added to the wis2box will be ingested and result in WIS2 notifications being published. +Bulk inserting stations from CSV +-------------------------------- + You can also bulk insert a set of stations from a CSV file, by defining the stations in ``metadata/stations/station_list.csv`` in your wis2box host directory and running the following command: .. code-block:: bash @@ -249,6 +254,13 @@ If you want to add a topic to a single station, you can use the following comman python3 wis2box-ctl.py login wis2box metadata station add-topic --wsi +If you want to add a topic to all stations from a specific territory, for example Italy, you can use the following command: + +.. code-block:: bash + + python3 wis2box-ctl.py login + wis2box metadata station add-topic --territory-name Italy + The next is the :ref:`data-ingest`. .. _`wis2box Releases`: https://github.com/wmo-im/wis2box/releases