Output and application reports

SchemaCommandLine (SCL) uses DataCanon (DC) YAML interchange for attribute output. Use DC’s renderers and persistence writers when working with DataCanon Instances (DCIs). Application code is responsible for rounded tables, labels, or other specialized reports.

Render or store a DCI

from data_canon import as_dc_instance, render_shorthand, render_yaml

node = as_dc_instance({"samples": {("sensor", 0): [1.0, 2.0]}})
print(render_shorthand(node))
print(render_yaml(node))

Use write(node, filename="result.dcb") for canonical binary persistence. Shorthand and YAML interchange provide readable representations of the DCI. SCL’s --print-attribute uses that same YAML interchange, including when omit_key requests the value without its external-name wrapper.

Format application reports

An application may choose to round numbers, arrange rows into tables, or add labels. Perform those operations explicitly in application code. An SCL subclass can write such a report in its _operations() hook after construction.

A numerical report is a presentation chosen by the application. If the original DCI must also be retained, store it separately using DC persistence.

Removed formatting interfaces

The former DataSchemer (DS) numpy_print.py and render_data.py modules have been removed, along with their array, Mapping, and labeled-table formatters. SCL no longer supports the precision constructor argument, its precision property or set_precision() method. The precision_from and array_style_from output settings are rejected with migration guidance.

This page remains at its previous URL so existing documentation links continue to resolve. See Attribute output for the supported SCL output configuration.