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

Fix published_date for YYYY entries #189

Closed keegansmith21 closed 1 year ago

keegansmith21 commented 1 year ago

Some metadata feeds have the publishing date in YYYY format - which is perfectly acceptable by ONIX standards. The book_product query breaks when encountering something like this though. This PR changes the query to ignore the published_date field if the ONIX PublishingDate field is not in YYYYMMDD format (ie. 8 characters long).

codecov[bot] commented 1 year ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (4ccb351) 95.20% compared to head (6033b00) 95.20%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #189 +/- ## ======================================== Coverage 95.20% 95.20% ======================================== Files 16 16 Lines 2396 2396 Branches 312 312 ======================================== Hits 2281 2281 Misses 71 71 Partials 44 44 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.