Skip to content

Dedupe refactor - #518

Merged
ppinchuk merged 4 commits into
mainfrom
pp/dedupe_refactor
Aug 5, 2026
Merged

Dedupe refactor#518
ppinchuk merged 4 commits into
mainfrom
pp/dedupe_refactor

Conversation

@ppinchuk

@ppinchuk ppinchuk commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Minor refactor of class

@ppinchuk ppinchuk self-assigned this Aug 5, 2026
Copilot AI lite review requested due to automatic review settings August 5, 2026 17:06
@ppinchuk
ppinchuk requested a review from castelao as a code owner August 5, 2026 17:06
@ppinchuk ppinchuk added p-low Priority: low refactor Code improvements that do not change functionality labels Aug 5, 2026
@codecov-commenter

codecov-commenter commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.63%. Comparing base (9bb2336) to head (a9890fa).

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     
Flag Coverage Δ
unittests 63.63% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

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.

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 DocumentDeDuplicator to inherit from UserDict and 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.

Comment thread compass/pipeline/collection/dedupe.py Outdated
@ppinchuk
ppinchuk merged commit 2ea7b6d into main Aug 5, 2026
22 checks passed
@ppinchuk
ppinchuk deleted the pp/dedupe_refactor branch August 5, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p-low Priority: low refactor Code improvements that do not change functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants