bibtex.py: `preferred-citation` is ignored when parsing citation.cff
Such citation.cff
file:
cff-version: 1.2.0
title: scikit-learn
type: software
authors:
- name: "The scikit-learn developers"
message: "If you use scikit-learn in a scientific publication, we would appreciate citations to the following paper:"
preferred-citation:
type: article
title: "Scikit-learn: Machine Learning in Python"
authors:
- family-names: "Pedregosa"
given-names: "Fabian"
- family-names: "Varoquaux"
given-names: "Gaël"
- family-names: "Gramfort"
given-names: "Alexandre"
- family-names: "Michel"
given-names: "Vincent"
- family-names: "Thirion"
given-names: "Bertrand"
- family-names: "Grisel"
given-names: "Olivier"
- family-names: "Blondel"
given-names: "Mathieu"
- family-names: "Prettenhofer"
given-names: "Peter"
- family-names: "Weiss"
given-names: "Ron"
- family-names: "Dubourg"
given-names: "Vincent"
- family-names: "Vanderplas"
given-names: "Jake"
- family-names: "Passos"
given-names: "Alexandre"
- family-names: "Cournapeau"
given-names: "David"
- family-names: "Brucher"
given-names: "Matthieu"
- family-names: "Perrot"
given-names: "Matthieu"
- family-names: "Duchesnay"
given-names: "Édouard"
journal: "Journal of Machine Learning Research"
volume: 12
start: 2825
end: 2830
year: 2011
url: "https://jmlr.csail.mit.edu/papers/v12/pedregosa11a.html"
currently cannot be used to generate a proper bibtex citation as the following is generated:
@softwareversion{REPLACEME,
title = "scikit-learn",
swhid = "swh:1:dir:9037be60edc26abf0bbca6c208a74b05beaed6b2;origin=https://github.com/scikit-learn/scikit-learn;visit=swh:1:snp:da4728fecfde270df0238894a39625b11ebe0b96;anchor=swh:1:rev:f106177572c031d0b5c574f02a139a6a050b9343"
}
In that case, citation metadata should be extracted from the preferred-citation
entry in the citation.cff
file.
Edited by Antoine Lambert