Skip to content

refactor: group short verbs into one file per family - #426

Merged
ihb2032 merged 2 commits into
mainfrom
refactor/merge-small-files
Sep 26, 2026
Merged

ihb2032 merged 2 commits into
mainfrom
refactor/merge-small-files

Conversation

@ihb2032

@ihb2032 ihb2032 commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Two passes over the same theme: same-family short verbs live in one file, so a verb is found by its family.

Pass one — the one-verb-per-file split had left files too small to stand alone:

  • series/reverse.mbt (11 lines) joins series/window.mbt.
  • fill_null + drop_nulls become one null-handling file per package (series/null.mbt, frame/null.mbt).
  • frame/null_count.mbt joins frame/stats.mbt.
  • frame/drop.mbt joins frame/select.mbt.
  • lazy/scan_csv.mbt + scan_ndjson.mbt become lazy/scan.mbt.
  • internal/column/validate.mbt moves into storage.mbt, dropping its one-file-one-test exemption (storage has its own wbtest).

Pass two — the whole-repo pass over the remaining verb files, all in frame:

  • filter + reverse join window.mbt as the row-selection and row-order family (249 lines).
  • rename joins with_columns as columns.mbt, the incremental column-set edits (173), beside select/drop which replace the set wholesale.
  • describe joins stats.mbt as the summary family (298).

Test files follow their verbs. sort and unique stay apart: at 102 / 134 lines with distinct semantics (arrangement, identity) they are not short. series/cast has no family to join. No signature, surface, or behaviour change — mbti and every guard snapshot are untouched; 1434 tests green, coverage fully covered, all guards pass.

The one-verb-per-file split left a few files too small to stand alone.
Series::reverse joins the row-window family it shares a gather machine
with; the null-handling pairs (fill_null + drop_nulls) become one file per
package; DataFrame::null_count joins the same-shaped statistical
summaries; drop joins select as the projection family; the two lazy scan
sources sit beside each other; and the column gather-index validation
moves into the storage seam it serves. Test files follow their verbs. No
signature, surface, or behaviour change - mbti and every snapshot are
untouched.
The whole-repo pass over verb files: filter and reverse join window.mbt
as the row-selection family (filter is the row-selection verb by its own
docstring; reverse / with_row_index are the row-order half), rename joins
with_columns as columns.mbt (the incremental column-set edits, beside
select / drop which replace the set wholesale), and describe joins stats
as the summary family. Test files follow their verbs. No signature,
surface, or behaviour change.
@ihb2032 ihb2032 changed the title refactor: merge single-verb splinters into their verb families refactor: group short verbs into one file per family Sep 26, 2026
@ihb2032
ihb2032 merged commit 1fc490e into main Sep 26, 2026
3 checks passed
@ihb2032
ihb2032 deleted the refactor/merge-small-files branch September 26, 2026 08:46
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