Commits

mitar committed b8852fd

Fixing imports.

  • Participants
  • Parent commits 9cf919d

Comments (0)

Files changed (19)

Orange/bioinformatics/widgets/OWFeatureSelection.py

     return f
 
 from Orange.orng.orngDataCaching import data_hints
+
 from .OWGenotypeDistances import SetContextHandler
 from .OWVulcanoPlot import LabelSelectionWidget
 

Orange/bioinformatics/widgets/prototypes/OWANOVA.py

 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
 """
 
+from __future__ import absolute_import
+
 import numpy.oldnumeric as Numeric, numpy.oldnumeric.ma as MA
-from OWWidget import *
-import OWGUI
-#import qt, qwt
+import scipy.stats
 
-from OWDataFiles import DataFiles, ExampleSelection
-import Anova, scipy.stats
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
 
+from .. import Anova
+from .OWDataFiles import DataFiles, ExampleSelection
 
 class OWANOVA(OWWidget):
     settingsList  = ["anovaType", "compareToValue", "_interaction", "selectorA", "selectorB", "selectorI", "alphaA", "alphaB", "alphaI", "autoUpdateSelName", "sendNotSelectedData", "sendProbabilities", "commitOnChange"]
 
 
 if __name__=="__main__":
-    import OWDataFiles, OWDataFilesSelector, OWDataTable, orngSignalManager
+    from . import OWDataFiles, OWDataFilesSelector
+    from Orange.orng import orngSignalManager
+    from Orange.OrangeWidgets.Data import OWDataTable
 
     signalManager = orngSignalManager.SignalManager(0)
     a=QApplication(sys.argv)

Orange/bioinformatics/widgets/prototypes/OWApproxProfiles.py

 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
 """
 
-from OWWidget import *
-import OWGUI
-from OWDataFiles import DataFiles
+from __future__ import absolute_import
+
 import numpy.oldnumeric as Numeric
-import chipstat
-import chipappx
 
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
+
+from .. import chipappx, chipstat
+from .OWDataFiles import DataFiles
 
 class OWApproxProfiles(OWWidget):
     settingsList  = ['kernel', 'kernelSize', 'useSignificance', 'alpha', 'commitOnChange']

Orange/bioinformatics/widgets/prototypes/OWDataDistance.py

 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
 """
 
-import numpy.oldnumeric as Numeric, numpy.oldnumeric.ma as MA
-import statc
-import orange, OWGUI
+from __future__ import absolute_import
+
 from qt import *
 from qtcanvas import *
-from OWWidget import *
-from OWDataFiles import DataFiles
+
+import numpy.oldnumeric as Numeric, numpy.oldnumeric.ma as MA
+
+import orange, statc
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
+
+from .OWDataFiles import DataFiles
 
 import warnings
 warnings.filterwarnings("ignore", "'strain'", orange.AttributeWarning)
 ###########################################################################
 
 if __name__=="__main__":
-    import OWDataFiles, orngSignalManager
+    from . import OWDataFiles
+    from Orange.orng import orngSignalManager
     signalManager = orngSignalManager.SignalManager(0)
     a=QApplication(sys.argv)
     ow=OWDataDistance(signalManager = signalManager)

Orange/bioinformatics/widgets/prototypes/OWDataFiles.py

 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
 """
 
-from OWWidget import *
-import OWGUI
-import os, os.path, orange
+import os, os.path
+
+import orange
+from Orange.OrangeWidgets.OWWidget import *
+from Orange.OrangeWidgets import OWGUI
 
 import warnings
 warnings.filterwarnings("ignore", "'strain'", orange.AttributeWarning)

Orange/bioinformatics/widgets/prototypes/OWDataFilesSave.py

 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
 """
 
-from OWWidget import *
-import OWGUI
+from __future__ import absolute_import
+
 import os, orange
-from OWDataFiles import DataFiles
 
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
+
+from .OWDataFiles import DataFiles
 
 class OWDataFilesSave(OWWidget):
     settingsList  = ["recentDirs", "selectedDirName"]

Orange/bioinformatics/widgets/prototypes/OWDataFilesSelector.py

 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
 """
 
-from OWWidget import *
-import OWGUI
-from OWDataFiles import DataFiles, ExampleSelection
+from __future__ import absolute_import
 
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
+
+from .OWDataFiles import DataFiles, ExampleSelection
 
 class OWDataFilesSelector(OWWidget):
     settingsList  = ["applyOnChange"]

