Open bouweandela opened 9 months ago
Thanks @bouweandela for reporting this. I'll transfer the issue to the relevant cffconvert
repository.
Hi Bouwe,
The way I handle that in my projects is to
.zenodo.extras.json
cffconvert
use the metadata from CITATION.cff
to generate the equivalent Zenodo JSON in CI, output in e.g. .zenodo.citation.json
.zenodo.json
with jq
before publishing to ZenodoAs follows:
cffconvert --infile CITATION.cff --format zenodo --outfile .zenodo.citation.json
cat .zenodo.citation.json .zenodo.extras.json | jq -s add > .zenodo.json
Thanks for the hint! Do I understand it correctly if I think that that will only work if we set up an extra GitHub action to do the publication to Zenodo? Currently, we use the workflow described here.
Thanks for the hint! Do I understand it correctly if I think that that will only work if we set up an extra GitHub action to do the publication to Zenodo? Currently, we use the workflow described here.
yes, I think the automatic Github<->Zenodo integration isn't that smart, it just takes the current repo contents and reads the .zenodo.json
, I don't think it even looks at CITATION.cff
, according to: https://developers.zenodo.org/#github
you could something like the following:
.zenodo.extras.json
as suggested.zenodo.json
along the lines that @jspaaks suggests upon a change to CITATION.cff
. .zenodo.json
would always be up-to-date.zenodo.json
The main issues with this is that you have make sure people don't accidentally modify the .zenodo.json
directly, and you also can't have the action commit the changes to your branch if it's protected.
In our project, we use the command
cffconvert --infile CITATION.cff --format zenodo --outfile .zenodo.json
to export contributors from our citation file to our zenodo file. However, this deletes the"communities"
and"grants"
entries from our .zenodo.json file (see here for a description) and it has already happened several times that new contributors accidentally deleted those in a pull request because not all reviewers understand how citation files and zenodo interact. Would it be possible to changecffconvert
so it keeps those entries when writing to an existing file?