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

Elevate relation code 13 #240

Closed keegansmith21 closed 4 months ago

keegansmith21 commented 4 months ago

This PR alters the product elevation behaviour to also elevate relation code 13 (Epublication based on print). Previously, the code would also copy all of the related products into elevated products, then replace the original with the parent. This had the effect of making a carbon-copy of the original ISBN with the parent and the related product swapped. This can no longer be done as it only worked logically with OAPEN's metadata, since all of its product relation codes were "06" (alternative format). Instead, we now swap the parent and the child (related product) and invert the relation code (removing any other related product material in the new product). Inverse codes are stated in the codelist. Code 06 is the inverse of itself.

The new method should see no drop in the volume of products elevated, but will see a decline in the new products' related products.

Old method

Elevates to

New method

Elevates to

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.67%. Comparing base (dd379d3) to head (6364a36).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #240 +/- ## ========================================== + Coverage 93.54% 93.67% +0.13% ========================================== Files 14 14 Lines 2850 2846 -4 Branches 369 366 -3 ========================================== Hits 2666 2666 + Misses 102 100 -2 + Partials 82 80 -2 ```

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