Skip to content

feat(gfql): add Plottable schema accessor#1637

Open
lmeyerov wants to merge 4 commits into
masterfrom
feat/plottable-schema-accessor-1632
Open

feat(gfql): add Plottable schema accessor#1637
lmeyerov wants to merge 4 commits into
masterfrom
feat/plottable-schema-accessor-1632

Conversation

@lmeyerov
Copy link
Copy Markdown
Contributor

@lmeyerov lmeyerov commented May 25, 2026

Closes #1632.
Refs #1058.

Summary

  • Add experimental read-only g.schema accessor returning the locally bound GraphSchema or None.
  • Keep the predicate surface minimal: callers can use g.schema is not None.
  • Add anchored bound/unbound/read-only/chained regression tests and docs/changelog coverage.
  • Harden agents/skills/review/SKILL.md so future GitHub PR/issue Markdown bodies are posted through body files instead of inline shell strings.

Design Notes

  • The accessor returns the exact object supplied through bind(schema=...); it does not copy, infer, mutate, or pretty-print schemas.
  • Scope is intentionally local: g.schema does not fetch/hydrate remote dataset schemas, persist schemas to Nexus, or serialize schemas into gfql_remote() requests in this release.
  • Per-type contracts such as Cat, Dog, and Car stay in GraphSchema.node_types: NodeType.name is the stable public type identity and NodeType.labels are GFQL label predicates such as label__Cat.
  • Future remote/backend work should transport a versioned graph-schema envelope derived from GraphSchema.to_arrow() beside gfql_query / gfql_operations, with exact Arrow schema IPC plus a JSON summary for Nexus/viz/REST consumers.
  • Local design receipt: plans/plottable-schema-accessor-1632/design/schema-transport-design.md.
  • No top-level graphistry.schema() accessor was added because graphistry.schema is already the public schema module/export surface and this is plotter-state introspection.
  • Compiler-plan surface touched: no.
  • DGX RAPIDS 25.02/26.02: not run; this does not change GPU/cuDF/dataframe runtime behavior.

LOC Buckets

  • Production: +24 / -1, net +23 LOC
  • Tests: +24 / -0, net +24 LOC
  • Docs/process/changelog: +59 / -3, net +56 LOC

Validation

  • python3 -m pytest -q graphistry/tests/compute/gfql/test_public_schema.py -> 24 passed
  • python3 -m pytest -q docs/test_doc_examples.py -k schema -> 1 passed, 29 deselected
  • ./bin/ruff.sh graphistry/PlotterBase.py graphistry/tests/compute/gfql/test_public_schema.py -> pass
  • ./bin/typecheck.sh graphistry/PlotterBase.py graphistry/Plottable.py graphistry/schema.py -> pass
  • git diff --check -> pass
  • Review skill converged: 2 original clean waves plus post-design/rebase and has_schema() removal follow-up waves, no findings; artifacts at plans/plottable-schema-accessor-1632/final-report.md
  • Full PR CI green on rebased run 26421509425: changed-line coverage, RTD/docs gates, TCK GFQL, GFQL core, docs, full-AI, core-python, Spark, Neo4j, pandas/polars/graphviz, and broad matrix jobs passed.

Sample Usage

schema = graphistry.GraphSchema(...)
g = graphistry.bind(schema=schema)
assert g.schema is schema
assert g.schema is not None
assert graphistry.bind().schema is None

Merge Readiness

Ready for manual review. Branch is rebased over latest origin/master; CI is green; review is required before merge.

@lmeyerov lmeyerov force-pushed the feat/plottable-schema-accessor-1632 branch from 625e792 to 033aac2 Compare May 25, 2026 22:02
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): add public Plottable.schema accessor for typed-schema introspection

1 participant