You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: improve ORCID search and affiliation matching - #83
Improves ORCID author search by removing affiliation from the search query and using it to rank matching candidates instead. This helps prevent valid ORCID records from being excluded when GitHub profile company values do not match ORCID affiliation names.
What changed
Search query: Search by given and family names without requiring an affiliation match.
Affiliation matching: Support multiple GitHub company values separated by commas, semicolons, or pipes, and match them against ORCID affiliations.
Candidate ranking: Prioritize candidates whose affiliations match the author's GitHub affiliation, while retaining non-matching candidates as fallbacks.
Search results: Request up to 20 results from the ORCID API, rank candidates by affiliation, and return the top 5.
Tests: Add coverage for query construction, multiple company values, and candidate ranking.
Testing
Verified that affiliation is not required in the ORCID search query.
Tested affiliation matching with multiple GitHub company values.
Tested that candidates with matching affiliations are ranked first, even when the GitHub company value does not exactly match the ORCID affiliation.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The employer-splitting heuristic can cause automatic selection of an unrelated person's ORCID, while the stricter matcher also rejects a valid institution-name variation.
No open issues 🎉
2 previously missed issues
In code that hasn't changed since last review
Avoid matching ambiguous location suffixes as employers
src/services/orcidSearch.js:78
The comma heuristic merges Harvard University, Google, preventing either employer from matching, but splits Google, London, allowing London to match University College London. Among same-name candidates, that false match can automatically fill an unrelated person's ORCID. Handle mixed employer lists without treating ambiguous location suffixes as independent employers for automatic selection, and add regression cases for both examples alongside the campus safeguards.
Allow leading “The” in institution name matches
src/services/orcidSearch.js:100
The stricter matcher now rejects the formatting-only difference between Ohio State University and The Ohio State University, because the is not an allowed extra word. This previously matched and now prevents the candidate from being prioritized or disambiguated among same-name records. Allow the article as an ignorable word so this common institution-name variation still matches without relaxing the campus safeguards.
So, I used TreeOfLife-toolbox as a test since we didn't have ORCIDs listed in the Zenodo JSON (they are in the CFF, though) and looked at Matt : his ORCID lists Imageomics affiliation and he has Imageomics listed on GitHub, but he does't appear in the potential matches:
One more point of clarification. It does list him further down in the results (using middle initial) with his ORCID, presumably pulled from the CITATION.cff. We might consider some merging logic down the road, but from the perspective of this PR, I think it should be able to match the affiliation to find him, no?
Note: his is filled in manually, while the test I had done before used the @mention option to link
VS:
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #80.
Improves ORCID author search by removing affiliation from the search query and using it to rank matching candidates instead. This helps prevent valid ORCID records from being excluded when GitHub profile company values do not match ORCID affiliation names.
What changed
Testing