Package schrodinger :: Package tasks :: Module tasks :: Class AbstractTask
[hide private]
[frames] | no frames]

Class AbstractTask

                                    object --+    
                                             |    
ui.qt.appframework2.validation.ValidationMixin --+
                                                 |
                object --+                       |
                         |                       |
         sip.simplewrapper --+                   |
                             |                   |
                   sip.wrapper --+               |
                                 |               |
              PyQt5.QtCore.QObject --+           |
                                     |           |
                      parameters.Param --+       |
                                         |       |
                  parameters.CompoundParam --+   |
                                             |   |
                         parameters.ParamModel --+
                                                 |
                                                AbstractTask
Known Subclasses:

WARNING: as descriptors, instances of this class will not behave normally if used as class variables.

Nested Classes [hide private]

Inherited from parameters.CompoundParam: __metaclass__

Inherited from parameters.Param: NO_VALUE

Instance Methods [hide private]
 
statusChanged(...)
 
__init__(self, reporter=None, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
 
getName(self)
 
start(self)
Start this task.
bool
_start(self)
Override this method in subclasses to implement the actual task starting logic.
 
reportValidation(self, results)
This method is required by ValidationMixin.
 
preProcess(self)
 
preValidate(self)
Override this method for any operations that should be run prior to validation.
 
postStart(self)
Override this method for any operations that should be run immediately after a task is started.
 
isRunning(self)
 
status(self)
 
setStatus(self, status)
 
__str__(self)
str(x)
 
__repr__(self)
repr(x)
 
base_nameChanged(...)
 
nameChanged(...)
 
status_paramChanged(...)

Inherited from ui.qt.appframework2.validation.ValidationMixin: runValidation

Inherited from ui.qt.appframework2.validation.ValidationMixin (private): _validate, _validateChildren

Inherited from parameters.CompoundParam: __eq__, __ne__, fromJson, isDefault, setValue, toDict, toJson

Inherited from parameters.CompoundParam (private): _defaultValue

Inherited from parameters.Param: __get__, __set__, ownerChain, valueChanged

Inherited from PyQt5.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, objectNameChanged, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  base_name = <StringParam:base_name>
  name = <StringParam:name>
  status_param = <StringParam:status_param>

Inherited from parameters.Param: DataClass, is_abstract

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, reporter=None, *args, **kwargs)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

start(self)

 

Start this task. This includes any preprocessing and validation checks. Any failures will prevent the task from running.

_start(self)

 

Override this method in subclasses to implement the actual task starting logic. This is called after all preprocessing and validation have passed.

Returns: bool
whether the task was succesfully started

reportValidation(self, results)

 

This method is required by ValidationMixin. In order to report errors, a reporter object is required (self._reporter). If no reporter is specified, a RuntimeError is raised for any validation errors that are encountered, but good results will allow the task to proceed; warnings are ignored if there is no reporter.

Parameters:
  • results - Set of validation results generated by validate
Returns:
if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
Overrides: ui.qt.appframework2.validation.ValidationMixin.reportValidation

postStart(self)

 

Override this method for any operations that should be run immediately after a task is started. This method is only called if the task was successfully started; returning False from this method provides one last way of marking the task as having failed to start.

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)