Context
Part of the grouped render-parameter refactor (branch `refactor/grouped-render-params`, PR #274). ArrayGlyph.facet
carried two separate coordinate-label sequences and a matplotlib-style figsize.
Problem / Current Behaviour
facet took col_coords and row_coords as two parallel arguments (pushing the signature over SonarCloud's
python:S107 parameter cap), and used figsize for the shared-figure size.
Affected locations
| File |
Symbol |
Notes |
src/cleopatra/glyphs/gridded/array_glyph.py |
PanelLabels (new) |
bundles col / row panel-title labels |
src/cleopatra/glyphs/gridded/array_glyph.py |
ArrayGlyph.facet |
labels=PanelLabels(...), figsize -> figure_size |
Motivation Example
from cleopatra.glyphs.gridded.array_glyph import ArrayGlyph, PanelLabels
glyph.facet(col="month", labels=PanelLabels(col=["Jan", "Feb", "Mar"]), figure_size=(12, 4))
Proposed Solution
Introduce PanelLabels(col=, row=) for the per-panel titles and rename figsize -> figure_size. Drops
facet back under the S107 parameter cap.
Out of Scope
Renaming the constructor-level figsize option (shared across the Glyph base and every glyph) — deliberately
left unchanged; facet(figure_size=) is currently inconsistent with ArrayGlyph(figsize=).
Effort Estimate
Size: S
Rationale: one small object plus a parameter rename in a single method.
Definition of Done
Context
Part of the grouped render-parameter refactor (branch `refactor/grouped-render-params`, PR #274).
ArrayGlyph.facetcarried two separate coordinate-label sequences and a matplotlib-style
figsize.Problem / Current Behaviour
facettookcol_coordsandrow_coordsas two parallel arguments (pushing the signature over SonarCloud'spython:S107parameter cap), and usedfigsizefor the shared-figure size.Affected locations
src/cleopatra/glyphs/gridded/array_glyph.pyPanelLabels(new)col/rowpanel-title labelssrc/cleopatra/glyphs/gridded/array_glyph.pyArrayGlyph.facetlabels=PanelLabels(...),figsize->figure_sizeMotivation Example
Proposed Solution
Introduce
PanelLabels(col=, row=)for the per-panel titles and renamefigsize->figure_size. Dropsfacetback under the S107 parameter cap.Out of Scope
Renaming the constructor-level
figsizeoption (shared across theGlyphbase and every glyph) — deliberatelyleft unchanged;
facet(figure_size=)is currently inconsistent withArrayGlyph(figsize=).Effort Estimate
Size:
SRationale: one small object plus a parameter rename in a single method.
Definition of Done
PanelLabelsexists andfacetconsumeslabels=facetusesfigure_size