citation-file-format / cffconvert

Command line program to validate and convert CITATION.cff files.
Apache License 2.0
100 stars 28 forks source link

Consider updating test Contract to versioned #302

Closed jspaaks closed 1 year ago

jspaaks commented 1 year ago

e.g. CFF 1.2 can have a type which when converted to Zenodo format will be upload_type, but for older CFF versions, type doesnt exist, therefore the testing contract doesnt include testing for converting from type.

Maybe a construct like cffconvert/citation.py::Citation could work here as well.

jspaaks commented 1 year ago

Decided against doing this now, because there is no need FTM. Even though earlier versions of CFF do not specify a type, it is assumed that the metadata describes a software, hence it is OK to have ZenodoObject include "upload_type": "software", also for CFF files with cff-version 1.0.x or 1.1.x. The testing contract for ZenodoObject can then simply be extended with one abstract method test_upload_type which the tests for 1.0.3, 1.1.0 and 1.2.0 can implement (which I did in PR #307).