Skip to content

fix(harvester): align INSPIRE related identifier resource types#760

Merged
kpsherva merged 1 commit intoCERNDocumentServer:masterfrom
TahaKhan998:fix/inspire-related-identifier-resource-type
Apr 17, 2026
Merged

fix(harvester): align INSPIRE related identifier resource types#760
kpsherva merged 1 commit intoCERNDocumentServer:masterfrom
TahaKhan998:fix/inspire-related-identifier-resource-type

Conversation

@TahaKhan998
Copy link
Copy Markdown

@TahaKhan998 TahaKhan998 commented Apr 13, 2026

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.

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"},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this just other now?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Image

@TahaKhan998 TahaKhan998 force-pushed the fix/inspire-related-identifier-resource-type branch 2 times, most recently from 9d92110 to 28b52f1 Compare April 13, 2026 15:41
@kpsherva kpsherva merged commit 79812f8 into CERNDocumentServer:master Apr 17, 2026
6 checks passed
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.

bulk update related identifiers, resource type of INSPIRE ids in CERN research

3 participants