Skip to content

feat: let a labelled level drop its rows from General Statistics - #3

Merged
clintval merged 2 commits into
mainfrom
feat/keep-rows
Oct 8, 2026
Merged

clintval merged 2 commits into
mainfrom
feat/keep-rows

Conversation

@clintval

@clintval clintval commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Lets a labelled level fold its columns onto the group row without keeping its rows beneath it in General Statistics.

What changes

  • Level gains keep_rows (default true, so existing configs render as before).
  • With keep_rows: false, a labelled level's columns still fold onto the group row under their labelled titles, but the rows themselves leave General Statistics. Module sections are untouched, so the rows still appear there.
  • keep_rows: false on a level without a label, or with a table, fails validation: those levels already remove or move their rows.
  • Version 0.2.0.

Example

sample_pivot:
  group: '^(?P<group>[^.]+)\.'
  levels:
    - match: '\.subject$'
    - match: '\.(?P<tissue>tissueA|tissueB)$'
      label: '{tissue}'
    - match: '\.(?P<tissue>tissueA|tissueB) \(filtered\)$'
      label: '{tissue} (filtered)'
      keep_rows: false

Tested

  • UV_NO_CONFIG=1 UV_PYTHON=3.12 uv run --locked poe check-all: format, lint, mypy and basedpyright clean; 31 tests pass at 100% coverage.
  • New config, pivot and end-to-end tests cover the validation, the folded columns and the missing sub-rows.
  • On a 12-subject cohort report, keep_rows: false on one labelled level removed its 24 rows from General Statistics while its module section still listed them.

A labelled level now takes `keep_rows`, which defaults to true. With `keep_rows: false` its columns still fold onto the group row, renamed, placed and titled as before, but the original rows are no longer kept beneath it. Setting it to false on a level without a label, or on a level with a table, is a validation error.
@clintval
clintval merged commit bd67fd9 into main Oct 8, 2026
5 checks passed
@clintval
clintval deleted the feat/keep-rows branch October 8, 2026 15:42
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