metno / mmd

GNU General Public License v3.0
2 stars 11 forks source link

Align traverse_thredds/nc_to_mmd with mmd.xsd #191

Open ferrighi opened 2 years ago

ferrighi commented 2 years ago

Information extracted from thredds about for example related_information (https://github.com/metno/mmd/blob/master/bin/traverse_thredds#L158) are put in a sequence that do not match the xsd (https://github.com/metno/mmd/blob/master/xsd/mmd.xsd#L396) requirements. For mmd the sequence is:

  1. type
  2. description
  3. resource

for traverse_thredds:

  1. resource
  2. type
  3. description

I am not sure there is a reason for the sequence, but we should either change the schema in xsd:all instead of xsd:sequence or change the extraction script, so to allow for an easy validation process.

This issue is valid also for data_access.

For the nc_to_mmd.py a similar issue is present with short/long name for data_center (https://github.com/metno/mmd/blob/master/mmd_utils/nc_to_mmd.py#L292) and projects.

If I get some confirmation about this or potential consequences, I can update the scripts or modify the schema.

mortenwh commented 2 years ago

Could you modify the script, and not the schema? I'm afraid changing the schema could harm other systems..

On Wed, Apr 27, 2022 at 4:09 PM Lara Ferrighi @.***> wrote:

Information extracted from thredds about for example related_information ( https://github.com/metno/mmd/blob/master/bin/traverse_thredds#L158) are put in a sequence that do not match the xsd ( https://github.com/metno/mmd/blob/master/xsd/mmd.xsd#L396) requirements. For mmd the sequence is:

  1. type
  2. description
  3. resource

for traverse_thredds:

  1. resource
  2. type
  3. description

I am not sure there is a reason for the sequence, but we should either change the schema in xsd:all instead of xsd:sequence or change the extraction script, so to allow for an easy validation process.

This issue is valid also for data_access.

For the nc_to_mmd.py a similar issue is present with short/long name for data_center ( https://github.com/metno/mmd/blob/master/mmd_utils/nc_to_mmd.py#L292) and projects.

If I get some confirmation about this or potential consequences, I can update the scripts or modify the schema.

— Reply to this email directly, view it on GitHub https://github.com/metno/mmd/issues/191, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2UBP2LSHSBK3YOAVWXCTVHFDBVANCNFSM5UPIQPAQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Morten Wergeland Hansen, PhD Meteorologisk Institutt / Norwegian Meteorological Institute T.: (+47) 915 47 844

steingod commented 2 years ago

I am not using the scripts under mmd anymore, but versions located in mdharvest (since it is related to the harvesting processes that are run). I will evaluate this request in relation to that version.

ferrighi commented 1 year ago

Revitalizing this a bit. The order of elements does not have a real value for us, as the elements can be in any order as long as they have the right occurrence and they follow the vocabulary list. I suggest we revise the xsd schema and this is because it makes a constraints with has no foundation. Not enforcing the sequence should not harm any systems from my point of view, as the new schema will just be less stringent. If you still follow a sequence, the records will still validate.