relaton / relaton-py

Python library for Relaton
MIT License
1 stars 1 forks source link

Mismatch between Relaton-data-* format and official RNG Schema #28

Closed stefanomunarini closed 2 years ago

stefanomunarini commented 2 years ago

Some of the data of the relaton-data-* datasets does not match the format of the official RNG Schema.

For example, this dataset includes the fields "city", "state" and "country" under "contact", while the official schema only allows them to be included under "contact" -> "address":

Current format (wrong):

- organization:
    name:
    - National Bureau of Standards
    abbreviation: NBS
    contact:
    - city: Gaithersburg
      state: MD
      country: US

Correct format should be:

- organization:
    name:
    - National Bureau of Standards
    abbreviation: NBS
    contact:
    - address:
       city: Gaithersburg
       state: MD
       country: US

Other datasets with the same issue are:

  1. https://github.com/ietf-tools/relaton-data-3gpp/blob/ccf5604c14c5c925b9c8cbd5bafa9fc0dd71f8f0/data/TR_00.01U_UMTS_3.0.0.yaml#L26
  2. https://github.com/ietf-tools/relaton-data-ieee/blob/dbf20d676030988d58149d6150f29539f4633e97/data/AIEE_11-1937.yaml#L36
ronaldtse commented 2 years ago

@andrew2net can you help clarify here? The RNG scheme here does describe an element called "address": https://github.com/relaton/relaton-models/blob/fee9ea8205756163a1d96de47f9b105dc701d8a0/grammars/biblio.rnc#L163-L177

ronaldtse commented 2 years ago

@andrew2net this issue is urgent, can you please help address this ASAP?

andrew2net commented 2 years ago

@ronaldtse address isn't an Array, it's a Hash. Shouldn't it be:

- address:
    city: Gaithersburg
    state: MD
    country: US
ronaldtse commented 2 years ago

@andrew2net yes you are right, it's a hash.

stefanomunarini commented 2 years ago

Ok, but this is not the issue @andrew2net .

The issue here is that the address field is missing, and the fields city, state and country are included as part of the contact field instead.

stefanomunarini commented 2 years ago

There is still an issue with the field street when processing this dataset. @andrew2net can you double check this please?

You can find the above mentioned issue here https://github.com/relaton/relaton-py/runs/7414346454?check_suite_focus=true

pydantic.error_wrappers.ValidationError: 1 validation error for BibliographicItem

contributor -> 0 -> organization -> contact -> 0

__init__() got an unexpected keyword argument 'street' (type=type_error)
andrew2net commented 2 years ago

@stefanomunarini the https://github.com/ietf-tools/relaton-data-3gpp dataset doesn't update files until the source dataset is updated. To force updating please remove the https://github.com/ietf-tools/relaton-data-3gpp/blob/main/current.yaml file. I don't have permission to do it.

ronaldtse commented 2 years ago

@andrew2net can you let me know which datasets need to be updated at ietf-tools? You could also create a PR for those datasets and then @kesara can merge them to achieve the same effect. Thanks.

ronaldtse commented 2 years ago

@andrew2net has created https://github.com/ietf-tools/relaton-data-3gpp/pull/13 to trigger the update.

ronaldtse commented 2 years ago

@stefanomunarini this is done, can you help close this? Thanks.