Skip to content

Check that zenodo metadata are valid when init a Record

Bug description and behavior

At the moment there are almost no check on the metadata schema passed to init a Record

Steps to reproduce

Only a dict with metadata and id keys must be passed:

Record(dict('metadata':{}, 'id': 1))

is ok

Expected behavior?

Record(dict('metadata':{}, 'id': 1))

should raise a ValueError

Possible fixes

  • Check that the dict passed follows Zenodo metadata schema by loading the schema/.zenodo.json
  • Check values too?