diff --git a/fluent b/fluent index 7162098..a2781d7 100755 --- a/fluent +++ b/fluent @@ -1,9 +1,7 @@ #!/usr/bin/python import sys -sys.path.append('system') -import dialogs import pygtk pygtk.require('2.0') import gtk @@ -11,14 +9,10 @@ import gtk.gdk import gtk.glade import gnome import gnome.ui -import pango -import project -import workflow -import dataset -import logger -import plots -import navigator import scipy +import pango +from system import project, workflow, dataset, logger, plots, navigator, dialogs + PROGRAM_NAME = 'fluent' VERSION = '0.1.0' diff --git a/system/__init__.py b/system/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/system/dataset.py b/system/dataset.py index bb14564..95529ae 100644 --- a/system/dataset.py +++ b/system/dataset.py @@ -1,4 +1,4 @@ -import logger +from system import logger from scipy import atleast_2d,asarray,ArrayType diff --git a/system/dialogs.py b/system/dialogs.py index 2b87cca..efebc5e 100644 --- a/system/dialogs.py +++ b/system/dialogs.py @@ -1,13 +1,11 @@ import pygtk pygtk.require('2.0') import gtk -import gobject -import logger -import project -import workflows -import workflow import sys import os +import gobject +from system import logger, project, workflow +import workflows GLADEFILENAME = 'system/fluent.glade' diff --git a/system/navigator.py b/system/navigator.py index 8bd3e75..d827124 100644 --- a/system/navigator.py +++ b/system/navigator.py @@ -2,9 +2,7 @@ import gtk import gobject import plots -import logger -import dataset -import project +from system import dataset, logger, plots, project class NavigatorView (gtk.TreeView): def __init__(self, project, app): diff --git a/system/plots.py b/system/plots.py index d427fc4..1b2f253 100644 --- a/system/plots.py +++ b/system/plots.py @@ -1,15 +1,14 @@ -import logger import pygtk import gtk import matplotlib import scipy -import project from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas from matplotlib.axes import Subplot from matplotlib.figure import Figure from matplotlib.numerix import arange, sin, pi from matplotlib.widgets import RectangleSelector +from system import logger class MainView (gtk.Notebook): diff --git a/system/project.py b/system/project.py index 5356b55..8c05c6e 100644 --- a/system/project.py +++ b/system/project.py @@ -1,8 +1,8 @@ -import dataset -import plots + import scipy import gobject import gtk +from system import dataset, plots class Project: def __init__(self,name="Testing"): diff --git a/system/workflow.py b/system/workflow.py index 5c1eca8..970be89 100644 --- a/system/workflow.py +++ b/system/workflow.py @@ -1,8 +1,8 @@ import gtk -import logger import sys import os +from system import logger def _workflow_classes(modname): """Returns a list of all subclasses of Workflow in a given module""" diff --git a/workflows/go_workflow.py b/workflows/go_workflow.py index 97d7908..411ca6e 100644 --- a/workflows/go_workflow.py +++ b/workflows/go_workflow.py @@ -1,9 +1,6 @@ import gtk -import logger -from annotations import Annotations -import workflow -import plots -import dataset +from system import dataset, logger, plots, workflow +from system.annotations import Annotations #import geneontology #import gostat from scipy import array,randn,log diff --git a/workflows/pca_workflow.py b/workflows/pca_workflow.py index 4664d9f..91e562f 100644 --- a/workflows/pca_workflow.py +++ b/workflows/pca_workflow.py @@ -1,12 +1,10 @@ import gtk -import logger -import workflow as wf -from workflow import Stage, Function +import system.workflow as wf +from system.workflow import Stage, Function import pickle from scipy import log2,transpose,dot,divide,shape,mean,resize,zeros from scipy.linalg import svd,inv,norm,get_blas_funcs,eig -import plots -import dataset +from system import dataset, logger, plots class PCAWorkflow(wf.Workflow): name = 'PCA Workflow'