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

map some additional orcid pub types #1438

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

peetucket
Copy link
Member

@peetucket peetucket commented Feb 10, 2022

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?

def orcid_pub?
provenance == Settings.orcid_source
end

def wos_pub?
Copy link
Member Author

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
Copy link
Member Author

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'),
Copy link
Member Author

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:
Copy link
Member Author

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
Copy link
Member Author

@peetucket peetucket Mar 11, 2022

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

@peetucket peetucket force-pushed the map-additional-orcid-types branch 3 times, most recently from 7f26b6f to bae32ac Compare March 18, 2022 18:46
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.

1 participant