hpcflow.sdk.core.test_utils.P1_parameter_cls#

class hpcflow.sdk.core.test_utils.P1_parameter_cls(a, d=None, sub_param=None)#

Bases: ParameterValue

Parameter value handler: p1c

Note

This is a composite value handler.

Methods

CLI_format

CLI_format_group

CLI_parse

custom_CLI_format

custom_CLI_format_prep

Used for testing custom object CLI formatting.

dump_to_HDF5_group

Write this parameter value to an HDF5 group.

from_data

from_file

prepare_JSON_dump

Prepare this parameter value for serialisation as JSON.

save_from_HDF5_group

Extract a parameter value from an HDF5 group.

save_from_JSON

Extract a parameter value from JSON data.

sum

to_dict

Serialise this parameter value as a dictionary.

Attributes

d

sub_param

sub_param_prop

twice_a

a

Parameters:
CLI_format()#
Return type:

str

static CLI_format_group(*objs)#
Return type:

str

classmethod CLI_parse(a_str, double='', e=None)#
Parameters:
  • a_str (str) –

  • double (str | None) –

  • e (str | None) –

a: int#
custom_CLI_format(add=None, sub=None)#
Parameters:
  • add (str | None) –

  • sub (str | None) –

Return type:

str

custom_CLI_format_prep(reps=None)#

Used for testing custom object CLI formatting.

For example, with a command like this:

<<join[delim=”,”](parameter:p1c.custom_CLI_format_prep(reps=4))>>.

Parameters:

reps (str | None) –

Return type:

List[int]

d: int | None = None#
dump_to_HDF5_group(group)#

Write this parameter value to an HDF5 group.

classmethod from_data(b, c)#
classmethod from_file(path)#
prepare_JSON_dump()#

Prepare this parameter value for serialisation as JSON.

Return type:

Dict

classmethod save_from_HDF5_group(group, param_id, workflow)#

Extract a parameter value from an HDF5 group.

Parameters:

param_id (int) –

classmethod save_from_JSON(data, param_id, workflow)#

Extract a parameter value from JSON data.

Parameters:

param_id (int) –

sub_param: P1_sub_parameter_cls | None = None#
property sub_param_prop#
static sum(*objs, **kwargs)#
Return type:

str

to_dict()#

Serialise this parameter value as a dictionary.

property twice_a#