hyperstream.utils package¶
Submodules¶
hyperstream.utils.decorators module¶
-
hyperstream.utils.decorators.
check_input_stream_count
(expected_number_of_streams)[source]¶ Decorator for Tool._execute that checks the number of input streams
Parameters: expected_number_of_streams – The expected number of streams Returns: the decorator
-
hyperstream.utils.decorators.
check_output_format
(expected_formats)[source]¶ Decorator for stream outputs that checks the format of the outputs after modifiers have been applied :param expected_formats: The expected output formats :type expected_formats: tuple, set :return: the decorator
hyperstream.utils.errors module¶
-
exception
hyperstream.utils.errors.
FactorAlreadyExistsError
[source]¶ Bases:
exceptions.Exception
-
message
= 'Cannot have duplicate factors - a new factor object should be created'¶
-
-
exception
hyperstream.utils.errors.
NodeAlreadyExistsError
[source]¶ Bases:
exceptions.Exception
-
message
= 'Cannot have duplicate nodes'¶
-
-
exception
hyperstream.utils.errors.
PlateDefinitionError
[source]¶ Bases:
exceptions.Exception
-
message
= 'Empty values in plate definition and complement=False'¶
-
-
exception
hyperstream.utils.errors.
PlateEmptyError
(plate_id)[source]¶ Bases:
exceptions.Exception
-
message
= 'Plate values for {} empty'¶
-
-
exception
hyperstream.utils.errors.
StreamNotAvailableError
(up_to_timestamp)[source]¶ Bases:
exceptions.Exception
-
message
= 'The stream is not available after {} and cannot be calculated'¶
-
hyperstream.utils.serialization module¶
-
hyperstream.utils.serialization.
func_dump
(func)[source]¶ Serialize user defined function. :param func: The function :return: Tuple of code, defaults and closure
hyperstream.utils.time_utils module¶
-
hyperstream.utils.time_utils.
construct_experiment_id
(time_interval)[source]¶ Construct an experiment id from a time interval :return: The experiment id :type time_interval: TimeInterval :rtype: str
-
hyperstream.utils.time_utils.
json_serial
(obj)[source]¶ JSON serializer for objects not serializable by default json code