-
Notifications
You must be signed in to change notification settings - Fork 3
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
map some additional orcid pub types #1438
base: main
Are you sure you want to change the base?
Conversation
00a4d5c
to
5829fcf
Compare
def orcid_pub? | ||
provenance == Settings.orcid_source | ||
end | ||
|
||
def wos_pub? |
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.
additional convenience method like we have for other sources
'inproceedings' => 'conference-paper', | ||
'otherPaper' => 'other', | ||
'technicalReport' => 'report', | ||
'workingPaper' => 'working-paper' | ||
}.freeze |
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.
the extra mappings from ORCID works to pub types in sul-pub
@@ -21,7 +21,7 @@ def map | |||
title: work.title, | |||
identifier: map_identifiers(work.self_external_ids), | |||
abstract: work.short_description, | |||
provenance: 'orcid', | |||
provenance: Settings.orcid_source, | |||
doi: work.external_id_value('doi'), |
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.
this matches how we set provenance for other source types
- otherPaper # Only set via manual pub submission (provenance = cap) or via ORCID harvest (provenance = orcid) | ||
- technicalReport # Only set via manual pub submission (provenance = cap) or via ORCID harvest (provenance = orcid) | ||
- workingPaper # Only set via manual pub submission (provenance = cap) or via ORCID harvest (provenance = orcid) | ||
- null # Legacy. Not in current code, likely bad data. | ||
wos_item_id: |
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.
updates to documentation
@@ -108,7 +108,7 @@ | |||
|
|||
context 'when unmappable type' do | |||
let(:pub_hash) do | |||
base_pub_hash.dup.tap { |pub_hash| pub_hash[:type] = 'workingPaper' } | |||
base_pub_hash.dup.tap { |pub_hash| pub_hash[:type] = nil } | |||
end |
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.
workingPaper is now mappable so let's use some other bad data type to prove we raise the error
7f26b6f
to
bae32ac
Compare
bae32ac
to
c92a741
Compare
Why was this change made?
We should be able to map additional ORCID types - will be useful when we harvest works from ORCID. Started by looking at the list of works at ORCID and mapping a few more that we can support with our data model.
Also, some changes to match the pattern of other publication sources.
How was this change tested?
Existing tests
Which documentation and/or configurations were updated?