artefactual-sdps / preprocessing-sfa

preprocessing-sfa is an Enduro preprocessing workflow for SFA SIPs
2 stars 0 forks source link

Add PREMIS events #24

Closed mcantelon closed 3 months ago

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 74.30939% with 93 lines in your changes missing coverage. Please review.

Project coverage is 66.77%. Comparing base (f976317) to head (84e8e73).

Files Patch % Lines
internal/premis/premis.go 77.29% 34 Missing and 13 partials :warning:
cmd/worker/workercmd/cmd.go 0.00% 12 Missing :warning:
internal/workflow/preprocessing.go 84.37% 5 Missing and 5 partials :warning:
internal/activities/add_premis_objects.go 66.66% 4 Missing and 4 partials :warning:
internal/activities/add_premis_event.go 62.50% 3 Missing and 3 partials :warning:
internal/activities/validate_file_formats.go 68.42% 3 Missing and 3 partials :warning:
internal/activities/add_premis_agent.go 69.23% 2 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #24 +/- ## ========================================== + Coverage 62.79% 66.77% +3.97% ========================================== Files 14 19 +5 Lines 586 936 +350 ========================================== + Hits 368 625 +257 - Misses 198 261 +63 - Partials 20 50 +30 ```

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

mcantelon commented 3 months ago

Thanks @jraddaoui ! I've addressed most of the feedback, but will fix the rest, add more tests, and add PREMIS event appending from within activities.

djjuhasz commented 3 months ago

@mcantelon I just realized I may not have been clear that passing around io.Reader, io.Writer, and *etree.Document should only be done inside of an activity. We can't return large data structures like *etree.Document from an activity, so each PREMIS activity should read the existing premis.xml from disk (if it exists) at the beginning of the activity, and write a premis.xml file to disk at the end of the activity.

mcantelon commented 3 months ago

Thanks @djjuhasz... should be good for another review!