display
Utils for displaying dascore objects.
Functions
|
Name
|
Description
|
|
array_to_text
|
Convert a coordinate to string.
|
|
attrs_to_text
|
Convert pydantic model to text.
|
|
child_sections
|
The blocks a container’s children draw, and a line for any left out.
|
|
counts_to_text
|
Render a mapping of name to count as a: 2, b: 1.
|
|
duration_text
|
How long an extent lasted, as a repr states it.
|
|
elision_text
|
Say how many of something a repr did not show.
|
|
get_dascore_text
|
Get stylized dascore text.
|
|
get_header_text
|
Get the banner which opens the repr of a top-level dascore object.
|
|
get_nice_text
|
Get a rich Text object for formatting nice display for various datatypes.
|
|
group_names
|
Name each row of a group frame by what tells it apart from the others.
|
|
human_duration
|
Say how long something lasted, in the largest unit which fits.
|
|
mapping_to_text
|
Get the “➤ Header” block a mapping of names to values prints as.
|
|
model_to_line
|
Get a one-line summary of a pydantic model.
|
|
percent
|
Say a fraction as a percentage, without rounding a hole away.
|
|
range_texts
|
The two ends of a range, drawn as one range rather than as two values.
|
|
rate_text
|
A sampling step said the way acquisition is quoted, or nothing.
|
|
render_text
|
Render a repr node as rich text.
|
|
span_text
|
How wide an extent is, as a repr states it.
|
|
split_block
|
Turn a block of rendered text into a section.
|
|
stated_fields
|
Return the fields of a pydantic model which state something.
|
Classes
|
Name
|
Description
|
|
NodeRepr
|
Print an object from the repr nodes it states.
|
|
Raw
|
Text whose producer has already laid it out.
|
|
Repr
|
A whole repr: the banner which names the object, then its sections.
|
|
RichRepr
|
Print an object the way its __rich__ renders it.
|
|
Row
|
One record, as the cells a table draws it in.
|
|
Section
|
A titled block: the line which names it, and what sits under it.
|
|
Table
|
Records of one sort, drawn together.
|