Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Earth discipline structure #70

Merged
merged 20 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
paths:
- 'topic-hierarchy/**.csv'
pull_request:
branches:
- main

jobs:
main:
Expand All @@ -19,20 +22,17 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install requirements 📦
run: |
python3 -m pip install --upgrade pip
pip3 install https://github.com/wmo-im/pywcmp/archive/master.zip
pip3 install -U jsonschema
- name: Cache resources bundle 📦
run: pywcmp bundle sync
- name: Create resources bundle 📦
run: |
python3 scripts/generate-bundle.py
zip -j /tmp/wth-bundle.zip topic-hierarchy/*.csv
- uses: actions/checkout@v3
with:
ref: gh-pages
- name: update gh-pages branch and publish
run: |
run: |
mv /tmp/wth-bundle.zip .
git config --global user.email "[email protected]"
git config --global user.name "Tom Kralidis"
zip -j /tmp/all.json.zip ~/.pywcmp/wis2-topic-hierarchy/all.json
mv /tmp/all.json.zip .
ls -alh
git commit -m "generate bundle" all.json.zip
git push -f origin main
git commit -m "generate bundle" wth-bundle.zip
git push -f origin gh-pages
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.html
*.pdf
.DS_Store
topic-hierarchy/earth-system-discipline.csv
50 changes: 50 additions & 0 deletions scripts/generate-bundle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
###############################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
###############################################################################

import csv
import os

topics = []

for root, dirs, files in os.walk('topic-hierarchy/earth-system-discipline'):
for file_ in files:
if file_.endswith('.csv'):
root2 = root.replace('topic-hierarchy/earth-system-discipline', '')
if root2.startswith('/'):
root2 = root2.replace('/', '', 1)
filename = os.path.join(root, file_)
with open(filename) as fh2:
reader = csv.reader(fh2)
next(reader)
for row in reader:
topic_to_add = f'{root2}/{row[0]}'
if topic_to_add.startswith('/'):
topic_to_add = topic_to_add.lstrip('/')

topics.append(topic_to_add)

with open('topic-hierarchy/earth-system-discipline.csv', 'w') as fh:
fieldnames = ['Name']
writer = csv.DictWriter(fh, fieldnames=fieldnames)
writer.writeheader()

for topic in sorted(topics):
writer.writerow({'Name': topic})
1 change: 1 addition & 0 deletions standard/recommendations/core/PER_publishing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
|===
^|*Permission {counter:req-id}* |*/per/core/publishing*
^|A |Metadata MAY be published at any level at or below the notification type (``metadata``).
^|B |Experimental data MAY be published at the ``experimental`` level of a given domain, for domain topics which are not yet approved.
|===
6 changes: 6 additions & 0 deletions standard/recommendations/core/REC_publishing.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[rec_core_publishing]]
[width="90%",cols="2,6a"]
|===
^|*Recommendation {counter:req-id}* |*/rec/core/publishing*
^|A |The domain ``experimental`` level SHOULD be used as a temporary approach until a given domain topic is approved.
|===
5 changes: 3 additions & 2 deletions standard/requirements/core/REQ_management.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
^|*Requirement {counter:req-id}* |*/req/core/management*
^|A |Primary levels 1-8 SHALL be determined by the WMO Task Team on WIS Metadata.
^|B |Domain specific levels (level 8 and beyond) SHALL be determined by domain experts and user communities.
^|C |Domain specific levels (level 8 and beyond) SHALL be coordinated and integrated by the WMO Task Team on WIS Metadata.
^|D
^|C |Domain specific levels (level 8 and beyond) SHALL be defined using a hierarchical approach.
^|D |Domain specific levels (level 8 and beyond) SHALL be coordinated and integrated by the WMO Task Team on WIS Metadata.
^|E
a|Domain specific level updates SHALL be implemented using the following steps:

- domain specific teams submit proposals to TT-WISMD
Expand Down
7 changes: 4 additions & 3 deletions standard/sections/clause_7_normative_text.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ The WTH is managed by the WMO Task Team on WIS Metadata. Updates to the WTH are

The WIS Topic Hierarchy has been developed according to the classification of the Earth System domains in Annex 1 of Resolution 1 Cg-Ext(2021), and it is managed in two parts:

1. Primary topic levels (levels 1-7): topic structure applies to all data and services in WIS
2. Domain specific topic subcategory levels (level 8 and beyond): topic structure proposed by domain experts and user communities. Note that the number of levels in this part may vary according to the requirements of various domains.
1. Primary topic levels (levels 1-7): topic structure applies to all data and services in WIS. They are relational, meaning that any combination of each level can be used to construct a topic applicable to a data or metadata notification
2. Domain specific topic subcategory levels (level 8 and beyond): topic structures proposed by domain experts and user communities. Note that the number of levels in this part may vary according to the requirements of various domains, and are meant to represent a hierarchical representation of data publication from a given domain.

include::../requirements/core/REQ_management.adoc[]

Expand All @@ -45,7 +45,8 @@ include::../recommendations/core/PER_centre-id.adoc[]

==== Publishing guidelines

