Skip to content
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

Mandatory given-names field missing in Person object but still passes cffconvert's validation check #69

Open
timothy22000 opened this issue Jun 6, 2022 · 1 comment

Comments

@timothy22000
Copy link

The documentation on the CFF format mentions that family-names and given-names are mandatory for a Person object.

given_names

Link to docs:
https://citation-file-format.github.io/assets/pdf/cff-specifications-1.0.3.pdf

However, it passes the validation check from cffconvert --validate.

Expected behaviour: It fails the validation check due to a mandatory field missing

@timothy22000 timothy22000 changed the title Mandatory given-names field missing in Person object but still passes cff Mandatory given-names field missing in Person object but still passes cffconvert's validation check Jun 6, 2022
@jspaaks
Copy link
Member

jspaaks commented Jun 7, 2022

Hi @timothy22000, and welcome to the project. The errors you get are dependent on which version of the Citation File Format is being used (CITATION.cff record this as key cff-version).

The screenshot you attached seems to be of version 1.0.3, for which the following is valid:

cff-version: 1.0.3
authors:
  - given-names: Given Name
    family-names: Family Names
title: my title
message: my message
date-released: 2002-01-01
version: '0.1'

Later versions of the Citation File Format are a bit more forgiving, for example, under the current version 1.2.0 the following is valid:

cff-version: 1.2.0
title: my title
message: my message
type: software
authors:
  - given-names: Given Names
    family-names: Family Names

In fact, even

cff-version: 1.2.0
title: x
message: y
type: software
authors:
  - {}

would be valid under 1.2.0 (but maybe not a good idea).

The current version of cffconvert (2.0.0) prints what version the CITATION.cff is validated against, for example I'm getting

$ cffconvert --validate
Citation metadata are valid according to schema version 1.0.3.

and

$ cffconvert --validate
Citation metadata are valid according to schema version 1.2.0.

and

$ cffconvert --validate
Citation metadata are valid according to schema version 1.2.0.

respectively for the snippets above.

So I guess what's happening with:

However, it passes the validation check from cffconvert --validate.

is that you are using a CITATION.cff file whose cff-version is set to 1.2.0

Not sure if this is still relevant for what you;re trying to accomplish, but from the question raised here the-turing-way/the-turing-way#2424 (comment), know that you can use not only Person authors but also Entity authors, for example when you want to include a whole team, or the project, or something like that. For Entity authors, only name is a required field, e.g.:

cff-version: 1.2.0
title: x
message: y
type: software
authors:
  - name: The Team

You can mix and match as needed:

cff-version: 1.2.0
title: x
message: y
type: software
authors:
  - given-names: First
    family-names: Author
  - name: Everybody else

Finally, the current 1.2.0 schema is documented in the schema-guide: https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md

Hope this clears things up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants