Add affiliation-country filter for DOI queries via ROR-to-country mapping#1483
Merged
ashwinisukale merged 14 commits intomasterfrom Apr 8, 2026
Merged
Conversation
Copilot
AI
changed the title
[WIP] Add affiliation-country filter to /dois backed by ROR country mappings
Add affiliation-country filter for DOI queries via ROR-to-country mapping
Feb 18, 2026
535d824 to
55fcf0b
Compare
…exing Co-authored-by: ashwinisukale <1137325+ashwinisukale@users.noreply.github.com>
Co-authored-by: ashwinisukale <1137325+ashwinisukale@users.noreply.github.com>
55fcf0b to
6008c3f
Compare
…1326-91705241-babb87d3-4aee-4ed5-8698-7edaab001ff6
- For Rorable specs: expected countries are computed from ROR_TO_COUNTRIES[ror_url] (and then upcased/uniq), instead of hardcoding "US". - For the DOI affiliation_countries specs: expected countries are computed from the mapping for the RORs used, and deduplication is tested by asserting the result equals result.uniq (instead of counting "US").
…91705241-babb87d3-4aee-4ed5-8698-7edaab001ff6
wendelfabianchinsamy
approved these changes
Apr 3, 2026
jrhoads
reviewed
Apr 3, 2026
jrhoads
approved these changes
Apr 3, 2026
…4ed5-8698-7edaab001ff6
…ON file Agent-Logs-Url: https://github.com/datacite/lupo/sessions/44b8398a-25a1-47b0-be7c-39bccda1d1b8 Co-authored-by: ashwinisukale <1137325+ashwinisukale@users.noreply.github.com>
Agent-Logs-Url: https://github.com/datacite/lupo/sessions/d3419087-8a2f-4214-b7bb-a8499ee38bd4 Co-authored-by: ashwinisukale <1137325+ashwinisukale@users.noreply.github.com>
kaysiz
approved these changes
Apr 7, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Enables filtering DOIs by the country of affiliated organisations in creators/contributors metadata. Since country is not stored in DOI records directly, it must be resolved at index time via a ROR ID → country lookup table.
Mapping data
Indexing
Query filter
New affiliation-country query param: comma-separated, case-insensitive, normalised to uppercase
Generates an ES terms filter on affiliation_countries
Passed through to pagination next link
OpenAPI