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

Refactor ORCID disambiguation to be more precise and comprehensive #1065

Merged
merged 9 commits into from
Apr 13, 2022

Conversation

jvwong
Copy link
Member

@jvwong jvwong commented Apr 11, 2022

  • Search the ORCID public API using fielded search: DOI, 'self'
  • For unique last names, match the ORCID search result on last alone, else resort to first name
  • Store the ORCID accession (local ID) rather than the url moving forward
  • Lots of weird edge cases like
    • PubMed putting ORCIDs in the wrong format
    • PubMed can store the ORCID URL or the accession

Refs #1064

@jvwong jvwong requested a review from metincansiper April 11, 2022 17:15
@jvwong
Copy link
Member Author

jvwong commented Apr 11, 2022

@metincansiper do you remember why the Document provided field has a name attribute rather than just using the authorName?

const handleAuthorName = doc => {
if ( !authorName ){
return doc;
}
return doc.provided( { name: authorName } ).then( () => doc );
};

@metincansiper
Copy link
Contributor

metincansiper commented Apr 12, 2022

@metincansiper do you remember why the Document provided field has a name attribute rather than just using the authorName?

const handleAuthorName = doc => {
if ( !authorName ){
return doc;
}
return doc.provided( { name: authorName } ).then( () => doc );
};

@jvwong I actually could not remember any specific reason for that. I suspect it may just be a confusion of me at that time. Actually, it seems like that name is used instead of authorName but both of them are being available because authorName is used as is during the doc creation and name is added later as a new field.

See this line (https://github.com/PathwayCommons/factoid/blob/unstable/src/client/components/editor/title.js#L60) and line 43 above that authorName is retrieved from document.provided() and it seems to be working since authorName is also available (BTW I guess in line 60 it may make sense to use the already defined provided variable).

There may be 2 things we must consider before removing name field:

  • There may be a very little possibility that there would be reason behind setting name filed that I cannot remember now.
  • Because of some possible dynamic/implicit assignment of field names etc. we may end up with having a bug while renaming that field (as it is used by different parts of the code now, probably implemented by different people I may miss something).

Considering the 2 thing above and that both of the fields (name and authorName) are available, maybe we can consider keeping the name field but replacing any explicit usage of it with authorName and add a comment to where name field is introduced so that we would encourage usage of authorName instead of it.

I can make the needed changes we agreed on after this PR is merged.

What do you think?

@metincansiper
Copy link
Contributor

@jvwong looks good to me!

@jvwong
Copy link
Member Author

jvwong commented Apr 13, 2022

There may be 2 things we must consider before removing name field:

I agree that's its probably redundant.

Considering the 2 thing above and that both of the fields (name and authorName) are available, maybe we can consider keeping the name field but replacing any explicit usage of it with authorName and add a comment to where name field is introduced so that we would encourage usage of authorName instead of it.

I won't change anything right now. I think these changes, if made, could be part of another issue so don't worry about making any changes.

Thanks!

@jvwong jvwong merged commit 8b8416d into unstable Apr 13, 2022
@jvwong jvwong deleted the iss1064_orcid-refactoring branch April 13, 2022 17:45
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.

2 participants