Skip to content

refactor(glyphs)!: remove legacy-kwarg shims + widen per-call preset overrides - #287

Merged
MAfarrag merged 32 commits into
mainfrom
review/integration
Aug 11, 2026
Merged

refactor(glyphs)!: remove legacy-kwarg shims + widen per-call preset overrides#287
MAfarrag merged 32 commits into
mainfrom
review/integration

Conversation

@MAfarrag

Copy link
Copy Markdown
Member

Description

Consolidates two bodies of work on top of the squashed grouped-render-parameter refactor (PR #274, already on
main):

  1. Legacy-kwarg-shim removal — deletes every backward-compatibility shim (_resolve_point_overlay,
    _resolve_frame_label, _resolve_renamed_kwarg, _warn_deprecated_cbar_kwargs, _DEPRECATED_CBAR_KWARGS,
    no_elem), renames text_colorscell_value_text_colors and no_elemnum_domain_cells, groups
    facet's coordinate labels into PanelLabels and renames facet(figsize=)figure_size, and adds a
    migration guide (docs/migration.md, wired into the mkdocs nav). Removed keywords now raise a clear error.
  2. Widened per-call preset overrides — extends data_style=DataStyle(...) to extend / levels / bands /
    alpha / alpha_range via a new resolve_style_overrides helper, and vendors the scientific and CAMS
    perceptually-uniform preset sets.

The two streams were reconciled by hand; a two-round /review pass then caught and fixed several fixes the merge
had silently reverted (all with regression tests re-added):

  • error-path option rollback on a failed data_style (ArrayGlyph + KDEGlyph),
  • MeshGlyph Contour(levels=) discretisation,
  • animate(contour=...) on ArrayGlyph + MeshGlyph,
  • KDE apply_style(hillshade=None) clear semantics (the _UNSET_HILLSHADE sentinel),
  • publication_map's style=/data_style= collision guard,
  • plus duplicate/unused imports, stale grouped-params docstrings, and import ordering.

Dependencies: none.

Note: this branch was cut from feat/widen-style-overrides and carries that style work; if that branch keeps
advancing, its later commits are not yet included here and would need reconciling before this merges.

Issues

Type of change

Check relevant points.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Dev changes (CI/pyproject.toml/docs/examples/testing)

How Has This Been Tested?

Run against the external uv environment with the branch's src on PYTHONPATH
(PYTHONPATH=<worktree>/src C:/python-environments/uv/cleopatra/Scripts/python.exe -m pytest ...).

  • Full non-e2e suite green: 2239 passed.
  • Doctests green across every changed module (pytest --doctest-modules src/...).
  • Two-round adversarial /review completed; every must-fix and should-fix finding resolved with a
    regression test, and the previously-deleted guard tests were restored.
  • ruff check introduces no new src/ findings vs main (the ~10 pre-existing main findings are
    unchanged); the branch-introduced test-file I001 violations were fixed.

Checklist:

  • updated version number in pyproject.toml
  • added changes to History.rst
  • updated the latest version in README file
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Follow-up to the grouped render-parameter refactor (#274): drop the
backward-compatible shims for the old loose keywords and complete the
facet parameter grouping.

- remove all deprecation shims (_resolve_point_overlay,
  _resolve_frame_label, _resolve_renamed_kwarg, _warn_deprecated_cbar_kwargs,
  _pop_first) across array_glyph, colorbar, and the six other glyphs
- remove the no_elem alias; rename text_colors to cell_value_text_colors
- group facet coordinate labels into PanelLabels; rename facet figsize
  to figure_size
- add a grouped render-parameter migration guide and wire it into mkdocs
- drop the deprecation tests, unwrap the still-functional
  cbar_*/ticks_spacing tests, and convert bare-array point tests to
  PointOverlay

BREAKING CHANGE: removed loose keywords now raise the ordinary TypeError,
and a bare array for points raises AttributeError. text_colors is renamed
to cell_value_text_colors, no_elem to num_domain_cells, and facet's figsize
to figure_size. Loose cbar_* / ticks_spacing keys still work but no longer
emit a deprecation warning.
Closes #281, #283, #285
…CAMS presets

Rebased the widen-style-overrides work onto the grouped render-parameter
refactor + legacy-kwarg-shim removal (PR #286). Squashes the branch's own
16 commits into one integration commit; all code is preserved, the loose
pre-shim-removal kwargs it relied on are dropped in favour of the group
objects already on main.

- widen per-call DATA_STYLES overrides (extend/levels/bands/alpha/
  alpha_range) via data_style=DataStyle, with resolve_style_overrides()
- vendor the full scientific perceptually-uniform colour-map set and the
  CAMS atmospheric-composition preset set; neutral provenance naming
- DataStyle alpha_range / bands validation and opacity-mode clearing
- keep colour-map download scripts local-only
- add example notebooks and the style-override test suite

Integrated cleanly onto the shim-removed API: full suite 2210 passed.
…CAMS presets

Rebased the widen-style-overrides work onto the grouped render-parameter
refactor + legacy-kwarg-shim removal (PR #286). Squashes the branch's own
16 commits into one integration commit; all code is preserved, the loose
pre-shim-removal kwargs it relied on are dropped in favour of the group
objects already on main.

- widen per-call DATA_STYLES overrides (extend/levels/bands/alpha/
  alpha_range) via data_style=DataStyle, with resolve_style_overrides()
- vendor the full scientific perceptually-uniform colour-map set and the
  CAMS atmospheric-composition preset set; neutral provenance naming
- DataStyle alpha_range / bands validation and opacity-mode clearing
- keep colour-map download scripts local-only
- add example notebooks and the style-override test suite

Integrated cleanly onto the shim-removed API: full suite 2210 passed.
@sonarqubecloud

Copy link
Copy Markdown

@MAfarrag
MAfarrag merged commit cfa90c3 into main Aug 11, 2026
10 checks passed
@MAfarrag
MAfarrag deleted the review/integration branch August 11, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant