elifesciences / elife-crossref-xml-generation

Crossref deposit of journal articles
MIT License
4 stars 3 forks source link

Use Crossref version 5.3.1, changes affiliations. #119

Closed gnott closed 3 years ago

gnott commented 3 years ago

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

In order to later add <institution_id> tags to person affiliations, we must use the most recent verison of the Crossref deposit schema, in this case it is version 5.3.1.

Changes are required to the XML output to be valid, which has shown to be primarily by changing the <affiliation> tags to be a parent tag named <afilliations>, and the child tags are set underneath it.

Use the latest elifetools and elifearticle libraries, particularly the newest elifearticle library will parse contributor affiliation tags separately -- department, institution, city, country -- so they can be reassembled into strings for the Crossref deposit. If these libraries are not updated, it will probably continue to work, but it will continue to only use the text attribute from each Affiliation object.

The crossref.cfg file is updated with the Crossref schema version 5.3.1, and to not update this value in the .cfg file used will cause invalid Crossref output; the schema version must be consistent with the programming logic to generate 5.3.1 deposits.

This library will continue to generate Crossref version 5 deposits going forward, so to use Crosrsef version 4 deposits, it is only supported up to the version 0.9.0 of this library, elifecrossref.

lsh-0 commented 3 years ago

I've made some changes in a separate PR here: https://github.com/elifesciences/elife-crossref-xml-generation/pull/120

The PR will merge into this PR if you're happy with them, you can then merge this into develop or continue working on this branch.

Essentially I pin the versions of coveralls and coverage in requirements.txt and force tox to recreate the venv on each run. From the error messages in the previous failed builds, it looked like pip was happy using the more recent versions of coverage/coveralls installed because they still satisfied version ranges.