For maximum utility and efficient management of topics, data, metadata, and reports need to be published to a minimum level. This helps with avoiding "pollution" of messages in higher level topics which are used to delineate core concepts (centre identification, notification types, data policy, etc.).
For maximum utility and efficient management of topics, data, metadata, and reports need to be published to a minimum level. This helps with avoiding "pollution" of messages in higher level topics which are used to delineate core concepts (centre identification, notification types, data policy, etc.). Note that each domain is designated a topic named ``experimental`` for publication to provisional topics.

include::../requirements/core/REQ_publishing.adoc[]
include::../recommendations/core/REC_publishing.adoc[]
include::../recommendations/core/PER_publishing.adoc[]
1 change: 0 additions & 1 deletion topic-hierarchy.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ Level,Name,Description
5,notification-type,"WIS2 notification types (data, metadata, reports [from monitoring activities])"
6,data-policy,Data policy as defined by the WMO Unified Data Policy. core data are available from the Global Caches with open access on a free and unrestricted basis. Notifications for core and recommended data are available by subscription to Global Brokers. recommended data are downloaded from the original NC/DCPC and may require authentication/authorisation
7,earth-system-discipline,As per Annex 1 of resolution 1 Cg-Ext-2021
8,earth-system-discipline-subcategory,As proposed by domain experts and further approved by INFCOM
5 changes: 0 additions & 5 deletions topic-hierarchy/atmospheric-composition.csv

This file was deleted.

14 changes: 7 additions & 7 deletions topic-hierarchy/centre-id.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name,Description,Child
ca-eccc-msc,"Environment and Climate Change Canada, Meteorological Service of Canada",notification-type
cu-insmet,Institute of Meteorology of Cuba,notification-type
de-dwd,Deutscher Wetterdienst,notification-type
fr-meteo-france,Météo-France,notification-type
int-ecmwf,European Centre for Medium-Range Weather Forecasts,notification-type
org-woudc,World Ozone and Ultraviolet Radiation Data Centre,notification-type
Name,Description
ca-eccc-msc,"iEnvironment and Climate Change Canada, Meteorological Service of Canada"
cu-insmet,Institute of Meteorology of Cuba
de-dwd,Deutscher Wetterdienst
fr-meteo-france,Météo-France
int-ecmwf,European Centre for Medium-Range Weather Forecasts
org-woudc,World Ozone and Ultraviolet Radiation Data Centre
6 changes: 3 additions & 3 deletions topic-hierarchy/channel.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Name,Description,Child
origin,data downloaded from original NC/DCPC,version
cache,data downloaded from a Global Cache,version
Name,Description
origin,data downloaded from original NC/DCPC
cache,data downloaded from a Global Cache
3 changes: 0 additions & 3 deletions topic-hierarchy/climate.csv

This file was deleted.

6 changes: 0 additions & 6 deletions topic-hierarchy/cryosphere.csv

This file was deleted.

6 changes: 3 additions & 3 deletions topic-hierarchy/data-policy.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Name,Description,Child
core,Core,earth-system-discipline
recommended,Recommended,earth-system-discipline
Name,Description
core,Core
recommended,Recommended
8 changes: 0 additions & 8 deletions topic-hierarchy/earth-system-discipline.csv

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Name,Description
experimental,Experimental topics
2 changes: 2 additions & 0 deletions topic-hierarchy/earth-system-discipline/climate/index.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Name,Description
experimental,Experimental topics
2 changes: 2 additions & 0 deletions topic-hierarchy/earth-system-discipline/cryosphere/index.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Name,Description
experimental,Experimental topics
2 changes: 2 additions & 0 deletions topic-hierarchy/earth-system-discipline/hydrology/index.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Name,Description
experimental,Experimental topics
8 changes: 8 additions & 0 deletions topic-hierarchy/earth-system-discipline/index.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Name,Description
weather,Weather
climate,Climate
hydrology,Hydrology
atmospheric-composition,Atmospheric Composition
cryosphere,Cryosphere
ocean,Ocean
space-weather,Space Weather
2 changes: 2 additions & 0 deletions topic-hierarchy/earth-system-discipline/ocean/index.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Name,Description
experimental,Experimental topics
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Name,Description
experimental,Experimental topics
3 changes: 3 additions & 0 deletions topic-hierarchy/earth-system-discipline/weather/index.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Name,Description
surface-based-observations,Surface based observations
experimental,Experimental topics
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Name,Description
synop,Surface observations
temp,Upper air observations
5 changes: 0 additions & 5 deletions topic-hierarchy/hydrology.csv

This file was deleted.

6 changes: 3 additions & 3 deletions topic-hierarchy/notification-type.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Name,Description,Child
data,Data,data-policy
metadata,Metadata,data-policy
Name,Description
data,Data
metadata,Metadata
6 changes: 0 additions & 6 deletions topic-hierarchy/ocean.csv

This file was deleted.

4 changes: 2 additions & 2 deletions topic-hierarchy/system.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Name,Description,Child
wis2,WIS2 topic hierarchy,centre-id
Name,Description
wis2,WIS2 topic hierarchy
4 changes: 2 additions & 2 deletions topic-hierarchy/version.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Name,Description,Child
a,version a,system
Name,Description
a,version a

This file was deleted.

6 changes: 0 additions & 6 deletions topic-hierarchy/weather.csv

This file was deleted.