-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CITATION.cff
Citation File Format file to repo
#1541
Comments
@matthewfeickert RE the need for a validator, we can use the JSON schema with an online tool, e.g.: |
True, though ideally you shouldn't have to be doing copypaste to validate schemas, but be able to validate in CI. |
If we need a tool to do this, perhaps we could leverage jsonschema <(curl "https://citation-file-format.github.io/1.2.0/schema.json") -i /tmp/schema.json |
Yeah the
|
Hm. It seems to be having trouble with some aspects of publisher if you add in references ...
"references": [
{
"type": "article",
"authors": [
{
"family-names": "Heinrich",
"given-names": "Lukas",
"orcid": "https://orcid.org/0000-0002-4048-7584"
},
{
"family-names": "Feickert",
"given-names": "Matthew",
"orcid": "https://orcid.org/0000-0003-4124-7862"
},
{
"family-names": "Stark",
"given-names": "Giordon",
"orcid": "https://orcid.org/0000-0001-6616-3433"
},
{
"family-names": "Cranmer",
"given-names": "Kyle",
"orcid": "https://orcid.org/0000-0002-5769-7094"
}
],
"title": "pyhf: pure-Python implementation of HistFactory statistical models",
"doi": "10.21105/joss.02823",
"url": "https://doi.org/10.21105/joss.02823",
"year": 2021,
"publisher": "The Open Journal",
"volume": 6,
"number": 58,
"pages": 2823,
"journal": "Journal of Open Source Software"
}
]
} $ jsonschema <(curl -sL "https://citation-file-format.github.io/1.2.0/schema.json") -i cff-schema.json
The Open Journal: 'The Open Journal' is not of type 'object' |
which as @kratsg pointed out to me could be solved with "publisher": {"name": "The Open Journal"}, |
@agoose77 Any thoughts here? I'm working on my fork so that I can preview the result https://github.com/matthewfeickert/pyhf/blob/master/CITATION.cff but if I download that $ curl -sLO https://raw.githubusercontent.com/matthewfeickert/pyhf/6423b74f8d52a7bc145fff38786761c1b617651b/CITATION.cff
$ python -m pip install yq and run $ jsonschema <(curl -sL "https://citation-file-format.github.io/1.2.0/schema.json") --instance <(cat CITATION.cff | yq)
[{'name': 'The Open Journal'}]: [{'name': 'The Open Journal'}] is not of type 'object' so how can I get "publisher": {"name": "The Open Journal"}, instead of "publisher": [{"name": "The Open Journal"}], ? |
Oh whoops. I had publisher:
- name: "The Open Journal" which gives "publisher": [
{
"name": "The Open Journal"
}
], while publisher:
name: "The Open Journal" works giving "publisher": {
"name": "The Open Journal"
}, YAML is annoying at times. |
From the Lines 34 to 42 in 248e400
Line 2 in 248e400
What we'd like is to have the current Line 2 in 4b5389d
but there isn't a description field in
which isn't great. @lnielsen Any thoughts on how we can avoid this? Or would you prefer we open an Issue on Zenodo? |
@matthewfeickert The best is you report it on the Zenodo support line: https://zenodo.org/support |
Thanks Lars! |
Description
@lukasheinrich @kratsg GitHub now will add a citation button to repositories that have a Citation File Format file (
CITATION.cff
) on the default branch. This seems pretty good in general for citation of software. Also Zenodo has now added support forCITATION.cff
for linked GitHub repositories, which means that we can probably deprecate our.zenodo.json
in favor of aCITATION.cff
.However, it seems that it is now a smooth replacement in all areas, especially as
at the same time.
pyhf
is trying to be careful about how people cite the software so that we get consistent citations and that people cite the JOSS paperOn my fork of
pyhf
I've been playing around with the CFF file format and the followingproduces a window like (notice that the
message
seems to get overwritten by GitHub)and the copied citation gives
which is a bit different from our preferred citation (of just the software) of
pyhf/src/pyhf/data/citation.bib
Lines 1 to 8 in 8f35b10
and doesn't get the reference citation for the JOSS paper
pyhf/src/pyhf/data/citation.bib
Lines 10 to 21 in 8f35b10
at all.
There's also no
CFF
validator that I know of as well that will check that everything is valid. Given that we've got our.zenodo.json
config file setup so that we know that it works (thanks to help from @lnielsen) we should be careful to not break Zenodo with this new format.Example libraries that are using the
CITATION.cff
nowSimilar ongoing discussion on the topic
CITATION.cff
awkward#1034cc @danielskatz @cranmer
Other related references
cff-version: 1.2.0
that is invalid, as the latest CFF release is1.1.0
The text was updated successfully, but these errors were encountered: