fix: wire facet_rows/facet_cols roles to score plots - #20
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal 4 — complete a half-wired feature (pre-1.0 bug fix)
facet_rowsandfacet_colsgroup roles were accepted and validated by the YAML parser (VALID_ROLES,GroupSpec.facet_col_wrap) but nothing in the pipeline consumed them — a config requesting faceting validated cleanly and then produced an unfaceted plot, with no error. This completes the wiring rather than removing the feature.Design
A
FacetGridis 2D and each latent variable is a distinct result that must always be shown, so LV occupies one axis and at most one demographic facet takes the other:col = LV— unchanged behaviour.facet_rows: G:col = LV,row = G.facet_cols: G:col = G,row = LV(LV is no longer hardwired to columns — addresses the "let the user put LV on rows" case).ValueError.facet_col_wrapcontrols LV-column wrapping in the default layout (inert once a row facet exists, perFacetGrid's constraints).Changes
io.GroupConfig:facet_rows_column(),facet_cols_column(),facet_col_wrap()accessors (mirroringhue_column()/x_axis_group()).pipeline._plot_score_boxstrips: resolve the grid layout from those roles and passrow_col/col_wrapthrough (previously hardwiredcol_col="LV").docs/usage.md; CHANGELOG fix entry.Tests (written first, watched fail)
test_io: facet accessors return the role columns /None.test_plotting: realFacetGridgains the expected row/col dimensions (proves the wired params aren't no-ops) — incl. LV-on-rows.test_pipeline::TestFacetWiring: the pipeline maps each config to the correctcol_col/row_col; both-roles raises.All 172 tests pass; ruff clean; coverage 98% (floor 95%).
🤖 Generated with Claude Code