-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes to PREMIS event recording #31
Conversation
mcantelon
commented
Jul 5, 2024
•
edited
Loading
edited
- Removed redundant PREMIS event for validate file formats
- Correct use of improper PREMIS event types
- Allow PREMIS evebt details and PREMIS event outcome detail to be specified rather than generated
- Add PREMIS event outcome detail specification to PREMIS events in workflow and validate file formats activity
- Generate error when attempting to add a PREMIS event to a non-existent PREMIS object
- Fixed issue with validate formats activity
- Removed unneeded code in tests for add PREMIS event activity
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #31 +/- ##
==========================================
- Coverage 66.77% 66.59% -0.18%
==========================================
Files 19 19
Lines 936 940 +4
==========================================
+ Hits 625 626 +1
- Misses 261 263 +2
- Partials 50 51 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
internal/premis/premis.go
Outdated
@@ -128,30 +129,23 @@ func eventFromEventSummaryAndAgent(eventSummary EventSummary, agent Agent) Event | |||
} | |||
} | |||
|
|||
func NewEventSummary(eventType string, failures []string) (EventSummary, error) { | |||
detail, outcome := assembleEventDetailAndOutcome(failures) | |||
func NewEventSummary(eventType string, detail string, outcomeDetail string, failures []string) (EventSummary, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need to pass the slice of failures, could we use a boolean or pass the outcome directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call... that'd make it more straightforward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Fixed.)
Thanks @jraddaoui ! |
235a63a
to
0efe5bc
Compare
* Removed redundant PREMIS event for validate file formats * Correct use of improper PREMIS event types * Allowed PREMIS evebt details and PREMIS event outcome detail to be specified rather than generated * Add PREMIS event outcome detail specification to PREMIS events in workflow and validate file formats activity * Generate error when attempting to add a PREMIS event to a non-existent PREMIS object * Fixed issue with validate formats activity * Removed unneeded code in tests of add PREMIS event activity
0efe5bc
to
3d4b526
Compare