Some stuff on tasks.

This commit is contained in:
2007-09-03 13:22:11 +00:00
parent 16ed2fd9c9
commit bfb039328c
2 changed files with 29 additions and 276 deletions

View File

@@ -88,12 +88,6 @@ class Workflow:
for fun in stage.functions:
print ' %s' % fun.name
# def add_project(self,project):
# if project == None:
# logger.log('notice','Proejct is empty')
# logger.log('notice','Project added in : %s' %self.name)
# self.project = project
class EmptyWorkflow(Workflow):
name = 'Empty Workflow'
@@ -122,24 +116,32 @@ class Stage:
self.functions_by_id[fun.id] = fun
class Function:
class Task:
"""A Function object encapsulates a function on a data set.
Each Function instance encapsulates some function that can be applied
to one or more types of data.
"""
def __init__(self, id, name):
self.id = id
self.name = name
title = ""
def __init__(self, input):
self.input = input
self.options = Options()
self.datasets = {}
self.arrays = {}
self.plots = {}
# just return a Validation object
def validate_input(input):
return Validation(True,"Validation Not Implemented")
def run(self):
pass
print self.input
def show_options_gui(self, editable=False):
pass
class Validation:
def __init__(self,result, reason):
@@ -461,3 +463,9 @@ class WorkflowMenu (gtk.Menu):
menuitem.show()
return menuitem
class Options():
def __init__(self):
pass