cottax.relational.consumers.json module

Registers the JSON Spelling of a relational condition.

RELS = {'eq': <class 'cottax.relational.relational_condition.Eq'>, 'le': <class 'cottax.relational.relational_condition.Le'>}

a new Rel is one line here.

Type:

Each relation by its word in the file

SENSES = {'max': <class 'cottax.relational.relational_condition.Max'>, 'min': <class 'cottax.relational.relational_condition.Min'>}

Each objective’s sense by its word in the file.

TABLES = {'RELS': {'eq': <class 'cottax.relational.relational_condition.Eq'>, 'le': <class 'cottax.relational.relational_condition.Le'>}, 'SENSES': {'max': <class 'cottax.relational.relational_condition.Max'>, 'min': <class 'cottax.relational.relational_condition.Min'>}}

Each table a word in the file is read through, by its name.

word_of(table: dict[str, type], marker: type)[source]

The word table writes marker as, if any.

Return type:

str | None

class RelationalSpelling[source]

Bases: Spelling[RelationalCondition]

The relations, each op by its word in RELS; the objectives, each sense by its word in SENSES; the unknowns and parameters.

kind: AbstractClassVar[str] = 'relational'

How it is referred to in the file.

write[V: Place](node: RelationalCondition[V], w: Writer[Any, V])[source]

The node’s fields; recursive through wrapped nodes (Driven/Implemented)

Return type:

dict

read[V: Place](data: dict, r: Reader[Any, V])[source]

The node data spells: recursive through wrapped nodes (Driven/Implemented)

Return type:

RelationalCondition[V]

class UnknownWord(node: object, table: str, word: str)[source]

Bases: Violation

node: object
table: str
word: str
template: AbstractClassVar[str] = '{node!r}: {word!r} is no entry of `{table}`'

e.g. ‘output {place!r} is owned by both {other!r} and {node!r}’

Type:

Wording