source: orange/Orange/__init__.py @ 10654:cd73789785b5

Revision 10654:cd73789785b5, 3.4 KB checked in by markotoplak, 2 years ago (diff)

Moved selection from misc to utils.

Line 
1from __future__ import absolute_import
2
3__version__ = "2.5a4"
4
5from . import orange
6
7# Definitely ugly, but I see no other workaround.
8# When, e.g. data.io executes "from orange import ExampleTable"
9# orange gets imported again since it is not in sys.modules
10# before this entire file is executed
11import sys
12sys.modules["orange"] = orange
13
14import warnings
15
16alreadyWarned = False
17disabledMsg = "Some features will be disabled due to failing modules\n"
18def _import(name):
19    global alreadyWarned
20    try:
21        __import__(name, globals(), locals(), [], -1)
22    except ImportError, err:
23        warnings.warn("%sImporting '%s' failed: %s" %
24            (disabledMsg if not alreadyWarned else "", name, err),
25            UserWarning, 2)
26        alreadyWarned = True
27
28_import("utils")
29
30_import("data")
31_import("data.io")
32_import("data.sample")
33_import("data.outliers")
34_import("data.preprocess")
35_import("data.preprocess.scaling")
36_import("data.utils")
37_import("data.discretization")
38_import("data.continuization")
39_import("data.filter")
40_import("data.imputation")
41
42_import("feature")
43_import("feature.construction")
44_import("feature.construction.functionDecomposition")
45_import("feature.construction.univariate")
46_import("feature.discretization")
47_import("feature.imputation")
48_import("feature.scoring")
49_import("feature.selection")
50
51_import("network")
52
53_import("stat")
54
55_import("statistics")
56_import("statistics.estimate")
57_import("statistics.contingency")
58_import("statistics.distribution")
59_import("statistics.basic")
60_import("statistics.evd")
61
62_import("classification")
63_import("classification.tree")
64
65_import("classification.rules")
66
67_import("classification.lookup")
68_import("classification.bayes")
69_import("classification.svm")
70_import("classification.logreg")
71_import("classification.knn")
72_import("classification.majority")
73
74_import("optimization")
75
76_import("projection")
77_import("projection.linear")
78_import("projection.mds")
79_import("projection.som")
80
81_import("ensemble")
82_import("ensemble.bagging")
83_import("ensemble.boosting")
84_import("ensemble.forest")
85_import("ensemble.stacking")
86
87_import("regression")
88_import("regression.base")
89_import("regression.earth")
90_import("regression.lasso")
91_import("regression.linear")
92_import("regression.mean")
93_import("regression.pls")
94_import("regression.tree")
95
96_import("multitarget")
97_import("multitarget.tree")
98
99_import("multilabel")
100_import("multilabel.multibase")
101_import("multilabel.br")
102_import("multilabel.lp")
103_import("multilabel.mlknn")
104_import("multilabel.brknn")
105_import("multilabel.mulan")
106
107_import("associate")
108
109_import("distance")
110
111_import("wrappers")
112
113_import("featureConstruction")
114_import("featureConstruction.univariate")
115_import("featureConstruction.functionDecomposition")
116
117_import("evaluation")
118_import("evaluation.scoring")
119_import("evaluation.testing")
120_import("evaluation.reliability")
121
122_import("clustering")
123_import("clustering.kmeans")
124_import("clustering.hierarchical")
125_import("clustering.consensus")
126
127_import("misc")
128
129_import("utils") #TODO hide utils from the user
130_import("utils.environ")
131_import("utils.counters")
132_import("utils.addons")
133_import("utils.render")
134_import("utils.serverfiles")
135#
136try:
137    from . import version
138    # Always use short_version here (see PEP 386)
139    __version__ = version.short_version
140    __hg_revision__ = version.hg_revision
141except ImportError:
142    # Leave the default version defined at the top.
143    pass
144
145del _import
146del alreadyWarned
147del disabledMsg
Note: See TracBrowser for help on using the repository browser.