Skip to content

refactor(pod5): remove dead run_info dedup code, unify reads-table builders - #434

Merged
jayhesselberth merged 1 commit into
mainfrom
refactor-table-builders
Oct 5, 2026
Merged

jayhesselberth merged 1 commit into
mainfrom
refactor-table-builders

Conversation

@jayhesselberth

Copy link
Copy Markdown
Member

Why

Follow-up to #432's merge batch-stride fix: an architecture review afterward
surveyed the rest of the workspace for the same cross-module layering smell
(a function stranded in one module that a sibling reaches into, or
near-duplicate logic copy-pasted across modules). Two findings, filed as
#433.

What

  • Delete utils/run_info.rs — add_run_infos_deduplicated/
    map_run_info_index were never wired into utils/mod.rs and have zero
    call sites; superseded by pod5_assembler::deduplicate_run_infos, which
    merge/filter already share.
  • Unify build_reads_table (merge, owned (ReadData, Vec<u64>) pairs) and
    build_reads_table_remapped (filter, borrowed FlatReadRef) behind one
    generic build_reads_table_generic<R: PartitionRow + Sync>. Both were
    ~200-line copies of the same dictionary-collection/partition/concat/
    batch-write skeleton, differing only in input shape — already abstracted
    at the per-row level by the existing PartitionRow trait and
    build_partition_inner. Both public names stay as thin wrappers so
    callers in merge.rs/operations/filter.rs are untouched.

No behavior or output change — pure extraction, verified by the existing
test_merge_integration.rs / filter / subset test suite (unchanged, all
passing) plus a full cargo test -p escapepod-pod5 run.

Testing

  • cargo test -p escapepod-pod5: all green (incl. doctests)
  • cargo fmt --all --check: clean
  • RUSTFLAGS=-Dwarnings cargo clippy --workspace --all-targets: clean

Closes #433

…ilders

`utils/run_info.rs` reimplemented run_info dedup in a shape `merge`/`filter`
no longer use (it was never wired into `utils/mod.rs`, zero call sites) —
superseded by `pod5_assembler::deduplicate_run_infos` and never deleted.

`build_reads_table`/`build_reads_table_remapped` had ~200 lines each of
identical dictionary-collection/partition/concat/batch-write logic, differing
only in input shape (owned pairs vs. borrowed `FlatReadRef`) — already
abstracted at the per-row level by `PartitionRow`/`build_partition_inner`.
Collapsed the surrounding skeleton into one generic `build_reads_table_generic`
with both names as thin wrappers; no behavior or output change.

Closes #433
@jayhesselberth
jayhesselberth merged commit 262e5b2 into main Oct 5, 2026
9 checks passed
@jayhesselberth
jayhesselberth deleted the refactor-table-builders branch October 5, 2026 15:30
@jayhesselberth jayhesselberth mentioned this pull request Oct 6, 2026
jayhesselberth added a commit that referenced this pull request Oct 6, 2026
Patch release.

- Fixed: `merge` no longer produces non-portable output when inputs
don't share one batch stride (#432)
- Internal: dead run_info dedup removed, reads-table builders unified
(#434)

Version bump in root Cargo.toml (workspace + 5 path deps), CHANGELOG
rolled, Cargo.lock regenerated; `cargo check --workspace` clean.

Tag `v0.31.1` on the merge commit after merge (publishes to GitHub
Releases and PyPI).
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.

refactor(pod5): remove dead run_info dedup code, unify build_reads_table duplicates

1 participant