ietf-tools / bibxml-service

Django-based Web service implementing IETF BibXML APIs
https://bib.ietf.org
BSD 3-Clause "New" or "Revised" License
17 stars 19 forks source link

Source data validation issues #283

Open strogonoff opened 1 year ago

strogonoff commented 1 year ago

Describe the issue

Stefano outlined discrepancies between data sources and relaton-py expectations here.

The discrepancies arise because (1) previously invalid YAML was updated to match Relaton RNC/LutaML data specification (where relaton-py has come to rely on YAML to be invalid), or (2) data specification updated, YAML updated accordingly, but relaton-py was not updated.

These discrepancies lead to issues like: #277, #250, #281.

Fronts on which they could be attacked:

Code of Conduct

strogonoff commented 1 year ago

As of now, the discrepancies are:

contributor -> 0 -> organization -> abbreviation
  str type expected (type=type_error.str) # fixed
contributor -> 0 -> organization -> abbreviation
  str type expected (type=type_error.str) # fixed
keyword
  str type expected (type=type_error.str) # fixed
keyword -> 0
  str type expected (type=type_error.str) # fixed
copyright -> 0 -> owner -> 0 -> name -> 0
  str type expected (type=type_error.str)
copyright -> 0 -> owner -> 0 -> name
  str type expected (type=type_error.str)
copyright -> 0 -> owner -> 0 -> abbreviation
  str type expected (type=type_error.str) # fixed
copyright -> from
  field required (type=value_error.missing)
copyright -> owner
  value is not a valid list (type=type_error.list)
contributor -> 0 -> person -> name -> given -> forename -> 0
  Forename.__init__() missing 1 required positional argument: 'content' (type=type_error)
contributor -> 0 -> person -> name -> given -> forename -> content
  str type expected (type=type_error.str)
contributor -> 0 -> person -> name -> given -> forename -> 0
  Forename.__init__() missing 1 required positional argument: 'content' (type=type_error)
contributor -> 0 -> person -> name -> given -> forename -> content
  str type expected (type=type_error.str)
contributor -> 8 -> organization -> abbreviation
  str type expected (type=type_error.str)
contributor -> 0 -> person -> name -> given -> forename -> 0
  Forename.__init__() missing 1 required positional argument: 'content' (type=type_error)
contributor -> 0 -> person -> name -> given -> forename -> content
  str type expected (type=type_error.str)
alicerusso commented 1 year ago

adding some IEEE examples of this issue in practice. (presumably this is #283, although I don't see "Could not export" mentioned above.) Got the following errors upon click of "bibxml" on:

Could not export this item, the error was: Source data for item IEEE 1003.1-2017 (IEEE) didn’t validate (err: 7 validation errors for BibliographicItem copyright -> 0 -> owner -> 0 -> name -> 0 str type expected (type=type_error.str) copyright -> 0 -> owner -> 0 -> name str type expected (type=type_error.str) copyright -> 0 -> owner -> 0 -> abbreviation str type expected (type=type_error.str) copyright -> 0 -> owner -> 1 -> name -> 0 str type expected (type=type_error.str) copyright -> 0 -> owner -> 1 -> name str type expected (type=type_error.str) copyright -> from value is not a valid integer (type=type_error.integer) copyright -> owner field required (type=value_error.missing))

the last one:

Could not export this item, the error was: Source data for item IEEE 802.1Q-2014 (IEEE) didn’t validate (err: 5 validation errors for BibliographicItem copyright -> 0 -> owner -> 0 -> name -> 0 str type expected (type=type_error.str) copyright -> 0 -> owner -> 0 -> name str type expected (type=type_error.str) copyright -> 0 -> owner -> 0 -> abbreviation str type expected (type=type_error.str) copyright -> from value is not a valid integer (type=type_error.integer) copyright -> owner field required (type=value_error.missing))

ronaldtse commented 1 year ago

The issues reported by @strogonoff have been moved here:

@alicerusso we will investigate the IEEE examples in:

ajeanmahoney commented 1 year ago

Hi, @ronaldtse, is there an update for this issue? I see that the dependencies https://github.com/relaton/relaton/issues/108 and https://github.com/relaton/relaton-ieee/issues/32 are closed, and the reported discrepancies (https://github.com/ietf-tools/bibxml-service/issues/277, https://github.com/ietf-tools/bibxml-service/issues/250, https://github.com/ietf-tools/bibxml-service/issues/281.) are also closed. Thanks!

rjsparks commented 1 year ago

@ronaldtse is there anything left to do here?