Package npsgd :: Module model_task :: Class ModelTask
[hide private]
[frames] | no frames]

Class ModelTask

source code

object --+
         |
        ModelTask
Known Subclasses:

Abstract base class for all user-defined models.

Users should create models that inherit from this class. It contains _all_ information specific to a given model including parameters, attachments, titles and methods for producing the e-mails with results.

Instance Methods [hide private]
 
__init__(self, emailAddress, taskId, modelParameters={}, failureCount=0, visibleId=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
createWorkingDirectory(self) source code
 
parameterType(self, parameterName)
Returns an empty version the parameter class for a given parameter name.
source code
 
asDict(self) source code
 
latexBody(self)
Returns the body of the LaTeX PDF used to generate result e-mails.
source code
 
latexParameterTable(self)
Returns LaTeX markup with a table containing the values for all input parameters.
source code
 
textParameterTable(self)
Returns an ascii representation of all parameters (e.g.
source code
 
getAttachments(self) source code
 
prepareGraphs(self)
A step in the standard model run to prepare output graphs.
source code
 
prepareExecution(self)
A step in the standard model run to prepare model execution.
source code
 
generatePDF(self)
Generates a PDF using the LaTeX template, our model's LaTeX body and PDFLatex.
source code
 
failureEmail(self)
Returns an e-mail object for notifying the user of a failure to execute this model.
source code
 
resultsEmail(self, attachments)
Returns an e-mail object for yielding a results e-mail for the user.
source code
 
runModel(self)
Performs model-specific steps for execution.
source code
 
run(self)
Runs the model with parameters, and returns results email object.
source code

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

Class Methods [hide private]
 
fromDict(cls, dictionary) source code
Class Variables [hide private]
  abstractModel = 'ModelTask'
  short_name = 'unspecified_name'
  subtitle = 'Unspecified Subtitle'
  attachments = []
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, emailAddress, taskId, modelParameters={}, failureCount=0, visibleId=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

textParameterTable(self)

source code 

Returns an ascii representation of all parameters (e.g. for the body of e-mails).