Skip to content

Add tabular dataset diff by key#291

Merged
JE-Chen merged 1 commit into
devfrom
feat/dataset-diff-batch
Jun 21, 2026
Merged

Add tabular dataset diff by key#291
JE-Chen merged 1 commit into
devfrom
feat/dataset-diff-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 21, 2026

Copy link
Copy Markdown
Member

What

Adds a CDC-style row-set diff. The framework diffed screens/snapshots but had nothing to diff two tabular row-sets by key.

  • diff_rows(old, new, key){added, removed, changed, unchanged} (changed carries {key, old, new}); supports a single column or composite key list; last-write-wins on duplicate keys.
  • cell_changes(old, new, key)[{key, column, old, new}].
  • summarize_diff(diff) → bucket counts.

Layers

  • Headless core: utils/dataset_diff/ (pure stdlib, zero PySide6).
  • Facade: 3 symbols + __all__.
  • Executor: AC_diff_rows, AC_cell_changes.
  • MCP: ac_diff_rows, ac_cell_changes (read-only).
  • Script Builder: both under Data.
  • Tests: test/unit_test/headless/test_dataset_diff_batch.py (9 tests, no Qt).
  • Docs: v83_features_doc.rst (EN + Zh) + toctrees + 3 README What's-new sections.

Verification

  • pytest test/unit_test/headless/test_dataset_diff_batch.py → 9 passed.
  • ruff check je_auto_control/ clean; pylint 10.00/10; bandit clean; radon CC clean.
  • Package stays Qt-free.

The framework diffed screens/snapshots but had nothing to diff two
tabular row-sets by key — the standard "what changed between yesterday's
and today's extract" report. Add diff_rows (added/removed/changed/
unchanged, composite keys, last-write-wins on duplicates), cell_changes,
and summarize_diff. Wired through facade, executor (AC_diff_rows /
AC_cell_changes), MCP, and the Script Builder with a headless test batch
and EN/Zh docs.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 46 complexity · 0 duplication

Metric Results
Complexity 46
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit 11ef092 into dev Jun 21, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/dataset-diff-batch branch June 21, 2026 15:17
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant