relaton / relaton-nist

NistBib: retrieve NIST Standards for bibliographic use using the BibliographicItem model
https://www.metanorma.com
MIT License
2 stars 2 forks source link

Empty string for `relation.type` #84

Closed strogonoff closed 1 year ago

strogonoff commented 1 year ago

We’re getting an issue with empty relation.type in some items.

  1. YAML parser (presumably by design) interprets empty property value as None, which breaks deserializer that suddenly encounters an incompatible data type (in relaton-py bibdata deserializer, relation.type is not optional and expected to be a string).
  2. relation.type probably shouldn’t be empty because Relaton spec doesn’t seem to allow this.
andrew2net commented 1 year ago

@strogonoff there is relations' types mapping which doesn't have a newly added relation type. In such cases the relaton-nist logs warning Relation type {relation-type} not found. I've added the new "isPreprintOf" type mapping in v 1.14.1

andrew2net commented 1 year ago

fixed https://github.com/ietf-tools/relaton-data-nist/blob/245fca8ae8f7fc1eefb05c3ca356657a77cca698/data/NIST_SP_1273-DRAFT.yaml#L59

ronaldtse commented 1 year ago

@strogonoff there is relations' types mapping which doesn't have a newly added relation type. In such cases the relaton-nist logs warning Relation type {relation-type} not found. I've added the new "isPreprintOf" type mapping in v 1.14.1

@andrew2net can you confirm that isPreprintOf is documented on relaton.org? Thanks.

andrew2net commented 1 year ago

@ronaldtse we need to do a huge relaton.org update. And we don't have isPreprintOf in relaton grammar. We use reprintOf instead.

ronaldtse commented 1 year ago

@andrew2net for model enhancements please directly file into https://github.com/relaton/relaton-models/issues/ . Thanks.

ronaldtse commented 1 year ago

@andrew2net the other ticket has concluded with this: https://github.com/relaton/relaton-models/issues/48#issuecomment-1689818790

Please use DocumentRelationType.hasDraft and DocumentStatus.stage to represent a "preprint".

andrew2net commented 1 year ago

done https://github.com/relaton/relaton-data-nist/blob/a8be95eedebd80609096615ab5589ac951a68cc2/data/NIST_SP_1273-DRAFT.yaml#L58-L71

ronaldtse commented 1 year ago

Thank you @andrew2net !