neofoam.framework.types

Core types: OperationMetadata, OpType, OperationNumber.

class neofoam.framework.types.OpType(value)[source]

Bases: Enum

class neofoam.framework.types.OperationMetadata(op_name: str | None = None, op_type: OpType | None = None, description: str = '', operation_number: OperationNumber | None = None, depends_on: list[str] | None = None, before: list[str] | None = None, domain_name: str | None = None, shape: str = 'box', color: str | None = None, used_by: list[str] = <factory>)[source]

Bases: object

collection of the metadata for operations - describes both decorated functions and DAG nodes.

class neofoam.framework.types.OperationNumber(version: str | int | list[int] | tuple[int, ...])[source]

Bases: object

The operation number of a solver are typically fixed the operation number allows to easily insert new operations between existing ones by incrementing the sub numbers.

Examples:

The solver defines the operations with numbers 1, 2, 3. Now a new operation needs to be added between 1 and 2, so it is assigned the number 1.1. Later another operation is added between 1 and 1.1, which is assigned the number 1.0.1.