Dedupe refactor - #518
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #518 +/- ##
==========================================
+ Coverage 63.58% 63.63% +0.05%
==========================================
Files 78 78
Lines 7425 7430 +5
Branches 754 754
==========================================
+ Hits 4721 4728 +7
+ Misses 2546 2545 -1
+ Partials 158 157 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the document deduplication data structure used by the collection pipeline, switching from dict-based “info” entries to an object-based representation and updating call sites/tests accordingly.
Changes:
- Refactors
DocumentDeDuplicatorto inherit fromUserDictand store per-document metadata in a dedicated info object. - Updates persistence and collection logging to use the new
.values()iteration and attribute access (info.doc,info.from_steps). - Updates unit tests to match the new dedupe interface.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/python/unit/pipeline/test_pipeline_collection.py | Updates collection shard writing helper to iterate deduplicator.values() and use attribute access. |
| tests/python/unit/pipeline/test_pipeline_collection_dedupe.py | Updates assertions to match the new dedupe value object interface. |
| compass/pipeline/collection/persistence.py | Updates persistence logic to iterate collected_docs.values() and access doc/from_steps via attributes; docstring updated. |
| compass/pipeline/collection/dedupe.py | Core refactor: introduces per-document info object and changes deduplicator storage model. |
| compass/pipeline/collection/base.py | Updates debug logging to iterate .values() and use info.doc. |
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.
Minor refactor of class