Skip to content

Generate CITATION.cff from codemeta.json - #868

Merged
apdavison merged 1 commit into
NeuralEnsemble:masterfrom
apdavison:citation-from-codemeta
Nov 19, 2026
Merged

apdavison merged 1 commit into
NeuralEnsemble:masterfrom
apdavison:citation-from-codemeta

Conversation

@apdavison

Copy link
Copy Markdown
Member

To ensure CITATION.cff and codemeta.json are consistent, we generate the former from the latter with a new script, tools/codemeta2cff.py:

  • The top level describes the software: all the authors in codemeta.json, the version, the licence, the repository and the RRID.
  • The article is the preferred-citation, so GitHub's "Cite this repository" still gives the article.

To make this possible, referencePublication in codemeta.json is now a full ScholarlyArticle (authors, date, journal, volume, DOI) rather than just the DOI, which CodeMeta allows.

After changing codemeta.json, run python tools/codemeta2cff.py to update CITATION.cff; python tools/codemeta2cff.py --check reports whether it is up to date. The generated file is valid according to cffconvert --validate.

CITATION.cff listed only the authors of the 2008 article, with the wrong year (the article was published in January 2009), although its type is "software". It is now generated from codemeta.json by tools/codemeta2cff.py, with all the contributors, the RRID, and the article as the preferred citation.
@apdavison
apdavison force-pushed the citation-from-codemeta branch from 75b6116 to 1a454d5 Compare November 19, 2026 17:35
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 74.2%. remained the same — apdavison:citation-from-codemeta into NeuralEnsemble:master

@apdavison
apdavison merged commit 29e86e0 into NeuralEnsemble:master Nov 19, 2026
9 checks passed
@apdavison
apdavison deleted the citation-from-codemeta branch November 19, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants