Skip to content

styling: validate init_sd / column_config_overrides at the entry points (fast follow of #978) #979

Description

@paddymul

Problem

Fast follow to #978. Once the display-config keys have a type, the same keys need checking at runtime, because most of them arrive from places no type checker ever sees: notebook calls, JSON on the wire, and project display files loaded through exec (server/xorq_loading.py).

Today a malformed value either raises inside style_column — costing that column its styling — or is silently ignored. After #977 the two known cases are ignored: a non-dict ag_grid_specs and a non-list delete_keys (customizations/styling.py:137,143). Silently ignoring a typo conflicts with wanting a broken setup to be obvious; it just moves the failure from loud-and-wrong to quiet-and-wrong.

Suggested fix

Check init_sd and column_config_overrides where they enter, rather than at the point of use:

Keep the guards at the point of use regardless: entry validation can't cover a ColAnalysis subclass that contributes a bad value into the sd from inside the pipeline.

Context

Split out of #978 as the runtime half. Related: #976 (validating the configs styling produces, i.e. the other end of the same pipe), #977 (the guards that prompted this), #971.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions