fix(harvester): align INSPIRE related identifier resource types#760
Merged
kpsherva merged 1 commit intoCERNDocumentServer:masterfrom Apr 17, 2026
Conversation
Use the detected record resource type for INSPIRE related identifiers instead of forcing publication-other, and update harvester test expectations to assert the new consistent behavior. Made-with: Cursor
| "scheme": "inspire", | ||
| "relation_type": {"id": "isvariantformof"}, | ||
| "resource_type": {"id": "publication-other"}, | ||
| "resource_type": {"id": "other"}, |
Contributor
There was a problem hiding this comment.
Why is this just other now?
Author
There was a problem hiding this comment.
Because this test creates the context with resource_type=ResourceType.OTHER at L59. In site/cds_rdm/inspire_harvester/transform/resource_types.py, ResourceType.OTHER is explicitly defined as "other", so this assertion is validating the new intended behavior.
9d92110 to
28b52f1
Compare
kpsherva
approved these changes
Apr 17, 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.
Closes #727
Related pr https://gitlab.cern.ch/cds-team/production_scripts/-/merge_requests/47
This PR updates INSPIRE related identifier mapping so metadata.related_identifiers[].resource_type.id matches the record’s detected resource type (ctx.resource_type.value) instead of always being hardcoded to publication-other.
Updated affected INSPIRE harvester tests and fixtures to reflect the new expected mapping behavior; updated test set passes.