hpcflow.sdk.core.cache.DependencyCache#

class hpcflow.sdk.core.cache.DependencyCache(run_dependencies, run_dependents, iter_run_dependencies, iter_iter_dependencies, elem_iter_dependencies, elem_elem_dependencies, elem_elem_dependents, elem_elem_dependents_rec, elements, iterations)#

Bases: object

Class to bulk-retrieve dependencies between elements, iterations, and runs.

Methods

build

Build a cache instance.

Attributes

run_dependencies

What EARs (by ID) a given EAR depends on.

run_dependents

What EARs (by ID) are depending on a given EAR.

iter_run_dependencies

What EARs (by ID) a given iteration depends on.

iter_iter_dependencies

What iterations (by ID) a given iteration depends on.

elem_iter_dependencies

What iterations (by ID) a given element depends on.

elem_elem_dependencies

What elements (by ID) a given element depends on.

elem_elem_dependents

What elements (by ID) are depending on a given element.

elem_elem_dependents_rec

Transitive closure of elem_elem_dependents.

elements

The elements of the workflow that this cache was built from.

iterations

The iterations of the workflow that this cache was built from.

Parameters:
classmethod build(workflow)#

Build a cache instance.

Parameters:

workflow (Workflow) – The workflow to build the cache from.

Return type:

Self

elem_elem_dependencies: dict[int, set[int]]#

What elements (by ID) a given element depends on.

elem_elem_dependents: dict[int, set[int]]#

What elements (by ID) are depending on a given element.

elem_elem_dependents_rec: dict[int, set[int]]#

Transitive closure of elem_elem_dependents.

elem_iter_dependencies: dict[int, set[int]]#

What iterations (by ID) a given element depends on.

elements: list[Element]#

The elements of the workflow that this cache was built from.

iter_iter_dependencies: dict[int, set[int]]#

What iterations (by ID) a given iteration depends on.

iter_run_dependencies: dict[int, set[int]]#

What EARs (by ID) a given iteration depends on.

iterations: list[ElementIteration]#

The iterations of the workflow that this cache was built from.

run_dependencies: dict[int, set[int]]#

What EARs (by ID) a given EAR depends on.

run_dependents: dict[int, set[int]]#

What EARs (by ID) are depending on a given EAR.