schrodinger.tasks.tasks_ module¶
-
class
schrodinger.tasks.tasks_.
ExceptionInfo
(value, traceback)¶ Bases:
tuple
-
traceback
¶ Alias for field number 1
-
value
¶ Alias for field number 0
-
-
class
schrodinger.tasks.tasks_.
Status
¶ Bases:
enum.IntEnum
An enumeration.
-
NOTRUNNING
= 0¶
-
STARTING
= 1¶
-
RUNNING
= 2¶
-
FAILED
= 3¶
-
DONE
= 4¶
-
-
schrodinger.tasks.tasks_.
wait
(self, timeout=None)¶ Block until the task is finished executing or
timeout
seconds have passed.Parameters: timeout (NoneType or int) – Amount of time in seconds to wait before timing out. If None or a negative number, this method will wait until the task is finished.
-
class
schrodinger.tasks.tasks_.
AbstractTask
¶ Bases:
schrodinger.ui.qt.appframework2.validation.ValidationMixin
,schrodinger.models.parameters.ParamModel
-
input
¶ Inherit all functionality of
CompoundParam
with name that designates this class as a model. Models should themselves be parameters so that their corresponding view can be easily incorporated into a parent view. In this case, the model of the parent view will contain the model of the child view as a parameter.WARNING: as descriptors, instances of this class will not behave normally if used as class variables.
-
output
¶ Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:
class Owner(object): data_x = IntParam() data_y = IntParam()
An instance of the Owner class can be created normally, and Params can be accessed as normal attributes:
owner_instance = Owner() owner_instance.data_x = 4
When a Param value is set, the
valueChanged
signal is emitted. Params can be serialized and deserialized to and from JSON.Warning
As descriptors, instances of this class will not behave correctly if used as class variables.
Variables: - DataClass (type) – The type of data the param describes.
- is_abstract (bool) – Whether this param is an abstract (ie class attribute) param.
- valueChanged (QtCore.pyqtSignal) – A signal emitted whenever the param is changed.
- default_value (DataClass) – The default value of the param. If unset, the default
value is whatever value is created when calling
DataClass()
- param_name (str) – The name of the attribute this param is set as. For
example,
Owner.data_x.param_name
would be ‘data_x’. - instance_attr_name (str) – The name of the attribute used to store param values on instances.
- abstract_attr_name (str) – The name of the attribute used to store abstract params on class objects.
-
name
¶
-
status
¶
-
statusChanged
¶
-
start
()¶
-
postprocess
()¶
-
preprocess
()¶
-
wait
(timeout=None)¶ Block until the task is finished executing or
timeout
seconds have passed.Parameters: timeout (NoneType or int) – Amount of time in seconds to wait before timing out. If None or a negative number, this method will wait until the task is finished.
-
inputChanged
¶
-
nameChanged
¶
-
outputChanged
¶
-
-
class
schrodinger.tasks.tasks_.
AbstractFunctionTask
¶ Bases:
schrodinger.tasks.tasks_.AbstractTask
-
start
()¶
-
mainFunction
()¶
-
-
class
schrodinger.tasks.tasks_.
BlockingFunctionTask
¶
-
class
schrodinger.tasks.tasks_.
ThreadFunctionTask
(*args, **kwargs)¶ Bases:
schrodinger.tasks.tasks_.AbstractFunctionTask
-
wait
(timeout=None)¶ Block until the task is finished executing or
timeout
seconds have passed.Parameters: timeout (NoneType or int) – Amount of time in seconds to wait before timing out. If None or a negative number, this method will wait until the task is finished.
-
-
class
schrodinger.tasks.tasks_.
SubprocessCmdTask
¶ Bases:
schrodinger.tasks.tasks_.AbstractTask
-
makeCmd
()¶
-
start
()¶
-
wait
(timeout=None)¶ Block until the task is finished executing or
timeout
seconds have passed.Parameters: timeout (NoneType or int) – Amount of time in seconds to wait before timing out. If None or a negative number, this method will wait until the task is finished.
-
kill
()¶
-
-
class
schrodinger.tasks.tasks_.
TaskManager
(TaskClass, base_name=None)¶ Bases:
schrodinger.models.parameters.ParamModel
-
taskStarted
¶
-
taskEnded
¶
-
taskStatusChanged
¶
-
NAME_NOT_UNIQUE_MSG
= 'Task name is not unique.'¶
-
status
¶
-
statusChanged
¶
-
wait
(timeout=None)¶
-
removeTask
(task)¶
-
nextTask
()¶
-
getTaskByName
(name)¶
-