cottax.consumers.visualization.kinds module¶
What a picture reads off a node: the category it draws under, each ring’s, and a key’s entry.
- STATED_TEXT = 'requirement, no unknowns named'¶
What a key says of a condition node with no category.
- STATED_TITLE = 'asserted, determining nothing -- `Determine` it to name its unknowns'¶
What hovering says of one.
- by_name(kinds: Iterable[Kind | None])[source]¶
Each category among kinds by its name, in the order first given (None skipped). Two different categories with one name are refused: a picture would draw one as the other.
- Return type:
dict[str,Kind]
- drawn_of(node: NodeDefinition)[source]¶
How node is drawn as a condition node (a driven node through its condition), None for a node that runs.
- Return type:
Drawn|None
- stated_shape(node: NodeDefinition)[source]¶
The category name a requirement would take once it determines something, None for anything else.
- Return type:
str|None
- block_type(block: Block)[source]¶
The problem type answered at block: a Solve’s problem’s, ‘unanswered’ for several problems with nothing nested, ‘cycle’ for a bare function cycle, None for a block merely run.
- Return type:
str|None
- answered(btype: str | None)[source]¶
Whether a driver answers a solve ring of type btype (block_type): neither several problems with nothing nested nor a bare function cycle.
- Return type:
bool
- ring_stroke(btype: str | None, kinds: Mapping[str, Kind], style: Style)[source]¶
The contour of a solve ring of type btype, kinds the categories drawn by name: the hue of the driver answering it, stated’s grey for a problem with no category, unanswered where no driver answers it.
- Return type:
str
- category_of(node: NodeDefinition)[source]¶
The category node draws under: None for a node that runs and for one drawn ‘stated’ (problem_type_of).
- Return type:
Kind|None
- problem_type_of(node: NodeDefinition)[source]¶
The category name a node draws under: None for a node that runs, ‘stated’ for a condition node with no unknowns or no category.
- Return type:
str|None