citation-file-format / cffconvert

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

Set `resource_type` for some `related_identifers` to `software` in Zenodo backend #384

Closed alexlancaster closed 6 months ago

alexlancaster commented 6 months ago

According to the CFF Schema: https://github.com/citation-file-format/citation-file-format/blob/develop/schema-guide.md#repository-artifact the two keys:

seem to be intended for software, so this PR adds the resource_type to be software in the Zenodo related_identifiers to provide more metadata upstream.

jspaaks commented 6 months ago

Hi Alex, thanks for making the PR. Instead of merging this one, I'd like to wait for the next version of cffconvert to be released. In that version the default upload_type for Zenodo export is software if users don't include type: dataset in their CITATION.cff. I find that logic easier to maintain than having "computed properties".

alexlancaster commented 6 months ago

Hi Alex, thanks for making the PR. Instead of merging this one, I'd like to wait for the next version of cffconvert to be released. In that version the default upload_type for Zenodo export is software if users don't include type: dataset in their CITATION.cff. I find that logic easier to maintain than having "computed properties".

I see, that makes sense. So would that mean that the resource_type: software would only be added to the related_identifiers if the upload_type is set to software?

alexlancaster commented 6 months ago

I see, that makes sense. So would that mean that the resource_type: software would only be added to the related_identifiers if the upload_type is set to software?

Also, so I know in the future, is there an easier way of updating the unit tests rather than having to go through 40+ .zenodo.json and Python files to add the new key?

alexlancaster commented 6 months ago

@jspaaks I renamed the branch of my existing work to: https://github.com/alexlancaster/cffconvert/tree/repository_resource_type_zenodo

Let me know if I can retool that branch to work along the lines you suggested above. I can always open it up as a new PR.

Also let me know about how you handle the unit test addition.