feat(schema): add pretty print helpers - #1639
Conversation
559990f to
469ae25
Compare
469ae25 to
5eda119
Compare
|
Parking this PR for now. The pretty-printer surfaced a deeper schema-model question that should be decided first: #1644. Specifically, per-entity declarations probably should not inherit the aggregate table nullable default. A declared Until #1644 is resolved, this PR should not encode nullability display conventions or merge as the canonical schema text surface. Options after #1644:
CI is green and review skill had converged, but this is now semantically blocked, not technically blocked. |
|
Closing as stale (untouched since May). Pretty-print helpers are cosmetic on top of #1637's accessor; if the schema-accessor line revives (it is newly relevant -- the merged typed-facts work #1858+ reads _gfql_schema via getattr and deserves a public surface), this re-emerges as part of that, not as a standalone. |
Closes #1633
Summary
pretty()methods forGraphSchema,NodeType,EdgeType, andEdgeTopologywithcypher,yaml, andcompactformats.__repr__to use the compact Cypher-style renderer by default.graphistry.schema.pretty_print_schema()and top-levelgraphistry.pretty_print_schemafor ergonomic rendering.Sample output
cypher
yaml
compact
LOC buckets
Compiler-plan surface touched
No. This is public schema text rendering only. It does not change schema dataclass fields, inference, serialization, binder/compiler behavior, route names, IR metadata, remote schema transport, or planner/verifier contracts.
Notes
int64andstring; non-null declared Arrow fields render with a compact!suffix, e.g.int64!.Validation
python3 -m pytest -q graphistry/tests/compute/gfql/test_public_schema.py->28 passed./bin/ruff.sh graphistry/schema.py graphistry/__init__.py graphistry/tests/compute/gfql/test_public_schema.py-> passed./bin/typecheck.sh graphistry/schema.py graphistry/__init__.py-> passed./bin/check_docs_latex_unicode.sh-> passedgit diff --check-> passed