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

Handle case: OAPEN Metadata returns only the XML header #140

Closed keegansmith21 closed 1 year ago

keegansmith21 commented 1 year ago

Oapen will sometimes only return a header when requesting the metadata. No idea why. But it doesn't fall under any of the error cases in the download task. This PR causes an error to be raised if no XML "Product" is found in the downloaded content

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (0a43be0) 94.87% compared to head (cf4ce0f) 94.87%.

:exclamation: Current head cf4ce0f differs from pull request most recent head 032a5a4. Consider uploading reports for the commit 032a5a4 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #140 +/- ## ======================================== Coverage 94.87% 94.87% ======================================== Files 23 23 Lines 2732 2734 +2 Branches 359 360 +1 ======================================== + Hits 2592 2594 +2 Misses 65 65 Partials 75 75 ``` | [Impacted Files](https://codecov.io/gh/The-Academic-Observatory/oaebu-workflows/pull/140?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The-Academic-Observatory) | Coverage Δ | | |---|---|---| | [...bu\_workflows/workflows/oapen\_metadata\_telescope.py](https://codecov.io/gh/The-Academic-Observatory/oaebu-workflows/pull/140?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The-Academic-Observatory#diff-b2FlYnVfd29ya2Zsb3dzL3dvcmtmbG93cy9vYXBlbl9tZXRhZGF0YV90ZWxlc2NvcGUucHk=) | `92.89% <100.00%> (+0.07%)` | :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 in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.