* The New project toolbar button now works. A druid will display the

available workflows and ask you to select one of them. There are still
   a couple of unresolved issues, but it works, so i upload it to ease
   the use of the program.
This commit is contained in:
2006-04-22 21:46:44 +00:00
parent 357cd1a1a6
commit efcdafe843
7 changed files with 253 additions and 58 deletions

View File

@@ -10,8 +10,9 @@ class Workflow:
task.
"""
name = "Workflow"
def __init__(self, app):
self.name = ''
self.stages = []
self.stages_by_id = {}
self.app = app
@@ -30,6 +31,12 @@ class Workflow:
def add_project(self,project):
self.project = project
class EmptyWorkflow(Workflow):
name = 'Empty Workflow'
def __init__(self, app):
Workflow.__init__(self, None)
class Stage:
"""A stage is a part of the data analysis process.
@@ -70,7 +77,9 @@ class WorkflowView (gtk.VBox):
def __init__(self, wf):
gtk.VBox.__init__(self)
self.workflow = wf
self.setup_workflow(wf)
def setup_workflow(self, wf):
# Add stage in the process
for stage in wf.stages:
exp = gtk.Expander(stage.name)
@@ -90,6 +99,19 @@ class WorkflowView (gtk.VBox):
exp.show()
self.pack_start(exp, expand=False, fill=False)
def remove_workflow(self):
print self.get_children()
for c in self.get_children():
c.hide()
self.remove(c)
def set_workflow(self, workflow):
self.workflow = workflow
self.remove_workflow()
self.setup_workflow(workflow)
print workflow
logger.log('notice', 'Created new workflow')
def run_function(self, function):
logger.log('debug', 'Starting function: %s' % function.name)
project = self.workflow.app.project