fastr Package

fastr Package

Initialize self. See help(type(self)) for accurate signature.

fastr.__init__.__dir__() → list

default dir() implementation

fastr.__init__.__format__()

default object formatter

fastr.__init__.__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

fastr.__init__.__new__()

Create and return a new object. See help(type) for accurate signature.

fastr.__init__.__reduce__()

helper for pickle

fastr.__init__.__reduce_ex__()

helper for pickle

fastr.__init__.__sizeof__() → int

size of object in memory, in bytes

fastr.__init__.__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

exceptions Module

This module contains all Fastr-related Exceptions

exception fastr.exceptions.FastrAttributeError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError, AttributeError

AttributeError in the fastr system

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrCannotChangeAttributeError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

Attempting to change an attribute of an object that can be set only once.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrCardinalityError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

The description of the cardinality is not valid.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrCollectorError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

Cannot collect the results from a Job because of an error

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrDataTypeFileNotReadable(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

Could not read the datatype file.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrDataTypeMismatchError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

When using a DataType as the key for the DataTypeManager, the DataTypeManager found another DataType with the same name already in the DataTypeManager. The means fastr has two version of the same DataType in the system, which should never happen!

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrDataTypeNotAvailableError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

The DataType requested is not found by the fastr system. Typically this means that no matching DataType is found in the DataTypeManager.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrDataTypeNotInstantiableError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

The base classes for DataTypes cannot be instantiated and should always be sub-classed.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrDataTypeValueError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

This value in fastr did not pass the validation specificied for its DataType, typically means that the data is missing or corrupt.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrError(*args, **kwargs)[source]

Bases: Exception

This is the base class for all fastr related exceptions. Catching this class of exceptions should ensure a proper execution of fastr.

__init__(*args, **kwargs)[source]

Constructor for all exceptions. Saves the caller object fullid (if found) and the file, function and line number where the object was created.

__module__ = 'fastr.exceptions'
__repr__()[source]

String representation of the error

Returns:error representation
Return type:str
__str__()[source]

String value of the error

Returns:error string
Return type:str
__weakref__

list of weak references to the object (if defined)

excerpt()[source]

Return a excerpt of the Error as a tuple.

exception fastr.exceptions.FastrErrorInSubprocess(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrExecutionError

Encountered an error in the subprocess started by the execution script

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrExecutableNotFoundError(executable=None, *args, **kwargs)[source]

Bases: fastr.exceptions.FastrExecutionError

The executable could not be found!

__init__(executable=None, *args, **kwargs)[source]

Constructor for all exceptions. Saves the caller object fullid (if found) and the file, function and line number where the object was created.

__module__ = 'fastr.exceptions'
__str__()[source]

String representation of the error

exception fastr.exceptions.FastrExecutionError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

Base class for all fastr execution related errors

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrFileNotFound(filepath, message=None)[source]

Bases: fastr.exceptions.FastrError

Could not find an expected file

__init__(filepath, message=None)[source]

Constructor for all exceptions. Saves the caller object fullid (if found) and the file, function and line number where the object was created.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrIOError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError, OSError

IOError in the fastr system

__module__ = 'fastr.exceptions'
__weakref__

list of weak references to the object (if defined)

exception fastr.exceptions.FastrImportError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError, ImportError

ImportError in the fastr system

__module__ = 'fastr.exceptions'
__weakref__

list of weak references to the object (if defined)

exception fastr.exceptions.FastrIndexError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError, IndexError

IndexError in the fastr system

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrIndexNonexistent(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrIndexError

This is an IndexError for samples requested from a sparse data array. The sample is not there but is probably not there because of sparseness rather than being a missing sample (e.g. out of bounds).

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrKeyError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError, KeyError

KeyError in the fastr system

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrLockNotAcquired(directory, message=None)[source]

Bases: fastr.exceptions.FastrError

Could not lock a directory

__init__(directory, message=None)[source]

Constructor for all exceptions. Saves the caller object fullid (if found) and the file, function and line number where the object was created.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrLookupError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

Could not find specified object in the fastr environment.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrMountUnknownError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrKeyError

Trying to access an undefined mount

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrNetworkMismatchError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

Two interacting objects belong to different fastr network.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrNetworkUnknownError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrKeyError

Reference to a Tool that is not recognised by the fastr system. This typically means the specific id/version combination of the requested tool has not been loaded by the ToolManager.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrNoValidTargetError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrKeyError

Cannot find a valid target for the tool

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrNodeAreadyPreparedError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrStateError

A attempt is made at preparing a NodeRun for the second time. This is not allowed as it would wipe the current execution data and cause data-loss.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrNodeNotPreparedError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrStateError

When trying to access executation data of a NodeRun, the NodeRun must be prepare. The NodeRun has not been prepared by the execution, so the data is not available!

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrNodeNotValidError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrStateError

A NodeRun is not in a valid state where it should be, typically an invalid NodeRun is passed to the executor causing trouble.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrNotExecutableError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrExecutionError

The command invoked by subprocess is not executable on the system

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrNotImplementedError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError, NotImplementedError

This function/method has not been implemented on purpose (e.g. should be overwritten in a sub-class)

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrOSError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError, OSError

OSError in the fastr system

__module__ = 'fastr.exceptions'
__weakref__

list of weak references to the object (if defined)

exception fastr.exceptions.FastrObjectUnknownError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrKeyError

Reference to a Tool that is not recognised by the fastr system. This typically means the specific id/version combination of the requested tool has not been loaded by the ToolManager.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrOptionalModuleNotAvailableError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrNotImplementedError

A optional modules for Fastr is needed for this function, but is not available on the current python installation.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrOutputValidationError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrExecutionError

An output of a Job does not pass validation

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrParentMismatchError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

Two interactive objects have different parent where they should be the same

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrPluginCapabilityNotImplemented(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrNotImplementedError

A plugin did not implement a capability that it advertised.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrPluginNotAvailable(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrKeyError

Indicates that a requested Plugin was not found on the system.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrPluginNotLoaded(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrStateError

The plugin was not successfully loaded. This means the plugin class cannot be instantiated.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrResultFileNotFound(filepath, message=None)[source]

Bases: fastr.exceptions.FastrFileNotFound, fastr.exceptions.FastrExecutionError

Could not found the result file of job that finished. This means the executionscript process was killed during interruption. Generally this means a scheduler killed it because of resource shortage.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrScriptNotFoundError(interpreter=None, script=None, paths=None, *args, **kwargs)[source]

Bases: fastr.exceptions.FastrExecutionError

Script could not be found

__init__(interpreter=None, script=None, paths=None, *args, **kwargs)[source]

Constructor for all exceptions. Saves the caller object fullid (if found) and the file, function and line number where the object was created.

__module__ = 'fastr.exceptions'
__str__()[source]

String value of the error

Returns:error string
Return type:str
exception fastr.exceptions.FastrSerializationError(message, serializer, original_exception=None)[source]

Bases: fastr.exceptions.FastrError

The serialization encountered a serious problem

__init__(message, serializer, original_exception=None)[source]

Constructor for all exceptions. Saves the caller object fullid (if found) and the file, function and line number where the object was created.

__module__ = 'fastr.exceptions'
__repr__()[source]

Simple string representation of the exception

__str__()[source]

Advanced string representation of the exception including the data about where in the schema things went wrong.

exception fastr.exceptions.FastrSerializationIgnoreDefaultError(message, serializer, original_exception=None)[source]

Bases: fastr.exceptions.FastrSerializationError

The value and default are both None, so the value should not be serialized.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrSerializationInvalidDataError(message, serializer, original_exception=None)[source]

Bases: fastr.exceptions.FastrSerializationError

Encountered data to serialize that is invalid given the serialization schema.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrSerializationMethodError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrKeyError

The desired serialization method does not exist.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrSinkDataUnavailableError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrKeyError

Could not find the Sink data for the desire sink.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrSizeInvalidError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

The given size cannot be valid.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrSizeMismatchError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

The size of two object in fastr is not matching where it should.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrSizeUnknownError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

The size of object is not (yet) known and only a theoretical estimate is available at the moment.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrSourceDataUnavailableError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrKeyError

Could not find the Source data for the desire source.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrStateError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

An object is in an invalid/unexpected state.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrSubprocessNotFinished(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrExecutionError

Encountered an error before the subprocess call by the execution script was properly finished.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrToolNotAvailableError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

The tool used is not available on the current platform (OS and architecture
combination) and cannot be used.
__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrToolTargetNotFound(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

Could not determine the location of the tools target binary/script. The tool cannot be used.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrToolUnknownError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrKeyError

Reference to a Tool that is not recognised by the fastr system. This typically means the specific id/version combination of the requested tool has not been loaded by the ToolManager.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrToolVersionError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError

Version mismatch, usually the installed tool version and version requested by the network mismatch.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrTypeError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError, TypeError

TypeError in the fastr system

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrUnknownURLSchemeError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrKeyError

Fastr encountered a data URL with a scheme that was not recognised by the IOPlugin manager.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrValueError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrError, ValueError

ValueError in the fastr system

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrVersionInvalidError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrValueError

The string representation of the version is malformatted.

__module__ = 'fastr.exceptions'
exception fastr.exceptions.FastrVersionMismatchError(*args, **kwargs)[source]

Bases: fastr.exceptions.FastrValueError

There is a mismatch between different parts of the Fastr environment and integrity is compromised.

__module__ = 'fastr.exceptions'
fastr.exceptions.get_message(exception)[source]

Extract the message from an exception is a safe manner

Parameters:exception (BaseException) – exception to extract from
Returns:message string
Return type:str

version Module

This module keeps track of the version of the currently used Fastr framework. It can check its version from mercurial or a saved file

fastr.version.clear_version()[source]

Remove the cached version info

fastr.version.get_base_version()[source]

Get the version from the top-level version file

Return type:Optional[str]
Returns:the version
Rtype str:
fastr.version.get_hg_info()[source]

Read information about the current mercurial branch and revision

Return type:Tuple[Optional[str], Optional[str]]
Returns:tuple containing head revision and branch
fastr.version.get_saved_version()[source]

Get cached version from file

Return type:Tuple[Optional[str], Optional[str], Optional[str]]
Returns:tuple with version, head revision and branch
fastr.version.save_version(current_version, current_hg_head, current_hg_branch)[source]

Cache the version information (useful for when installing)

Parameters:
  • current_version (str) – version
  • current_hg_head (str) – mercurial head revision
  • current_hg_branch (str) – mercurial branch
Returns:

Subpackages