Skip to content

refactor(glyphs)!: remove legacy-kwarg shims and rename attributes #283

Description

@MAfarrag

Context

Part of the grouped render-parameter refactor (branch `refactor/grouped-render-params`, PR #274). Once the group
objects existed, the temporary backward-compat shims for the old loose keywords are no longer wanted — a clean
break plus a migration guide is preferred over long-lived shims.

Problem / Current Behaviour

Deprecation shims kept the old keywords working behind DeprecationWarnings, adding maintenance cost and
obscuring the new API.

Affected locations

File Symbol Notes
src/cleopatra/glyphs/gridded/array_glyph.py _resolve_point_overlay, _resolve_frame_label, _resolve_renamed_kwarg, _pop_first removed
src/cleopatra/styling/colorbar.py _warn_deprecated_cbar_kwargs, _DEPRECATED_CBAR_KWARGS removed (imported by 7 glyphs)
src/cleopatra/glyphs/gridded/array_glyph.py ArrayGlyph.no_elem removed (use num_domain_cells)
src/cleopatra/glyphs/gridded/array_glyph.py text_colors renamed to cell_value_text_colors

BREAKING CHANGE

Removed keywords now raise the ordinary TypeError (unexpected keyword argument); a bare (N, 3) array as
points raises AttributeError instead of being auto-wrapped. Loose cbar_* / ticks_spacing keys still
work (only their deprecation warning is removed). Migration steps: see the migration guide.

Proposed Solution

Delete every shim helper and the no_elem alias; give cell_value_text_colors a real default; require
PointOverlay / FrameLabel objects. _Unset/_UNSET are retained (used by the hillshade sentinel).

Out of Scope

The migration guide (separate docs issue).

Effort Estimate

Size: M
Rationale: deletions spread across 8 source modules plus test cleanup.

Definition of Done

  • all shim helpers and no_elem removed
  • renamed attributes have real defaults
  • removed kwargs raise the natural error (no warning path)
  • deprecation tests removed; functional tests unwrapped/updated
  • all existing tests continue to pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpythonPull requests that update python code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions