Skip to content

Figure.grdview: Migrate cmap alias to the new alias system#4443

Merged
seisman merged 3 commits intomainfrom
copilot/migrate-cmap-alias-grdview
Mar 5, 2026
Merged

Figure.grdview: Migrate cmap alias to the new alias system#4443
seisman merged 3 commits intomainfrom
copilot/migrate-cmap-alias-grdview

Conversation

Copy link
Contributor

Copilot AI commented Mar 5, 2026

The cmap parameter in grdview was still using the legacy @use_alias(C="cmap") decorator while the function had already partially adopted the new AliasSystem approach.

Changes

  • Remove C="cmap" from the @use_alias decorator
  • Add cmap: str | None = None as an explicit parameter in the function signature
  • Add C=Alias(cmap, name="cmap") to the AliasSystem call in the function body
  • Add - C = cmap entry to the $aliases docstring section (required for AliasSystem-managed params, unlike @use_alias-managed ones)
# Before
@use_alias(C="cmap", I="shading", f="coltypes", n="interpolation")
def grdview(self, grid, drape_grid=None, ...):
    aliasdict = AliasSystem(
        Jz=Alias(zscale, name="zscale"),
        ...
    )

# After
@use_alias(I="shading", f="coltypes", n="interpolation")
def grdview(self, grid, cmap=None, drape_grid=None, ...):
    aliasdict = AliasSystem(
        C=Alias(cmap, name="cmap"),
        Jz=Alias(zscale, name="zscale"),
        ...
    )

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: seisman <3974108+seisman@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate cmap alias in grdview to new alias system Migrate cmap alias in grdview to the new alias system Mar 5, 2026
@seisman seisman changed the title Migrate cmap alias in grdview to the new alias system Figure.grdview: Migrate cmap alias to the new alias system Mar 5, 2026
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Mar 5, 2026
@seisman seisman added this to the 0.19.0 milestone Mar 5, 2026
@seisman seisman marked this pull request as ready for review March 5, 2026 02:43
@seisman seisman merged commit 783610f into main Mar 5, 2026
20 of 30 checks passed
@seisman seisman deleted the copilot/migrate-cmap-alias-grdview branch March 5, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants