working test ... for real
This commit is contained in:
parent
9a296f59f6
commit
5a1e225a08
|
@ -138,7 +138,7 @@ class Task:
|
||||||
return Validation(True, "Validation Not Implemented")
|
return Validation(True, "Validation Not Implemented")
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
print self.input
|
pass
|
||||||
|
|
||||||
def show_options_gui(self, editable=False):
|
def show_options_gui(self, editable=False):
|
||||||
pass
|
pass
|
||||||
|
@ -190,25 +190,23 @@ class WorkflowView (gtk.VBox):
|
||||||
self.remove_workflow()
|
self.remove_workflow()
|
||||||
self.setup_workflow(workflow)
|
self.setup_workflow(workflow)
|
||||||
|
|
||||||
def run_task(self, task):
|
def run_task(self, task_class):
|
||||||
logger.log('debug', 'Creating task: %s' % task.name)
|
logger.log('debug', 'Creating task: %s' % task_class.name)
|
||||||
parent_data = main.project.current_data
|
parent_data = main.project.current_data
|
||||||
task_instance = task(input=["hei"])
|
task = task_class(input=parent_data)
|
||||||
print task_instance.input
|
validation = task.validate_input()
|
||||||
1/0
|
|
||||||
#validation = task.validate_input()
|
|
||||||
|
|
||||||
#if not validation.succeeded:
|
if not validation.succeeded:
|
||||||
# logger.log('warning','Invalid Inputdata: ' + str(reason))
|
logger.log('warning','Invalid Inputdata: ' + str(reason))
|
||||||
# return
|
return
|
||||||
|
|
||||||
#task_result = task.run(*parent_data)
|
task_result = task.run()
|
||||||
|
|
||||||
|
|
||||||
#if new_data != None:
|
if task_result != None:
|
||||||
# main.project.add_data(parent_data, task_result, task.name)
|
main.project.add_data(parent_data, task_result, task.name)
|
||||||
#else:
|
else:
|
||||||
# logger.log('debug', 'Task gave no output: %s' % task.name)
|
logger.log('debug', 'Task gave no output: %s' % task.name)
|
||||||
|
|
||||||
logger.log('debug', 'Task ended: %s' % task.name)
|
logger.log('debug', 'Task ended: %s' % task.name)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import gtk
|
||||||
from fluents import dataset, logger, plots, workflow
|
from fluents import dataset, logger, plots, workflow
|
||||||
#import geneontology
|
#import geneontology
|
||||||
#import gostat
|
#import gostat
|
||||||
from scipy import array, randn, log, ones
|
from scipy import array, randn, log, ones, newaxis
|
||||||
import cPickle
|
import cPickle
|
||||||
import networkx
|
import networkx
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ class TestDataTask(workflow.Task):
|
||||||
logger.log('notice', 'Injecting foo test data')
|
logger.log('notice', 'Injecting foo test data')
|
||||||
x = randn(500,15)
|
x = randn(500,15)
|
||||||
X = dataset.Dataset(x)
|
X = dataset.Dataset(x)
|
||||||
p = plots.ScatterPlot(X, X, 'rows', 'rows', '0_1', '0_2',name='scatter')
|
dname = X.get_dim_name()[0]
|
||||||
# p2 = plots.ScatterMarkerPlot(X, X, 'rows', 'rows', '0_1', '0_2',name='marker')
|
p = plots.ScatterPlot(X, X, dname, dname, '0_1', '0_2',name='scatter')
|
||||||
graph = networkx.XGraph()
|
graph = networkx.XGraph()
|
||||||
for x in 'ABCDEF':
|
for x in 'ABCDEF':
|
||||||
for y in 'ADE':
|
for y in 'ADE':
|
||||||
|
@ -41,13 +41,12 @@ class TestDataTask(workflow.Task):
|
||||||
ds_plot = plots.NetworkPlot(ds)
|
ds_plot = plots.NetworkPlot(ds)
|
||||||
|
|
||||||
cds = dataset.CategoryDataset(ones([3, 3]))
|
cds = dataset.CategoryDataset(ones([3, 3]))
|
||||||
ds_scatter = plots.ScatterMarkerPlot(ds, ds,
|
dname2 = cds.get_dim_name()[0]
|
||||||
'rows_0', 'rows_0',
|
ds_scatter = plots.ScatterMarkerPlot(cds, cds, dname2, dname2, '0_1', '0_2')
|
||||||
'0_1', '0_2')
|
|
||||||
lp = plots.LineViewPlot(X ,major_axis=0)
|
lp = plots.LineViewPlot(X ,major_axis=0)
|
||||||
vp = plots.VennPlot()
|
vp = plots.VennPlot()
|
||||||
self.datasets = [p]
|
self.datasets = [p]
|
||||||
return [X, ds, p, ds_plot, ds_scatter, p2, cds, lp, vp]
|
return [X, ds, p, ds_plot, ds_scatter, cds, lp, vp]
|
||||||
|
|
||||||
|
|
||||||
class TestPlot(workflow.Task):
|
class TestPlot(workflow.Task):
|
||||||
|
@ -60,6 +59,7 @@ class TestPlot(workflow.Task):
|
||||||
logger.log('notice', 'Injecting foo test data')
|
logger.log('notice', 'Injecting foo test data')
|
||||||
x = randn(500,15)
|
x = randn(500,15)
|
||||||
X = dataset.Dataset(x)
|
X = dataset.Dataset(x)
|
||||||
p = plots.ScatterPlot(X, X, 'rows', 'rows', '0_1', '0_2',name='scatter')
|
ii = X.get_dim_name()
|
||||||
|
p = plots.ScatterPlot(X, X, ii[0], ii[0], '0_1', '0_2',name='scatter')
|
||||||
|
|
||||||
return [p]
|
return [p]
|
||||||
|
|
Reference in New Issue