Orange/bioinformatics/widgets/prototypes/OWDifferentiationScale.py

 <description></description>
 """
 
+from __future__ import absolute_import
+
 import os, sys
+import random
+from collections import defaultdict
+from operator import itemgetter, add
+
 import numpy
-import random
 
-import obiDifscale
 import Orange
-from operator import itemgetter, add
-from collections import defaultdict
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
 
-from OWWidget import *
-import OWGUI
+from ... import obiDifscale
 
 class OWDifferentiationScale(OWWidget):
     def __init__(self, parent=None, signalManager=None, title="Differentiation Scale"):
         self.selection_changed_flag = False
         
     def save_graph(self):
-        from OWDlgs import OWChooseImageSizeDlg
+        from Orange.OrangeWidgets.OWDlgs import OWChooseImageSizeDlg
         dlg = OWChooseImageSizeDlg(self.scene, parent=self)
         dlg.exec_()
     
     w.set_data(data)
     w.handleNewSignals()
     app.exec_()
-    w.saveSettings()
+    w.saveSettings()

Orange/bioinformatics/widgets/prototypes/OWDisplayMotifs.py

 <icon>icons\GenomeMap.png</icon>
 """
 
+from collections import defaultdict
+
 import orange
-from OWTools import *
-from OWWidget import *
-from OWGraph import *
-import OWGUI
-
-from OWGraph import ColorPaletteHSV
-
-from collections import defaultdict
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWGraph import *
+from Orange.OrangeWidgets.OWTools import *
+from Orange.OrangeWidgets.OWWidget import *
 
 class subBarQwtPlotCurve(QwtPlotCurve):
     def __init__(self, text = None):

Orange/bioinformatics/widgets/prototypes/OWEpistasisAnalysis.py

 <priority>1200</priority>
 """
 
-import orange, OWGUI, statc, math
-#from qt import *
-#from qtcanvas import *
-from OWWidget import *
-from OWDataFiles import DataFiles, ExampleSelection
+from __future__ import absolute_import
+
+import math
+
+import orange, statc
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
+
+from .OWDataFiles import DataFiles, ExampleSelection
 
 ##############################################################################
 # parameters that determine the canvas layout

Orange/bioinformatics/widgets/prototypes/OWExampleSelector.py

 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
 """
 
-from OWWidget import *
+from __future__ import absolute_import
+
 from qttable import *
-import OWGUI
-from OWDataFiles import DataFiles, ExampleSelection
-import chipstat
+
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
+
+from .. import chipstat
+from .OWDataFiles import DataFiles, ExampleSelection
 
 class OWExampleSelector(OWWidget):
     settingsList  = ['negate', 'commitOnChange', 'sendNotSelectedData']

Orange/bioinformatics/widgets/prototypes/OWGeneAtlasTissueExpression.py

-"""<name>Gene Atlas Tissue Expression</name>
+"""
+<name>Gene Atlas Tissue Expression</name>
 <description></description>
 """
+
+from __future__ import absolute_import
+
 import os, sys
-import obiArrayExpress
-import obiGeneAtlas
+from collections import defaultdict
+import shelve
+
 import Orange
+from Orange.utils import lru_cache
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
 
-import OWGUI
-from OWWidget import *
+from Orange.orng import orngDataCaching, orngServerFiles
 
-from collections import defaultdict
-from Orange.utils import lru_cache
-
-import orngDataCaching
-import orngServerFiles
-import obiGene
-
-import shelve
+from ... import obiArrayExpress, obiGene, obiGeneAtlas
 
 TAXID_TO_ORG = obiGeneAtlas.TAXID_TO_ORG
 

Orange/bioinformatics/widgets/prototypes/OWGenomeMap.py

 <priority>200</priority>
 """
 
-import orange, OWGUI, math, glob
+import math, glob
 import os.path # to find out where the local files are
-from OWWidget import *
-#from qtcanvas import *
 
-from OWGraph import ColorPaletteHSV
-
-localdir = os.path.dirname(__file__) or "."
+import orange
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWGraph import ColorPaletteHSV
+from Orange.OrangeWidgets.OWWidget import *
 
 DEBUG = 0
 

