Review how author behaves given different keys in SchemaAuthorShared
Closed this issue · 2 comments
It seems there may be small errors in the mapping of behavior from keys. For example,
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
.