Skip to content

quant library: steps of build_and_write_library as functions; 373 -> 299 lines - #550

Merged
ypriverol merged 1 commit into
mainfrom
refactor/build-library
Nov 24, 2026
Merged

ypriverol merged 1 commit into
mainfrom
refactor/build-library

Conversation

@ypriverol

Copy link
Copy Markdown
Contributor

Part of the function-length work: build_and_write_library (crates/andes/src/bin/andes/quant/library.rs) goes from 373 to 299 lines.

Six steps move out unchanged:

  • KeyMerge::add: the per-run merge of precursor keys and spec ids. The accumulators it updated are now the struct's fields.
  • isomer_classes: groups the site keys into isomer classes, with the class checks. It returns an IsomerTable, and the modification resolver is passed in because the PSM join uses it too.
  • quant_mod_masses: the runs' modification masses.
  • site_ids: the site-key lookup.
  • rekey_by_best_form: keys each precursor by the site form of its best PSM.
  • donor_gate_text: the logged donor gate.

The function's line is dropped from fn_lines.tsv.

Verification: release build; tests pass in every crate, including quant_mbr_end_to_end; clippy is clean with both feature sets.

build_and_write_library was 373 lines. Steps move out unchanged: the
per-run merge of precursor keys and spec ids becomes KeyMerge::add (the
accumulators it updated are the struct's fields); grouping the site keys
into isomer classes, with the class checks, becomes isomer_classes
(returning an IsomerTable, the modification resolver passed in); the
runs' modification masses quant_mod_masses; the site-key lookup
site_ids; keying each precursor by its best PSM's site form
rekey_by_best_form; and the logged donor gate donor_gate_text. Its
fn_lines.tsv line is dropped.
build_and_write_library 373 -> 299 lines.
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6a7ed52c-9b86-40ab-828c-e638652f5509
Commits

Reviewing files that changed from the base of the PR and between 5e735f7 and c86a251.

Files ignored due to path filters: 1

  • crates/andes/tests/ratchets/fn_lines.tsv is excluded by !**/*.tsv
Files selected for processing: 1

  • crates/andes/src/bin/andes/quant/library.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@ypriverol
ypriverol merged commit 22e48e8 into main Nov 24, 2026
6 checks passed
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