The-Academic-Observatory / oaebu-workflows

Telescopes, Workflows and Data Services for the 'Book Analytics Dashboard Project (2022-2025)', building upon the project 'Developing a Pilot Data Trust for Open Access eBook Usage (2020-2022)'
https://documentation.book-analytics.org/
Apache License 2.0
5 stars 0 forks source link

BAD-489: Retry loop for crossref metadata #132

Closed keegansmith21 closed 1 year ago

keegansmith21 commented 1 year ago

Updating OAPEN’s metadata catalogue increased its throughput by roughly 3 times. This seems to have presented an issue for crossref metadata, as it will occasionally run into an error (KeyError: ‘items'). The issue arises because the returned data is incorrect - it returns the Journal rather than the work-list. In the meantime, a quick fix is to simply retry the call if the error arises, as the API will return the correct item the second time.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (73da5bb) 95.00% compared to head (5b86cd2) 95.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #132 +/- ## ======================================== Coverage 95.00% 95.00% ======================================== Files 23 23 Lines 2684 2685 +1 Branches 351 351 ======================================== + Hits 2550 2551 +1 Misses 62 62 Partials 72 72 ``` | [Impacted Files](https://codecov.io/gh/The-Academic-Observatory/oaebu-workflows/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The-Academic-Observatory) | Coverage Δ | | |---|---|---| | [oaebu\_workflows/workflows/onix\_workflow.py](https://codecov.io/gh/The-Academic-Observatory/oaebu-workflows/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The-Academic-Observatory#diff-b2FlYnVfd29ya2Zsb3dzL3dvcmtmbG93cy9vbml4X3dvcmtmbG93LnB5) | `94.21% <100.00%> (+<0.01%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The-Academic-Observatory). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The-Academic-Observatory)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.