hyperstream.utils package

Submodules

hyperstream.utils.decorators module

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.decorators.check_tool_defined(func)[source]

Decorator to check whether a tool stream has been defined before execution :return: the decorator

hyperstream.utils.decorators.timeit(f)[source]

hyperstream.utils.errors module

exception hyperstream.utils.errors.ChannelAlreadyExistsError[source]

Bases: exceptions.Exception

exception hyperstream.utils.errors.ChannelNotFoundError[source]

Bases: exceptions.Exception

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.FactorDefinitionError[source]

Bases: exceptions.Exception

exception hyperstream.utils.errors.IncompatiblePlatesError[source]

Bases: exceptions.Exception

exception hyperstream.utils.errors.LinkageError[source]

Bases: exceptions.Exception

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.StreamAlreadyExistsError[source]

Bases: exceptions.Exception

exception hyperstream.utils.errors.StreamDataNotAvailableError[source]

Bases: exceptions.Exception

exception hyperstream.utils.errors.StreamNotAvailableError(up_to_timestamp)[source]

Bases: exceptions.Exception

message = 'The stream is not available after {} and cannot be calculated'
exception hyperstream.utils.errors.StreamNotFoundError[source]

Bases: exceptions.Exception

exception hyperstream.utils.errors.ToolExecutionError(required_intervals)[source]

Bases: exceptions.Exception

message = 'Tool execution did not cover the time interval {}.'
exception hyperstream.utils.errors.ToolNotFoundError[source]

Bases: exceptions.Exception

hyperstream.utils.time_utils module

hyperstream.utils.time_utils.get_timedelta(value)[source]
hyperstream.utils.time_utils.utcnow()[source]

hyperstream.utils.utils module

class hyperstream.utils.utils.FrozenKeyDict[source]

Bases: dict

class hyperstream.utils.utils.Hashable[source]

Bases: object

name
class hyperstream.utils.utils.HyperStreamLogger(path=u'/tmp', filename=u'hyperstream', loglevel=10)[source]

Bases: hyperstream.utils.utils.Printable

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.Printable[source]

Bases: object

A base class for default printing

class hyperstream.utils.utils.TypedBiDict(key_type, value_type, *args, **kwargs)[source]

Bases: hyperstream.utils.utils.Printable

Custom strongly typed bi-directional dictionary where keys and values must be a specific type. Raises ValueDuplicationError if the same value is added again

items()[source]
iteritems()[source]
iterkeys()[source]
itervalues()[source]
keys()[source]
values()[source]
class hyperstream.utils.utils.TypedFrozenKeyDict(key_type, *args, **kwargs)[source]

Bases: hyperstream.utils.utils.FrozenKeyDict

hyperstream.utils.utils.handle_exception(exc_type, exc_value, exc_traceback)[source]
hyperstream.utils.utils.touch(full_name, times=None)[source]

Module contents