Context
pyramids folds the loose plot kwargs into the typed specs at the render_array boundary — cbar_* →
colorbar=ColorBar(...), point_*/pid_* → points=PointOverlay(...), a dict basemap → Basemap(...) — so
cleopatra only ever sees the typed form (PR #930). The facet path is the one exception: it is skipped because
cleopatra's ArrayGlyph.facet does not accept colorbar=ColorBar (only the loose cbar_* kwargs, like the mesh
glyph), so faceting keeps the loose forms. Filed upstream as serapeum-org/cleopatra#256.
Related: #926, #930 (the fold), #933 (the mesh half), cleopatra#256.
Problem
Because of the cleopatra facet gap, render_array carries a facet special-case:
src/pyramids/dataset/_plot_helpers.py — the if mode != "facet": guard that skips
_migrate_deprecated_plot_specs, plus the cbar_* kept in RENDER_ONLY_OVERRIDES so the loose kwargs still
reach cleo.facet and render.
The consequence: faceted plots stay on the deprecated loose cbar_* with no migration nudge, and the plot API is
inconsistent (plot/animate fold to the typed spec; facet does not).
Blocked by
serapeum-org/cleopatra#256 — "accept colorbar=ColorBar on ArrayGlyph.facet (+ warn on loose cbar_*)".
Do this once that lands in a cleopatra release pyramids adopts.
Affected locations
| File |
Symbol |
Change |
src/pyramids/dataset/_plot_helpers.py |
render_array |
drop the if mode != "facet": guard; drop cbar_* from RENDER_ONLY_OVERRIDES; remove the TODO(cleopatra#256) comment |
tests/dataset/plot/test_new_render_params.py |
test_deprecated_cbar_kwarg_renders_on_the_facet_path |
update: facet now folds cbar_* → ColorBar like plot/animate |
Proposed Solution
Once cleopatra#256 ships and the [viz] floor is bumped:
- Remove the
mode != "facet" guard so _migrate_deprecated_plot_specs runs for facet too (folds cbar_* →
ColorBar, point_* → PointOverlay).
- Remove the
cbar_* entries from RENDER_ONLY_OVERRIDES (leaving only {"kind"}) — no longer needed once the
loose kwargs are folded before the split.
- Rework the facet test to assert the fold (a loose
cbar_* on facet → colorbar=ColorBar + DeprecationWarning).
- Delete the
TODO(cleopatra#256) breadcrumb.
Effort Estimate
Size: S — a guard/override deletion + one test rework, gated on the cleopatra bump.
Definition of Done
Context
pyramids folds the loose plot kwargs into the typed specs at the
render_arrayboundary —cbar_*→colorbar=ColorBar(...),point_*/pid_*→points=PointOverlay(...), adictbasemap →Basemap(...)— socleopatra only ever sees the typed form (PR #930). The facet path is the one exception: it is skipped because
cleopatra's
ArrayGlyph.facetdoes not acceptcolorbar=ColorBar(only the loosecbar_*kwargs, like the meshglyph), so faceting keeps the loose forms. Filed upstream as serapeum-org/cleopatra#256.
Related: #926, #930 (the fold), #933 (the mesh half), cleopatra#256.
Problem
Because of the cleopatra facet gap,
render_arraycarries a facet special-case:src/pyramids/dataset/_plot_helpers.py— theif mode != "facet":guard that skips_migrate_deprecated_plot_specs, plus thecbar_*kept inRENDER_ONLY_OVERRIDESso the loose kwargs stillreach
cleo.facetand render.The consequence: faceted plots stay on the deprecated loose
cbar_*with no migration nudge, and the plot API isinconsistent (plot/animate fold to the typed spec; facet does not).
Blocked by
serapeum-org/cleopatra#256 — "accept
colorbar=ColorBaronArrayGlyph.facet(+ warn on loosecbar_*)".Do this once that lands in a cleopatra release pyramids adopts.
Affected locations
src/pyramids/dataset/_plot_helpers.pyrender_arrayif mode != "facet":guard; dropcbar_*fromRENDER_ONLY_OVERRIDES; remove theTODO(cleopatra#256)commenttests/dataset/plot/test_new_render_params.pytest_deprecated_cbar_kwarg_renders_on_the_facet_pathcbar_*→ColorBarlike plot/animateProposed Solution
Once cleopatra#256 ships and the
[viz]floor is bumped:mode != "facet"guard so_migrate_deprecated_plot_specsruns for facet too (foldscbar_*→ColorBar,point_*→PointOverlay).cbar_*entries fromRENDER_ONLY_OVERRIDES(leaving only{"kind"}) — no longer needed once theloose kwargs are folded before the split.
cbar_*on facet →colorbar=ColorBar+DeprecationWarning).TODO(cleopatra#256)breadcrumb.Effort Estimate
Size:
S— a guard/override deletion + one test rework, gated on the cleopatra bump.Definition of Done
[viz]floor includes itcbar_*intoColorBar(nomode != "facet"special-case)RENDER_ONLY_OVERRIDESis back to{"kind"}; theTODO(cleopatra#256)comment is gone