pybliometrics-dev / pybliometrics

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

AffiliationSearch().affiliations field parent should be integer or None #334

Closed Michael-E-Rose closed 1 month ago

Michael-E-Rose commented 2 months ago
from pybliometrics.scopus import AffiliationSearch
q = 'AF-ID(101077409)'
s = AffiliationSearch(q)
print(s.affiliations)

output is

[Affiliation(eid='10-s2.0-101077409', name='Planned Parenthood of Indiana',
                  variant='Planned Parenthood of Indiana, Inc.', documents=2, city='Indianapolis',
                  country='United States', parent='0')]

Field parent should be integer, unless it evaluates to 0, in which case it should be None. It think it is always None be now, but Scopus still returns this field.

Please change code, adapt tests and update the documentation.