Skip to content

Validate assignments to rcParams-like dictionaries #69

Closed

Description

@lukelbd

The rcParamsShort and rcParamsCustom dictionaries in rctools.py (used to power the rc_configurator) should have restricted keys and automatic entry validation, like rcParams. This can be done using the existing public matplotlib API and the RcParams class. It's a minor issue, maybe post-v1.

Activity

  1. added this to the Version 1 milestone on Nov 28, 2019
  2. lukelbd commented on Jan 8, 2020

    @lukelbd
    CollaboratorAuthor

    This change is ready to be added after the #91 merge

    It probably does need to be included in v1 because otherwise incorrect entries in .proplotrc or assignments to plot.rc are extremely difficult to debug. We can borrow the various validate_* fucntions from matplotlib/rcsetup.py, and might want to also design a new "units" validator (inches, centimeters, etc.) and refactor the units function to use this validator.

  3. modified the milestones: Version 1, Version 0.8 on Jul 21, 2021
  4. lukelbd commented on Jul 30, 2021

    @lukelbd
    CollaboratorAuthor

    This should also pass assignments to rc.cmap and rc.cycle through their respective constructor functions (see #169).

  5. lukelbd commented on Aug 18, 2021

    @lukelbd
    CollaboratorAuthor

    This is finally done 🎉 . All assignments are validated using an rc_proplot dictionary analogous to rc_matplotlib. Decided it would be better to just have a separate minimal validated dictionary for storing my own settings and continuing to use Configurator rather than trying to sync both of them into some giant RcParams overall.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions