Skip to content

feat: Make savings output prettier#197

Merged
Pringled merged 6 commits into
mainfrom
prettify-savings
Jun 12, 2026
Merged

feat: Make savings output prettier#197
Pringled merged 6 commits into
mainfrom
prettify-savings

Conversation

@Pringled

Copy link
Copy Markdown
Member

This PR makes semble savings prettier (using rtk gain as inspiration). It also drops the --verbose flag since the output is not that big anyway and it makes the code less complex.

Example:
image

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/semble/cli.py 100.00% <100.00%> (ø)
src/semble/stats.py 100.00% <100.00%> (ø)
src/semble/version.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown

Confidence Score: 4/5

Safe to merge; the changes are purely presentational and the core stats-accumulation logic is untouched.

The formatting rewrite is correct — bar fills are bounded, division-by-zero is guarded, and color detection follows the NO_COLOR spec. The only loose end is the now-unused sample_stats_file fixture and the absence of a rendering test for the By Call Type section that the fixture was well-suited to cover.

tests/test_stats.py — the sample_stats_file fixture should either be removed or wired to a new test for the call-type section.

Comments Outside Diff (1)

  1. tests/test_stats.py, line 19-27 (link)

    P2 Unused fixture after refactor

    sample_stats_file is defined here but no remaining test requests it — test_savings_output (which used it) was removed and its replacement (test_savings_output_token_suffixes) builds its own file. Beyond being dead code, the fixture contained both "search" and "find_related" records, so it was the natural basis for verifying the new "By Call Type" section renders correctly. Consider either removing it or adding a test that asserts call-type names appear in the formatted output.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "Update tests" | Re-trigger Greptile

@Pringled Pringled requested a review from stephantul June 12, 2026 10:41
@Pringled Pringled merged commit eacbe43 into main Jun 12, 2026
16 checks passed
@Pringled Pringled deleted the prettify-savings branch June 12, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants