dspinellis / alexandria3k

Local relational access to openly-available publication data sets
GNU General Public License v3.0
79 stars 14 forks source link

bug fix: KeyError bug for empty grid identifier #38

Closed dtgupta closed 6 months ago

dtgupta commented 6 months ago

Whilst testing the population command on the complete ROR dataset, I came across a KeyError for the GRID identifier. The reason for this error was the absence of GRID identifiers under 713 research organizations. Unable to locate GRID under external_ids was what raised this error.

This pull request provides a bug-fix to this issue by using the .get command for Python dictionaries where the value is defaulted to None in case of missing fields. A research organization called "Axiom Data Science" with no grid identifier was added to the sample dataset. Tests were added and updated to reflect these changes and scenarios.