Problem
PlotterBase.settings(url_params=...) currently merges arbitrary keys/values into _url_params with minimal validation.
For downstream tool surfaces, we need reusable strict validation of view-setting payloads (URL params and axis/encoding-like structured settings) with explicit error messages.
Current behavior
settings() effectively does:
res._url_params = dict(self._url_params, **url_params)
Collections have a dedicated validator path, but most settings do not.
Additional audit notes (2026-04-29)
- In Louie/GraphAgent, bad settings are often silently dropped by allowlist/type filters and only logged at debug level.
- Without a canonical strict validator from pygraphistry, downstream integrations duplicate partial checks and drift.
- Axis-related payloads (
encodeAxis, ring axis configs) especially need deep, reusable validation APIs.
Requested behavior
Provide a canonical validation API for settings payloads, for example:
- strict mode that raises on invalid keys/types/ranges
- optional autofix mode for best-effort normalization
- machine-readable schema for valid key/value contracts
This could include helpers to validate:
- URL params (scalar/bool/ranged numeric where appropriate)
- React-style settings values and known complex payloads
- axis-like row structures (for encode axis payloads)
Why this matters
- Makes PyGraphistry validation reusable by downstream integrations.
- Avoids each integration duplicating ad-hoc allowlists and type checks.
- Produces clear, actionable errors for user-facing agent flows.
Related
Problem
PlotterBase.settings(url_params=...)currently merges arbitrary keys/values into_url_paramswith minimal validation.For downstream tool surfaces, we need reusable strict validation of view-setting payloads (URL params and axis/encoding-like structured settings) with explicit error messages.
Current behavior
settings()effectively does:res._url_params = dict(self._url_params, **url_params)Collections have a dedicated validator path, but most settings do not.
Additional audit notes (2026-04-29)
encodeAxis, ring axis configs) especially need deep, reusable validation APIs.Requested behavior
Provide a canonical validation API for settings payloads, for example:
This could include helpers to validate:
Why this matters
Related