hpcflow.sdk.core.parameters.ValueSequence#
- class hpcflow.sdk.core.parameters.ValueSequence(path, values, nesting_order=0, label=None, value_class_method=None)#
Bases:
JSONLike
A sequence of values.
- Parameters:
path (str) – The path to this sequence.
values (List[Any]) – The values in this sequence.
nesting_order (int) – A nesting order for this sequence. Can be used to compose sequences together.
label (str) – A label for this sequence.
value_class_method (str) – Name of a method used to generate sequence values. Not normally used directly.
Methods
Build a sequence from a simple file.
Build a sequence from a NumPy geometric space.
Make an instance of this class from JSON (or YAML) data.
Build a sequence from a NumPy linear space.
Build a sequence from a NumPy logarithmic space.
Build a sequence from a uniform random number generator.
Build a sequence from a range.
Build a sequence to cover a rectangle.
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
The path of the input sequence this is, if it is one.
The type of input sequence this is, if it is one.
True if the values are for a sub part of the parameter.
The labelled type of input sequence this is, if it is one.
The normalised path without the "inputs" prefix, if the sequence is an inputs sequence, else return None.
The path to this sequence.
The parameter this sequence supplies.
The components of ths path.
The type of path this is.
The scope of the resources this is, if it is one.
The values in this sequence.
The workflow containing this sequence.
The path to this sequence.
The label of this sequence.
The nesting order for this sequence.
Name of a method used to generate sequence values.
- classmethod from_file(path, file_path, nesting_order=0, label=None, **kwargs)#
Build a sequence from a simple file.
- classmethod from_geometric_space(path, start, stop, num, nesting_order=0, endpoint=True, label=None, **kwargs)#
Build a sequence from a NumPy geometric space.
- 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.
- classmethod from_linear_space(path, start, stop, num, nesting_order=0, label=None, **kwargs)#
Build a sequence from a NumPy linear space.
- classmethod from_log_space(path, start, stop, num, nesting_order=0, base=10.0, endpoint=True, label=None, **kwargs)#
Build a sequence from a NumPy logarithmic space.
- classmethod from_random_uniform(path, num, low=0.0, high=1.0, seed=None, nesting_order=0, label=None, **kwargs)#
Build a sequence from a uniform random number generator.
- classmethod from_range(path, start, stop, nesting_order=0, step=1, label=None, **kwargs)#
Build a sequence from a range.
- classmethod from_rectangle(path, start, stop, num, coord=None, include=None, nesting_order=0, label=None, **kwargs)#
Build a sequence to cover a rectangle.
- property input_path#
The path of the input sequence this is, if it is one.
- property input_type#
The type of input sequence this is, if it is one.
- property is_sub_value#
True if the values are for a sub part of the parameter.
- label#
The label of this sequence.
- property labelled_type#
The labelled type of input sequence this is, if it is one.
- make_persistent(workflow, source)#
Save value to a persistent workflow.
- nesting_order#
The nesting order for this sequence.
- property normalised_inputs_path#
The normalised path without the “inputs” prefix, if the sequence is an inputs sequence, else return None.
- property normalised_path#
The path to this sequence.
- property parameter#
The parameter this sequence supplies.
- path#
The path to this sequence.
- property path_split#
The components of ths path.
- property path_type#
The type of path this is.
- property resource_scope#
The scope of the resources this is, if it is one.
- to_dict()#
Serialize this object as a dictionary.
- to_json_like(dct=None, shared_data=None, exclude=None, 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.
- value_class_method#
Name of a method used to generate sequence values.
- property values#
The values in this sequence.
- property workflow#
The workflow containing this sequence.