elifesciences / elife-tools

Python library for parsing eLife article XML data.
MIT License
15 stars 7 forks source link

Change person preferred value order of name parts. #342

Closed gnott closed 3 years ago

gnott commented 3 years ago

Re issue https://github.com/elifesciences/issues/issues/6519

The preferred value in person JSON output is changed for when a person is in a reference or dataset, but remains unchanged if they're an article author or funding award recipient.

Most of the code changes are in the utils.py module, where it was refactored to support the two types of person data, as well as still supporting some other places the preferred name format is used, such as when the JSON output is rewritten to fix data in individual older eLife articles.

More specific test scenarios were added for the author formatting functions which didn't previously have separate tests.

This PR includes bumping the code library version up to 0.6.0 from 0.5.0.

Most of the files changed are test fixtures where the JSON preferred value is different as a result.

gnott commented 3 years ago

Sure, the unittest style tests I added all include a suffix, but there may be no XML examples since the existing fixtures are all edge cases that are unrelated to the preferred value of names. I will add another test fixture to illustrate a reference author having a suffix.