ORCID / python-orcid

Python wrapper around ORCID API
BSD 3-Clause "New" or "Revised" License
91 stars 26 forks source link

add xml support #21

Closed szymonlopaciuk closed 6 years ago

szymonlopaciuk commented 6 years ago

This adds support for sending/retrieving XML records to/from ORCID.

Changes

Modified readrecord*, add_record and update_record public methods by adding additional optional arguments. These allow to explicitly specify the format of the record to be transmitted. Changes leave (the public interface of) the library backwards compatible.

Motivation

ORCID only publish XSD schemas. Processing records in XML allows their validation as opposed to JSON. For such use case, this change would add support for XML records to python-orcid.

MSusik commented 6 years ago

@szymonlopaciuk https://travis-ci.org/ORCID/python-orcid/builds/295278687

Please check and fix

szymonlopaciuk commented 6 years ago

@MSusik I am fixing the code so that it's in accordance with PEP8, however I looked into other errors and they seem to me like a race condition caused by tests for different python versions running concurrently on travis.

Here even though the creation happens without HTTP errors, the record seems to not have been added, whereas here the record is already present, even though, it shouldn't be there. Maybe I am wrong (as this doesn't seem to have happened before), but maybe we could try again with maximum_number_of_builds set to 1 to check?

MSusik commented 6 years ago

@szymonlopaciuk It was set to 1, so there is another issue