hpcflow.sdk.persistence.pending.CommitResourceMap#

class hpcflow.sdk.persistence.pending.CommitResourceMap(commit_tasks=(), commit_loops=(), commit_submissions=(), commit_submission_parts=(), commit_elem_IDs=(), commit_elements=(), commit_element_sets=(), commit_elem_iter_IDs=(), commit_elem_iters=(), commit_elem_iter_EAR_IDs=(), commit_EARs_initialised=(), commit_EARs=(), commit_EAR_submission_indices=(), commit_EAR_skips=(), commit_EAR_starts=(), commit_EAR_ends=(), commit_js_metadata=(), commit_parameters=(), commit_files=(), commit_template_components=(), commit_param_sources=(), commit_loop_indices=(), commit_loop_num_iters=(), commit_loop_parents=())#

Bases: object

Map of PendingChanges commit method names to store resource labels, representing the store resources required by each commit method, for a given PersistentStore

When PendingChanges.commit_all is called, the resources specified will be opened in “update” mode, for each commit_ method.

Methods

group_by_resource

Return a dict whose keys are tuples of resource labels and whose values are lists of PendingChanges commit method names that require those resource.

Attributes

commit_EAR_ends

commit_EAR_skips

commit_EAR_starts

commit_EAR_submission_indices

commit_EARs

commit_EARs_initialised

commit_elem_IDs

commit_elem_iter_EAR_IDs

commit_elem_iter_IDs

commit_elem_iters

commit_element_sets

commit_elements

commit_files

commit_js_metadata

commit_loop_indices

commit_loop_num_iters

commit_loop_parents

commit_loops

commit_param_sources

commit_parameters

commit_submission_parts

commit_submissions

commit_tasks

commit_template_components

Parameters:
  • commit_tasks (Tuple[str] | None) –

  • commit_loops (Tuple[str] | None) –

  • commit_submissions (Tuple[str] | None) –

  • commit_submission_parts (Tuple[str] | None) –

  • commit_elem_IDs (Tuple[str] | None) –

  • commit_elements (Tuple[str] | None) –

  • commit_element_sets (Tuple[str] | None) –

  • commit_elem_iter_IDs (Tuple[str] | None) –

  • commit_elem_iters (Tuple[str] | None) –

  • commit_elem_iter_EAR_IDs (Tuple[str] | None) –

  • commit_EARs_initialised (Tuple[str] | None) –

  • commit_EARs (Tuple[str] | None) –

  • commit_EAR_submission_indices (Tuple[str] | None) –

  • commit_EAR_skips (Tuple[str] | None) –

  • commit_EAR_starts (Tuple[str] | None) –

  • commit_EAR_ends (Tuple[str] | None) –

  • commit_js_metadata (Tuple[str] | None) –

  • commit_parameters (Tuple[str] | None) –

  • commit_files (Tuple[str] | None) –

  • commit_template_components (Tuple[str] | None) –

  • commit_param_sources (Tuple[str] | None) –

  • commit_loop_indices (Tuple[str] | None) –

  • commit_loop_num_iters (Tuple[str] | None) –

  • commit_loop_parents (Tuple[str] | None) –

commit_EAR_ends: Tuple[str] | None = ()#
commit_EAR_skips: Tuple[str] | None = ()#
commit_EAR_starts: Tuple[str] | None = ()#
commit_EAR_submission_indices: Tuple[str] | None = ()#
commit_EARs: Tuple[str] | None = ()#
commit_EARs_initialised: Tuple[str] | None = ()#
commit_elem_IDs: Tuple[str] | None = ()#
commit_elem_iter_EAR_IDs: Tuple[str] | None = ()#
commit_elem_iter_IDs: Tuple[str] | None = ()#
commit_elem_iters: Tuple[str] | None = ()#
commit_element_sets: Tuple[str] | None = ()#
commit_elements: Tuple[str] | None = ()#
commit_files: Tuple[str] | None = ()#
commit_js_metadata: Tuple[str] | None = ()#
commit_loop_indices: Tuple[str] | None = ()#
commit_loop_num_iters: Tuple[str] | None = ()#
commit_loop_parents: Tuple[str] | None = ()#
commit_loops: Tuple[str] | None = ()#
commit_param_sources: Tuple[str] | None = ()#
commit_parameters: Tuple[str] | None = ()#
commit_submission_parts: Tuple[str] | None = ()#
commit_submissions: Tuple[str] | None = ()#
commit_tasks: Tuple[str] | None = ()#
commit_template_components: Tuple[str] | None = ()#
group_by_resource()#

Return a dict whose keys are tuples of resource labels and whose values are lists of PendingChanges commit method names that require those resource.

This grouping allows us to batch up commit methods by resource requirements, which in turn means we can potentially minimise e.g. the number of network requests.

Return type:

Dict[Tuple[str], List[str]]