Orange/bioinformatics/widgets/prototypes/OWHypTest.py

 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
 """
 
+from __future__ import absolute_import
+
+import qt, qwt
+
 import numpy.oldnumeric as Numeric, numpy.oldnumeric.ma as MA
-from OWWidget import *
-import OWGUI
-import qt, qwt
-from OWDataFiles import DataFiles, ExampleSelection
-import Anova, scipy.stats
 
+import scipy.stats
+
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
+
+from .. import Anova
+from .OWDataFiles import DataFiles, ExampleSelection
 
 class OWHypTest(OWWidget):
     settingsList  = ["anovaType", "popMean", "_interaction", "selectorA", "selectorB", "selectorI", "alphaA", "alphaB", "alphaI", "autoUpdateSelName", "sendNotSelectedData", "sendProbabilities", "commitOnChange"]
 
 
 if __name__=="__main__":
-    import OWDataFiles, orngSignalManager
+    from . import OWDataFiles
+    from Orange.orng import orngSignalManager
     signalManager = orngSignalManager.SignalManager(0)
     a=QApplication(sys.argv)
     ow=OWHypTest(signalManager = signalManager)

Orange/bioinformatics/widgets/prototypes/OWImputeProfiles.py

 """
 
 import math
+
 import numpy.oldnumeric as Numeric, numpy.oldnumeric.ma as MA
-from OWWidget import *
-import OWGUI
-from OWDataFiles import DataFiles
-import chipstat
-import chipimpute
 
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
+
+from .. import chipimpute, chipstat
+from .OWDataFiles import DataFiles
 
 class OWImputeProfiles(OWWidget):
     settingsList  = ['impute', 'imputeK', 'smooth', 'windowSize', 'commitOnChange']
     a.exec_loop()
     ow.saveSettings()
 
-##    import OWDataFiles, orngSignalManager
+##    from . import OWDataFiles
+##    from Orange.orng import orngSignalManager
 ##    signalManager = orngSignalManager.SignalManager(0)
 ##    a=QApplication(sys.argv)
 ##    ow=OWImputeProfiles(signalManager = signalManager)

Orange/bioinformatics/widgets/prototypes/OWNormalization.py

-"""<name>Normalization</name>
+"""
+<name>Normalization</name>
 <description>Gene Expression data normalization</description>
 """
+
+from __future__ import absolute_import
+
 import os, sys
-from OWWidget import *
-import OWGUI
 
 import Orange
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
 
-import obiDifscale
+from ... import obiDifscale
 
 class OWNormalization(OWWidget):
     settingsList = []
     w = OWNormalization()
     data = Orange.data.Table("GDS")
     w.show()
-    app.exec_()
+    app.exec_()

Orange/bioinformatics/widgets/prototypes/OWNormalize.py

 TODO: settingsList
 """
 
+from __future__ import absolute_import
+
 import string, math
+import types
+
 import numpy.oldnumeric as Numeric, numpy.oldnumeric.ma as MA
 import numpy.oldnumeric.mlab as MLab
 import numpy.oldnumeric.linear_algebra as LinearAlgebra
 import numpyExtn
+
 import orange
-#from qttable import *
-from OWWidget import *
-import OWGUI, OWToolbars
-from OWGraph import *
-from OWGraphTools import *      # color palletes, user defined curves, ...
-import ColorPalette             # ColorButton
-import types
-
-import chipstat
-
-
+from Orange.OrangeWidgets import ColorPalette             # ColorButton
+from Orange.OrangeWidgets import OWGUI, OWToolbars
+from Orange.OrangeWidgets.OWGraph import *
+from Orange.OrangeWidgets.OWGraphTools import *      # color palletes, user defined curves, ...
+from Orange.OrangeWidgets.OWWidget import *
+
+from .. import chipstat
 
 # global debugging variables
 D1 = False
 
 
     def test_widget():        
-        import OWDataTable, orngSignalManager
+        from Orange.orng import orngSignalManager
+        from Orange.OrangeWidgets.Data import OWDataTable
         signalManager = orngSignalManager.SignalManager(0)
         a=QApplication(sys.argv)
         ow=OWNormalize(signalManager = signalManager)

Orange/bioinformatics/widgets/prototypes/OWProcessChipData.py

 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
 """
 
-from OWWidget import *
-import OWGUI
-from OWDataFiles import DataFiles
-import chipstat
+from __future__ import absolute_import
+
+from Orange.OrangeWidgets import OWGUI
+from Orange.OrangeWidgets.OWWidget import *
+
+from .. import chipstat
+from .OWDataFiles import DataFiles
 
 class OWProcessChipData(OWWidget):
     settingsList  = ["preStdMethod", "postStdMethod", "preStdRob", "postStdRob", "mergeType", "commitOnChange"]

Orange/bioinformatics/widgets/prototypes/__init__.py

Empty file added.