hpcflow.sdk.core.cache.ObjectCache#

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

Bases: object

Class to bulk-retrieve and store elements, iterations, runs and their various dependencies.

Methods

build

Build a cache instance.

Attributes

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.

elem_iter_dependencies

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

elements

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

iter_iter_dependencies

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

iter_run_dependencies

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

iterations

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

run_dependencies

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

run_dependents

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

runs

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

Parameters:
classmethod build(workflow, dependencies=False, elements=False, iterations=False, runs=False)#

Build a cache instance.

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

  • dependencies (bool) – If True, calculate dependencies.

  • elements (bool) – If True, include elements in the cache.

  • iterations (bool) – If True, include iterations in the cache.

  • runs (bool) – If True, include runs in the cache.

elem_elem_dependencies: dict[int, set[int]] | None = None#

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

elem_elem_dependents: dict[int, set[int]] | None = None#

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

elem_elem_dependents_rec: dict[int, set[int]] | None = None#

Transitive closure of elem_elem_dependents.

elem_iter_dependencies: dict[int, set[int]] | None = None#

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

elements: list[Element] | None = None#

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

iter_iter_dependencies: dict[int, set[int]] | None = None#

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

iter_run_dependencies: dict[int, set[int]] | None = None#

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

iterations: list[ElementIteration] | None = None#

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

run_dependencies: dict[int, set[int]] | None = None#

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

run_dependents: dict[int, set[int]] | None = None#

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

runs: list[ElementActionRun] | None = None#

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