hpcflow.sdk.persistence.json.JsonStoreEAR#

class hpcflow.sdk.persistence.json.JsonStoreEAR(id_, is_pending, elem_iter_ID, action_idx, commands_idx, data_idx, submission_idx=None, skip=False, success=None, start_time=None, end_time=None, snapshot_start=None, snapshot_end=None, exit_code=None, metadata=None, run_hostname=None)#

Bases: StoreEAR[RunMeta, None]

Persisted element action run that is serialized using JSON.

Methods

decode

Initialise a JsonStoreEAR from persistent store EAR data

encode

Prepare store EAR data for the persistent store.

to_dict

Prepare data for the user-facing ElementActionRun object.

update

Return a shallow copy, with specified data updated.

Attributes

end_time

When this EAR finished, if known.

exit_code

The exit code of the underlying executable, if known.

metadata

Metadata concerning e.g.

run_hostname

Where this EAR was submitted to run, if known.

skip

Whether to skip this EAR.

snapshot_end

Snapshot of files at EAR end, if recorded.

snapshot_start

Snapshot of files at EAR start, if recorded.

start_time

When this EAR started, if known.

submission_idx

Which submission contained this EAR, if known.

success

Whether this EAR was successful, if known.

id_

The ID of this element action run.

is_pending

Whether the element action run has changes not yet persisted.

elem_iter_ID

What element iteration owns this EAR.

action_idx

The task schema action associated with this EAR.

commands_idx

The indices of the commands in the EAR.

data_idx

Maps parameter names within this EAR to parameter data indices.

Parameters:
  • id_ (int) –

  • is_pending (bool) –

  • elem_iter_ID (int) –

  • action_idx (int) –

  • commands_idx (list[int]) –

  • data_idx (DataIndex) –

  • submission_idx (int | None) –

  • skip (bool) –

  • success (bool | None) –

  • start_time (datetime | None) –

  • end_time (datetime | None) –

  • snapshot_start (dict[str, Any] | None) –

  • snapshot_end (dict[str, Any] | None) –

  • exit_code (int | None) –

  • metadata (Metadata | None) –

  • run_hostname (str | None) –

action_idx: int#

The task schema action associated with this EAR.

commands_idx: list[int]#

The indices of the commands in the EAR.

data_idx: DataIndex#

Maps parameter names within this EAR to parameter data indices.

classmethod decode(EAR_dat, ts_fmt, context)#

Initialise a JsonStoreEAR from persistent store EAR data

Parameters:
  • EAR_dat (RunMeta) –

  • ts_fmt (str) –

  • context (None) –

Return type:

Self

elem_iter_ID: int#

What element iteration owns this EAR.

encode(ts_fmt, context)#

Prepare store EAR data for the persistent store.

Parameters:
  • ts_fmt (str) –

  • context (None) –

Return type:

RunMeta

end_time: datetime | None = None#

When this EAR finished, if known.

exit_code: int | None = None#

The exit code of the underlying executable, if known.

id_: int#

The ID of this element action run.

is_pending: bool#

Whether the element action run has changes not yet persisted.

metadata: Metadata | None = None#

Metadata concerning e.g. the state of the EAR.

run_hostname: str | None = None#

Where this EAR was submitted to run, if known.

skip: bool = False#

Whether to skip this EAR.

snapshot_end: dict[str, Any] | None = None#

Snapshot of files at EAR end, if recorded.

snapshot_start: dict[str, Any] | None = None#

Snapshot of files at EAR start, if recorded.

start_time: datetime | None = None#

When this EAR started, if known.

submission_idx: int | None = None#

Which submission contained this EAR, if known.

success: bool | None = None#

Whether this EAR was successful, if known.

to_dict()#

Prepare data for the user-facing ElementActionRun object.

Return type:

dict[str, Any]

update(submission_idx=None, skip=None, success=None, start_time=None, end_time=None, snapshot_start=None, snapshot_end=None, exit_code=None, run_hostname=None)#

Return a shallow copy, with specified data updated.

Parameters:
  • submission_idx (int | None) –

  • skip (bool | None) –

  • success (bool | None) –

  • start_time (datetime | None) –

  • end_time (datetime | None) –

  • snapshot_start (dict[str, Any] | None) –

  • snapshot_end (dict[str, Any] | None) –

  • exit_code (int | None) –

  • run_hostname (str | None) –

Return type:

Self