hpcflow.app.InputValue#
- class hpcflow.app.InputValue(parameter, value=None, label=None, value_class_method=None, path=None, _check_obj=True)#
Bases:
InputValue
An input value to a task.
- Parameters:
parameter (Parameter | SchemaInput | str) – Parameter whose value is to be specified.
label (str) – Optional identifier to be used where the associated SchemaInput accepts multiple parameters of the specified type. This will be cast to a string.
value (Any) – The input parameter value.
value_class_method (How to obtain the real value.) – A class method that can be invoked with the value attribute as keyword arguments.
path (str) – Dot-delimited path within the parameter’s nested data structure for which value should be set.
_check_obj (bool) –
Methods
Make an instance of this class from JSON (or YAML) data.
Save value to a persistent workflow.
Serialize this object as a dictionary.
Serialize this object as an object structure that can be trivially converted to JSON.
Attributes
True if the value is for a sub part of the parameter (i.e.
The labelled type of this input value.
The normalised input path without the
inputs.
prefix.The full normalised input path.
The value itself.
The workflow containing this input value.
Parameter whose value is to be specified.
Identifier to be used where the associated SchemaInput accepts multiple parameters of the specified type.
Dot-delimited path within the parameter's nested data structure for which value should be set.
A class method that can be invoked with the value attribute as keyword arguments.
- classmethod from_json_like(json_like, shared_data=None)#
Make an instance of this class from JSON (or YAML) data.
- Parameters:
json_like – The data to deserialise.
shared_data – Shared context data.
- Return type:
The deserialised object.
- property is_sub_value: bool#
True if the value is for a sub part of the parameter (i.e. if path is set). Sub-values are not added to the base parameter data, but are interpreted as single-value sequences.
- label#
Identifier to be used where the associated SchemaInput accepts multiple parameters of the specified type.
- make_persistent(workflow, source)#
Save value to a persistent workflow.
- parameter#
Parameter whose value is to be specified.
- path#
Dot-delimited path within the parameter’s nested data structure for which value should be set.
- to_json_like(dct=None, shared_data=None, exclude=(), path=None)#
Serialize this object as an object structure that can be trivially converted to JSON. Note that YAML can also be produced from the result of this method; it just requires a different final serialization step.
- property value: Any#
The value itself.
- value_class_method#
A class method that can be invoked with the value attribute as keyword arguments.