Skip to content

feat: Improve existing numeric metrics for new output format#44

Open
Moritz Potthoff (MoritzPotthoffQC) wants to merge 7 commits into
generalize-metrics-add-nullabilityfrom
delta-metrics
Open

feat: Improve existing numeric metrics for new output format#44
Moritz Potthoff (MoritzPotthoffQC) wants to merge 7 commits into
generalize-metrics-add-nullabilityfrom
delta-metrics

Conversation

@MoritzPotthoffQC

@MoritzPotthoffQC Moritz Potthoff (MoritzPotthoffQC) commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Motivation

It would be nice to apply the new output format of #43 (<old> -> <new> (<delta>)) also to all existing metrics where it makes sense.

Changes

@MoritzPotthoffQC Moritz Potthoff (MoritzPotthoffQC) changed the base branch from main to generalize-metrics-add-nullability July 10, 2026 14:16
@github-actions github-actions Bot added the enhancement New feature or request label Jul 10, 2026
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (eb1c427) to head (4c3e7cc).

Additional details and impacted files
@@                         Coverage Diff                          @@
##           generalize-metrics-add-nullability       #44   +/-   ##
====================================================================
  Coverage                              100.00%   100.00%           
====================================================================
  Files                                      11        11           
  Lines                                    1030      1035    +5     
====================================================================
+ Hits                                     1030      1035    +5     

☔ 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

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 updates Diffly’s metric outputs to use the newer “old -> new (delta)” rendering for existing numeric metrics, and propagates that change through unit tests and golden summary fixtures (including CLI-visible metric labels).

Changes:

  • Update tests/test_metrics.py expectations for numeric preset metrics to assert formatted change strings (e.g., 2.0 -> 3.0 (+1.0)).
  • Update summary.to_json() expectations and many golden summary fixtures to reflect the new rendered metric values/layout.
  • Rename the null-fraction preset label used in tests/fixtures/CLI from ΔNull% to Null%.

Reviewed changes

Copilot reviewed 165 out of 165 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_metrics.py Updates metric unit tests to expect formatted <old> -> <new> (<delta>) strings for numeric presets.
tests/summary/test_summary.py Updates JSON summary expectations for metrics to match new rendered string values.
tests/cli/test_cli.py Updates CLI test to request/display the renamed null-fraction metric preset (Null%).
tests/summary/fixtures/metrics_null_fraction/test_metrics_null_fraction.py Updates fixture generator test to use the renamed null-fraction preset label (Null%).
tests/summary/fixtures/metrics_presets_many/gen/*.txt Regenerates golden fixtures to reflect new metric rendering and resulting table wrapping.
tests/summary/fixtures/metrics_presets_few/gen/*.txt Regenerates golden fixtures to reflect new metric rendering and resulting table wrapping.
tests/summary/fixtures/metrics_null_fraction/gen/*.txt Regenerates golden fixtures for null-fraction metrics to reflect the new label and rendering.
tests/summary/fixtures/metrics_long_labels/gen/*.txt Regenerates golden fixtures to reflect new metric rendering under long-header layout constraints.
tests/summary/fixtures/metrics_custom/gen/*.txt Regenerates golden fixtures to reflect new metric rendering for user-supplied metrics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_metrics.py
Comment thread tests/cli/test_cli.py
Comment thread tests/summary/test_summary.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 163 out of 163 changed files in this pull request and generated 1 comment.

Comment thread tests/test_metrics.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants