MODLD-980: Add test to ensure that a fingerprint rule exists for all type combinations defined in marc4ld#203
Open
MODLD-980: Add test to ensure that a fingerprint rule exists for all type combinations defined in marc4ld#203
Conversation
…type combinations defined in marc4ld
pkjacob
commented
Feb 20, 2026
Comment on lines
+36
to
+40
| Set.of(ABBREVIATED_TITLE.name()), // use all properties for fingerprinting | ||
| Set.of(ID_CODEN.name(), IDENTIFIER.name()), // use all properties for fingerprinting | ||
| Set.of(AGENT.name()), // use all properties for fingerprinting | ||
| Set.of(FREQUENCY.name()), // use all properties for fingerprinting | ||
| Set.of(IDENTIFIER.name()) // use all properties for fingerprinting |
Contributor
Author
There was a problem hiding this comment.
We need to review why these types do not have a fingerprint rule defined. May be we will define the fingerprint rule for these types and remove them from the list.
There was a problem hiding this comment.
Pull request overview
This PR adds an integration test to validate that fingerprint rules exist for all type combinations defined in the marc4ld configuration. The test ensures consistency between marc4ld mapping rules and fingerprint rules used for resource identification and deduplication.
Changes:
- Added a new integration test class that validates the presence of fingerprint rules for all type combinations extracted from marc4ld configuration files
- The test extracts type combinations from both bibliographic and authority field rules, compares them against fingerprint rules, and identifies any missing combinations
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zepheiryan
approved these changes
Feb 20, 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.
I updated the mappings to inlclude LIGHT_RESOURCE type in this PR -> #198
However, I missed to update that fingerprint rules. Thankfully, Yana noticed the problem.
This test guarantee that all the type combinations defined in marc4ld rules have a corresponding entry in fingerprint rules.
I think we need to add a similar test in rd4ld and mod-linked-data to ensure that all the resources created have a corresponding fingerprint rule defined. Let us think how to do that.
Build will pass after merging folio-org/lib-linked-data-fingerprint#108