Repository navigation
Export canonical viz-setting key types/constants for downstreams #1234
Copy link
Copy link
Closed
Description
Activity
Closeout receipt for #1234: current master already satisfies the requested canonical viz-setting key contract, so no new PR was needed.
Evidence on
origin/masterat 213d022:- URL params:
URL_PARAM_NAMES,URL_PARAM_NAME_SET,url_param_keys(),URLParamsDict, andKnownURLParamsDictingraphistry.models.surfaces.graphistry_frontend.url_params. - React settings:
REACT_SETTING_NAMES,REACT_SETTING_NAME_SET,react_setting_keys(),ReactSettingsDict, andKnownReactSettingsDictingraphistry.models.surfaces.graphistry_frontend.react_settings. - Apply-encodings React keys:
APPLY_ENCODINGS_REACT_KEYS, set/accessor, and typed payload contracts. - Public export paths:
graphistry.models.surfaces,graphistry.models.surfaces.graphistry_frontend, andgraphistry.validate. - Versioned contract metadata:
graphistry_frontend_contract_version_info(),GRAPHISTRY_FRONTEND_CONTRACT_VERSION, and signature map incontract_version.py. - Changelog already records this as "Validation / settings + axis contracts (feat(validation): expose strict reusable settings validators #1240, feat(gfql): deep axis payload validation for ring_*_layout calls #1239, Guarantee _url_params propagation through gfql_remote(persist=True) server roundtrip #1251)".
Validation:
python3 -m pytest -q graphistry/tests/test_validate_settings.py-> 17 passed.git diff --check-> clean.- Review/no-PR convergence: two no-finding passes; no remaining implementation gap.
- Compiler-plan surface touched: no.
- DGX/cuDF: out of scope; no runtime/DataFrame/cuDF paths touched.
Closing #1234 as implemented by the existing settings-contract surface.
- URL params:
#1234 follow-up implementation receipt:
What changed:
- Added
graphistry.viz_settingsas the public facade for canonical visualization settings contracts. - Exported URL param constants/types:
URL_PARAM_NAMES,URL_PARAM_NAME_SET,URLParamName,URLParamsDict,KnownURLParamsDict. - Exported React settings constants/types:
REACT_SETTING_NAMES,REACT_SETTING_NAME_SET,ReactSettingName,ReactSettingsDict,KnownReactSettingsDict. - Exported combined key surface:
VIZ_SETTING_NAMES,VIZ_SETTING_NAME_SET,VizSettingName. - Re-exported apply-encodings React keys and frontend contract metadata from the same module.
- Added drift tests anchoring the public facade to the canonical owner modules,
Literalaliases,TypedDictannotations, and settings validators.
Validation:
- Local focused:
python3 -m pytest -q graphistry/tests/test_viz_settings.py graphistry/tests/test_validate_settings.py-> 22 passed. - Local lint/types:
./bin/ruff.sh ...and./bin/typecheck.sh ...-> passed. git diff --check-> passed.- Review skill converged: wave 1 found/fixed validator anchoring coverage; waves 2 and 3 no findings.
- Full PR CI green, including changed-line coverage, docs/RTD, core Python matrix, GFQL, pandas compatibility, graphviz, polars, REST, Neo4j, DGL CPU.
- DGX/cuDF skipped: no DataFrame, cuDF, runtime execution, or GPU path touched.
Compiler-plan surface touched: no.
- Added
Metadata
Metadata
Assignees
Labels
No labels
Request: Export canonical Graphistry viz-setting key definitions for downstream type safety
Downstream projects (example: Louie/GraphistryGPT) need to pass and validate Graphistry visualization settings in a typed way, including:
@graphistry/client-api-reactToday, downstreams often end up hardcoding local key unions / allowlists (e.g., Python
Literal[...]+ runtime JSON checks), which creates drift risk and maintenance overhead.Proposed additions in pygraphistry
Please expose a canonical, machine-readable key surface, ideally one or more of:
Exported Python constants
URL_PARAM_NAMES: tuple[str, ...]REACT_SETTING_NAMES: tuple[str, ...](if pygraphistry has/owns that view)Typed schemas/models
TypedDict/ pydantic model for settings payloadsVersioned contract file
Why this helps
Related upstream discussion in graphistry-js:
If useful, we can contribute a PR once maintainers confirm preferred API shape.