neofoam.framework.operations

Operation primitives, adapters, and the Operations container.

class neofoam.framework.operations.Operation(func: ConditionalOp | IterativeOp | SequentialOp, metadata: OperationMetadata = <factory>, level: int = 0, sub_operations: list[Operation] = <factory>)[source]

Bases: object

A concrete operation class that wraps a function with metadata.

Stores an OperationMetadata instance as the single source of truth for name, numbering, dependencies, and visualisation hints.

neofoam.framework.operations.OperationCollection

alias of Operations

class neofoam.framework.operations.Operations(operations: list[Operation] | None = None)[source]

Bases: object

Unified container for Operation objects.

Supports flexible add (single, list, or another Operations), suboperation management, iteration, indexing, and batch execution.