-
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
Update CITATION.cff to fix Zenodo, add CFF validator #408
Conversation
Currently, Zenodo is unhappy with array values for `license`. This violates the CFF spec. The related GitHub issue is added as a comment in this commit.
There was an extra slash in Chris' author.orcid entry.
# NOTE: The CFF spec says `license` can be a list, but Zenodo is currently not | ||
# accepting lists for this key: | ||
# https://github.com/zenodo/zenodo/issues/2515 | ||
license: "MIT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the thing that broke everything. All the other changes are from adding the validator.
hooks: | ||
- id: "validate-cff" | ||
args: | ||
- "--verbose" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hoped to also get pre-commit to recognize CFF as type: yaml
for prettier but it turns out there are very good reasons not to do that, and my PR wasn't accepted (pre-commit/identify#435).
I don't know of a good escape hatch that will let us run prettier on CFF without also needing to maintain a regex to exclude all other files of "text" type. Prettier correctly detects CFF as YAML and formats it the way we would want. It's just pre-commit that we would need a workaround for. Any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just thought of one. We could have the prettier hook run twice; once for the normal stuff we want to format, and again ONLY for CITATION.cff!
- repo: "https://github.com/pre-commit/mirrors-prettier"
rev: "v3.1.0"
hooks:
- id: "prettier"
files: "CITATION.cff"
I'd need to test it. But I don't have time right now.
Woot woot thanks Matt! Added a comment above :) |
@@ -22,3 +22,9 @@ repos: | |||
hooks: | |||
- id: prettier | |||
types_or: [yaml] | |||
- repo: https://github.com/citation-file-format/cffconvert | |||
rev: "054bda51dbe278b3e86f27c890e3f3ac877d616c" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this either, but it's what they documented, and the alternative I tried does not work. Opened issue: citation-file-format/cffconvert#375
If anyone approves, this is ready to merge on my end, so go for it :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing it Matt!
Currently, Zenodo is unhappy with array values for
license
. This violates the CFF spec. The related GitHub issue is added as a comment in this PR.Resolves #407
This has been (silently) going on for about a month, so our last DOI'd release is 0.6.1 😭 I added the new pre-commit check to hopefully avoid this going forward, but for this particular issue, it wouldn't have helped, since it implements the spec more accurately than Zenodo (for this particular field at least).