Skip to content

feat(gfql): add encode call parity - #1584

Merged
lmeyerov merged 1 commit into
masterfrom
codex/issue-1241-encode-call-parity
May 20, 2026
Merged

lmeyerov merged 1 commit into
masterfrom
codex/issue-1241-encode-call-parity

Conversation

@lmeyerov

@lmeyerov lmeyerov commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add GFQL call() safelist/runtime parity for encode_edge_icon and encode_axis.
  • Add typed call() params/overloads for both entry points.
  • Strengthen encode validators for palette string entries and categorical_mapping key/value/default types with anchored diagnostics.
  • Keep execution on the existing generic Plottable call dispatch path.

Closes #1241

New encode entry points

  • encode_edge_icon: maps edge column values to icon encodings through GFQL call(), including categorical_mapping/default_mapping/as_text validation.
  • encode_axis: applies axis rows through GFQL call(), mirroring direct Plottable encode_axis rows behavior.

Validator-error samples

  • encode_edge_icon: Invalid value for parameter 'categorical_mapping' in 'encode_edge_icon': categorical_mapping['email'] must be a string
  • encode_axis: Invalid value for parameter 'rows' in 'encode_axis': rows[1] must be a dictionary
  • encode_point_color: Invalid value for parameter 'palette' in 'encode_point_color': palette[1] must be a string
  • encode_point_size: Invalid value for parameter 'default_mapping' in 'encode_point_size': default_mapping must be a number

LOC buckets

  • Production: +133 / -13, net +120 LOC
  • Tests: +286 / -0, net +286 LOC
  • Changelog/docs: +1 / -0, net +1 LOC

Compiler-plan surface touched

No. This is GFQL public call validation/type parity plus generic Plottable method dispatch; no logical/physical planning semantics, route names, dispatch contracts, diagnostics, source spans, pass manager, schema/type-system, IR metadata, remote schema, or compatibility executor surfaces were changed.

Validation

  • python3 -m pytest -q graphistry/tests/compute/test_gfql_call_validation.py -k "Encode" -> 21 passed, 31 deselected
  • python3 -m pytest -q graphistry/tests/compute/test_call_operations.py -k "encode" -> 2 passed, 12 deselected
  • ./bin/ruff.sh graphistry/compute/gfql/call/validation.py graphistry/models/gfql/types/call.py graphistry/compute/ast.py graphistry/tests/compute/test_gfql_call_validation.py graphistry/tests/compute/test_call_operations.py -> passed
  • ./bin/typecheck.sh graphistry/compute/gfql/call/validation.py graphistry/models/gfql/types/call.py graphistry/compute/ast.py -> passed
  • python3 -m pytest -q graphistry/tests/ -k "encode" -> 51 passed, 6 skipped, 4982 deselected
  • python3 bin/changed_line_coverage.py --data-file .coverage --base-ref origin/master --head-ref HEAD --min-percent 80 --output-dir /tmp/clc-local-1584-rebased -> passed, 69/69 changed executable lines covered in focused local reproduction

@lmeyerov
lmeyerov force-pushed the codex/issue-1241-encode-call-parity branch 2 times, most recently from 5d077e1 to 846f09c Compare May 20, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(gfql): close encoding call parity gaps (encode_edge_icon / encode_axis) + strengthen encode validators

1 participant