Repository navigation
WP-2.2: merge discovered works (DOI, PMCID, title+year), newest first - #92
Merged
Merged
Conversation
… first Records with different DOIs or PMCIDs never merge, also transitively. Short titles never merge on title. All-sources discovery uses the merge and orders works newest first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-merge # Conflicts: # CHANGELOG.md # docs/22-implementation-status.md
…-merge # Conflicts: # CHANGELOG.md # docs/22-implementation-status.md
…-merge # Conflicts: # docs/22-implementation-status.md
…-merge # Conflicts: # CHANGELOG.md # docs/22-implementation-status.md
…-merge # Conflicts: # CHANGELOG.md # docs/22-implementation-status.md
…-merge # Conflicts: # CHANGELOG.md # docs/22-implementation-status.md
…-merge # Conflicts: # CHANGELOG.md # docs/22-implementation-status.md
APReddy-AutoBotz
marked this pull request as ready for review
December 6, 2026 07:58
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.
WP-2.2 (NR-F03, F04), fixtures only. Branched from
main.What
discovery/merge.py:merge()keeps each work once, merging by DOI (case-insensitive), then PMCID, then normalised title plus year.newest_first()orders works newest first inside the year range (stable within a year). Works outside the range, and undated ones when a range is set, are returned as excluded rather than dropped silently.OpenAccessOrchestrator._discover_allnow usesmerge+newest_first. Before, it merged on shared DOI/PMCID in source order.Tests
test_discovery_merge.py: 6 passed. A 9-record, three-source overlapping fixture yields 5 works ordered by date. Also covers conflicting identifiers, the refused transitive join, the range and undated handling, and title normalisation.test_openaccess_multisource.py,test_openaccess_orchestrator.py,test_review_regressions.pyandtest_europepmc_live.py: 112 passed.Not in this PR
discovery/service.py, fixture-only).🤖 Generated with Claude Code