Skip to content

refactor(group,dedup): reduce duplication and remove dead code - #153

Merged
nh13 merged 1 commit into
mainfrom
refactor/nh/simplify-fgumi-commands-umi-group
Mar 4, 2026
Merged

nh13 merged 1 commit into
mainfrom
refactor/nh/simplify-fgumi-commands-umi-group

Conversation

@nh13

@nh13 nh13 commented Mar 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace local TagFamilySizeMetric struct in group.rs with FamilySizeMetrics from fgumi-metrics (dedup.rs already used this)
  • Add FamilySizeMetrics::from_size_counts() to centralize the histogram computation that was duplicated verbatim in both group.rs and dedup.rs
  • Remove dead _assign_tag_bytes parameter that was threaded through 3 functions but never used (tags are set during serialization)
  • Remove unused serde import

Test plan

  • All 1838 tests pass (cargo ci-test)
  • Formatting clean (cargo ci-fmt)
  • Linting clean (cargo ci-lint)
  • New unit tests for FamilySizeMetrics::from_size_counts() (normal + empty cases)

…rics and remove dead parameter

- Replace local TagFamilySizeMetric struct in group.rs with FamilySizeMetrics
  from fgumi-metrics crate (dedup.rs already used this)
- Add FamilySizeMetrics::from_size_counts() to centralize histogram computation
  that was duplicated in both group.rs and dedup.rs
- Add PartialEq derive to FamilySizeMetrics for test assertions
- Remove dead _assign_tag_bytes parameter from assign_umi_groups_for_indices_impl
  and its callers (tags are set during serialization, not assignment)
- Remove unused serde import from group.rs
@nh13
nh13 temporarily deployed to github-actions March 3, 2026 06:44 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Mar 3, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@nh13 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 35 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3a460ea and d1417be.

📒 Files selected for processing (3)
  • crates/fgumi-metrics/src/group.rs
  • src/commands/dedup.rs
  • src/commands/group.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/nh/simplify-fgumi-commands-umi-group

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Mar 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.62%. Comparing base (3a460ea) to head (d1417be).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
src/commands/dedup.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #153      +/-   ##
==========================================
+ Coverage   83.61%   83.62%   +0.01%     
==========================================
  Files         126      126              
  Lines       51510    51475      -35     
==========================================
- Hits        43069    43048      -21     
+ Misses       8441     8427      -14     

☔ View full report in Codecov by Sentry.
📢 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.

@nh13
nh13 merged commit ff845c1 into main Mar 4, 2026
6 of 7 checks passed
@nh13
nh13 deleted the refactor/nh/simplify-fgumi-commands-umi-group branch March 4, 2026 23:13
@nh13 nh13 mentioned this pull request Mar 4, 2026

This branch was previously deployed

1 inactive deployment
github-actions — d1417bec Deployed Mar 3, 2026 by nh13 via coverage #517
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