Skip to content
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

Merged
merged 20 commits into from Jul 1, 2022
Merged

Provenance and Acquisition #2140

merged 20 commits into from Jul 1, 2022

Conversation

paul-butcher
Copy link
Contributor

Copy link
Contributor

@alexwlchan alexwlchan left a 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.)

Comment on lines 16 to 22
NormaliseText(acquisition.text.trim).map(
acquisitionText =>
Note(
NoteType.AcquisitionNote,
List(formatDatablePrefix(acquisition), Some(acquisitionText)).flatten
.mkString(": ")
))
Copy link
Contributor

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.

*
* - 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.
Copy link
Contributor

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>
@paul-butcher paul-butcher merged commit 19afbec into main Jul 1, 2022
@paul-butcher paul-butcher mentioned this pull request Jul 1, 2022
@alexwlchan alexwlchan deleted the provenance branch August 4, 2022 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants