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.utils module¶
-
class
hyperstream.utils.utils.HyperStreamLogger(path=u'/tmp', filename=u'hyperstream', loglevel=10, console_logger=True, file_logger=True)[source]¶
-
class
hyperstream.utils.utils.MetaDataTree(tree=None, deep=False)[source]¶ Bases:
treelib.tree.Tree-
DEPTH= 1¶
-
ROOT= 0¶
-
WIDTH= 2¶
-
ZIGZAG= 3¶
-
tree_depth¶
-
-
class
hyperstream.utils.utils.TypedBiDict(key_type, value_type, *args, **kwargs)[source]¶ Bases:
hyperstream.utils.utils.PrintableCustom strongly typed bi-directional dictionary where keys and values must be a specific type. Raises ValueDuplicationError if the same value is added again