pybliometrics-dev / pybliometrics

Python-based API-Wrapper to access Scopus
https://pybliometrics.readthedocs.io/en/stable/
Other
410 stars 128 forks source link

Add ORCiD in AuthorSearch #216

Closed astrochun closed 2 years ago

astrochun commented 2 years ago

Related to #214

This should be sufficient.

Tested against myself (see below) as well as unit test cases where ORCiD was not available:

from pybliometrics.scopus import AuthorSearch
test = AuthorSearch('ORCID(0000-0002-4245-2318)')
test.authors
[Author(eid='9-s2.0-13608366900',
        orcid='0000-0002-4245-2318',
        surname='Ly', initials='C.', givenname='Chun',
        affiliation='The University of Arizona', documents=41,
        affiliation_id='60010065', city='Tucson', country='United States',
        areas='PHYS (49); EART (37); MULT (1)')]
astrochun commented 2 years ago

@Michael-E-Rose, have you had a chance to look over this PR? Let me know if you have questions.

Michael-E-Rose commented 2 years ago

Thanks @astrochun ! This looks great, thanks (I've been sick for a little while). One thing is missing, namely the tests. Would you please add a line in ./scopus/tests/test_AuthorSearch.py in L#20 for orcid=None? Then we're complete.

astrochun commented 2 years ago

Thanks @astrochun ! This looks great, thanks (I've been sick for a little while). One thing is missing, namely the tests. Would you please add a line in ./scopus/tests/test_AuthorSearch.py in L#20 for orcid=None? Then we're complete.

Sorry to hear you were under the weather. I actually did this as part of the PR. Otherwise the unit test would have failed. See: https://github.com/pybliometrics-dev/pybliometrics/blob/f0e15e30cb95129bacf4cade5a9ed398481c2f9d/pybliometrics/scopus/tests/test_AuthorSearch.py#L20

Michael-E-Rose commented 2 years ago

Oh yes I see! Sorry, my bad. I didn't scroll down all the way.