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
Provenance and Acquisition #2140
Conversation
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.
Really nice stuff, especially the comments and references. ✨
The Datable
trait is a really nice touch. It might be worth adding some traits for it specifically, because I think we might want to tweak it in future. Having a standalone test harness would make that easier.
e.g. turning dates like 2001-10-20
or 2003-04
into more human-readable strings like 20 October 2001
or April 2003
.
(To be clear: I think the trait as-written is fine and doesn't need changing in this PR, but putting in tests now might be useful for future changes.)
NormaliseText(acquisition.text.trim).map( | ||
acquisitionText => | ||
Note( | ||
NoteType.AcquisitionNote, | ||
List(formatDatablePrefix(acquisition), Some(acquisitionText)).flatten | ||
.mkString(": ") | ||
)) |
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.
minor: an intermediate variable or keyword arguments might make this a little easier to read.
...mer/transformer_tei/src/main/scala/weco/pipeline/transformer/tei/transformers/TeiNotes.scala
Show resolved
Hide resolved
* | ||
* - The two children of history that should result in notes are `<provenance/>` and `<acquisition/>`. | ||
* - The value of `<origin/>` is extracted eleswhere (TeiProduction) | ||
* - There are no examples of `history/summary` in the data. |
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.
Maybe make a note of which commit from the TEI repo you were looking at? So we know when this was accurate.
…ine/transformer/tei/transformers/TeiNotes.scala Co-authored-by: Alex Chan <a.chan@wellcome.org>
wellcomecollection/platform#5558