should map to self._from_given_and_last because the cff can't be valid with both the properties of an EntityAuthor (name) and a PersonAuthor (family-names, given-names).
Not sure if fixing this would affect the major version number, because the wrong behavior should be unreachable for valid CITATION.cff files, and validation happens even without the --validate flag when converting.
While fixing this issue, maybe also add tests to check the keys used in self._behaviors cover the possible permutations and the dictionary has the right length. The permutations test could be a parameterized test that simply checks if its value is not None.
It seems there may be small errors in the mapping of behavior from keys. For example,
https://github.com/citation-file-format/cff-converter-python/blob/45126d07c5866674d438c0c905dc2c76fb0a15af/cffconvert/behavior_shared/schemaorg_author_shared.py#L22
should map to
self._from_given_and_last
because the cff can't be valid with both the properties of an EntityAuthor (name
) and a PersonAuthor (family-names
,given-names
).Not sure if fixing this would affect the major version number, because the wrong behavior should be unreachable for valid CITATION.cff files, and validation happens even without the
--validate
flag when converting.While fixing this issue, maybe also add tests to check the keys used in
self._behaviors
cover the possible permutations and the dictionary has the right length. The permutations test could be a parameterized test that simply checks if its value is notNone
.