TimeFeatures 1.0.7__tar.gz → 1.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/PKG-INFO +1 -1
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/TimeFeatures.egg-info/PKG-INFO +1 -1
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/setup.py +1 -1
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/timefeatures/widgets/owsavetodb.py +18 -2
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/timefeatures/widgets/owtfgraphgenerator.py +12 -5
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/timefeatures/widgets/owtimefeatureconstructor.py +1 -1
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/LICENSE +0 -0
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/README.md +0 -0
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/TimeFeatures.egg-info/SOURCES.txt +0 -0
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/TimeFeatures.egg-info/dependency_links.txt +0 -0
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/TimeFeatures.egg-info/entry_points.txt +0 -0
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/TimeFeatures.egg-info/top_level.txt +0 -0
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/setup.cfg +0 -0
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/timefeatures/widgets/__init__.py +0 -0
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/timefeatures/widgets/icons/graphgenerator.svg +0 -0
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/timefeatures/widgets/icons/savedatadb.svg +0 -0
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/timefeatures/widgets/icons/timefeature-xs.svg +0 -0
- {TimeFeatures-1.0.7 → TimeFeatures-1.0.9}/timefeatures/widgets/icons/timefeature.svg +0 -0
|
@@ -21,7 +21,7 @@ setup(name="TimeFeatures",
|
|
|
21
21
|
packages=["timefeatures.widgets"],
|
|
22
22
|
package_data={"timefeatures.widgets": ["icons/*.svg", "icons/*.png"]},
|
|
23
23
|
entry_points={"orange.widgets": "Time-Features = timefeatures.widgets"},
|
|
24
|
-
version="1.0.
|
|
24
|
+
version="1.0.9",
|
|
25
25
|
author="Alejandro Rivas García",
|
|
26
26
|
author_email="alejandrorivasgarcia@gmail.com",
|
|
27
27
|
keywords=[
|
|
@@ -14,7 +14,7 @@ from Orange.widgets.utils.itemmodels import PyListModel
|
|
|
14
14
|
from Orange.widgets.utils.owbasesql import OWBaseSql
|
|
15
15
|
from Orange.widgets.utils.sql import check_sql_input
|
|
16
16
|
from Orange.widgets.utils.widgetpreview import WidgetPreview
|
|
17
|
-
from Orange.widgets.widget import Msg
|
|
17
|
+
from Orange.widgets.widget import Msg, OWWidget
|
|
18
18
|
from PyQt5.QtGui import QPixmap, QStandardItem
|
|
19
19
|
from PyQt5.QtWidgets import QGridLayout, QLineEdit, QPushButton, QSizePolicy, QLabel
|
|
20
20
|
from orangewidget.utils.signals import Input
|
|
@@ -42,7 +42,7 @@ class BackendModel(PyListModel):
|
|
|
42
42
|
return super().data(index, role)
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
class owsavetodb(OWBaseSql):
|
|
45
|
+
class owsavetodb(OWBaseSql, OWWidget):
|
|
46
46
|
name = "Save to DB"
|
|
47
47
|
description = "Save a dataset into a DB."
|
|
48
48
|
icon = "icons/savedatadb.svg"
|
|
@@ -139,6 +139,7 @@ class owsavetodb(OWBaseSql):
|
|
|
139
139
|
minimumWidth=120
|
|
140
140
|
)
|
|
141
141
|
self.btn_savedata.clicked.connect(self.saveData)
|
|
142
|
+
self.btn_savedata.setEnabled(False)
|
|
142
143
|
layoutA.addWidget(self.btn_savedata, 3, 2)
|
|
143
144
|
self._add_backend_controls()
|
|
144
145
|
|
|
@@ -179,6 +180,7 @@ class owsavetodb(OWBaseSql):
|
|
|
179
180
|
|
|
180
181
|
def create_table(self, table_name):
|
|
181
182
|
|
|
183
|
+
contBar = 0
|
|
182
184
|
contMetasOriginales = 0
|
|
183
185
|
cont = 0
|
|
184
186
|
variables = []
|
|
@@ -224,8 +226,21 @@ class owsavetodb(OWBaseSql):
|
|
|
224
226
|
insert_query = insert_query[:-1] # Eliminar la coma final
|
|
225
227
|
insert_query += ")"
|
|
226
228
|
|
|
229
|
+
self.progressBarInit()
|
|
230
|
+
|
|
227
231
|
for instance in self.data:
|
|
228
232
|
data_row = []
|
|
233
|
+
contBar += 1
|
|
234
|
+
|
|
235
|
+
if contBar*4 == len(self.data):
|
|
236
|
+
self.progressBarSet(25)
|
|
237
|
+
elif contBar*2 == len(self.data):
|
|
238
|
+
self.progressBarSet(50)
|
|
239
|
+
elif contBar == len(self.data)-(len(self.data)/4):
|
|
240
|
+
self.progressBarSet(75)
|
|
241
|
+
elif contBar == len(self.data):
|
|
242
|
+
self.progressBarSet(100)
|
|
243
|
+
|
|
229
244
|
for i in range(len(variables)):
|
|
230
245
|
if cont > 0:
|
|
231
246
|
i -= cont
|
|
@@ -239,6 +254,7 @@ class owsavetodb(OWBaseSql):
|
|
|
239
254
|
pass
|
|
240
255
|
except BackendError as ex:
|
|
241
256
|
self.Error.connection(str(ex))
|
|
257
|
+
self.progressBarFinished()
|
|
242
258
|
|
|
243
259
|
def saveData(self):
|
|
244
260
|
|
|
@@ -124,6 +124,7 @@ class owtfgraphgenerator(OWWidget, ConcurrentWidgetMixin):
|
|
|
124
124
|
minimumWidth=10
|
|
125
125
|
)
|
|
126
126
|
self.btn_generate.clicked.connect(self.generate)
|
|
127
|
+
self.btn_generate.setEnabled(False)
|
|
127
128
|
buttonlayout.addWidget(self.btn_generate)
|
|
128
129
|
toplayout.addLayout(buttonlayout, 0)
|
|
129
130
|
|
|
@@ -131,13 +132,19 @@ class owtfgraphgenerator(OWWidget, ConcurrentWidgetMixin):
|
|
|
131
132
|
def setData(self, data=None):
|
|
132
133
|
|
|
133
134
|
self.data = data
|
|
134
|
-
|
|
135
|
-
self.
|
|
135
|
+
|
|
136
|
+
if self.data is not None:
|
|
137
|
+
if len(self.data.domain) >= 2 and (self.data.domain[0].name != "Variable" or self.data.domain[1].name != "Expression"):
|
|
138
|
+
self.Error.generation_error("You need a configuration table (Variable-Expression).")
|
|
139
|
+
self.Outputs.network.send(None)
|
|
140
|
+
else:
|
|
141
|
+
self.generate()
|
|
142
|
+
self.btn_generate.setEnabled(True)
|
|
143
|
+
else:
|
|
144
|
+
self.Outputs.network.send(None)
|
|
145
|
+
self.btn_generate.setEnabled(False)
|
|
136
146
|
|
|
137
147
|
def generate(self):
|
|
138
|
-
if self.data is None:
|
|
139
|
-
self.error("No data provided.")
|
|
140
|
-
return
|
|
141
148
|
|
|
142
149
|
func = self.GRAPH_TYPES[self.graph_type]
|
|
143
150
|
|
|
@@ -1235,7 +1235,7 @@ class owtimefeatureconstructor(OWWidget, ConcurrentWidgetMixin):
|
|
|
1235
1235
|
variables.pop(0)
|
|
1236
1236
|
|
|
1237
1237
|
variable_column = Orange.data.DiscreteVariable(name="Variable", values=variables)
|
|
1238
|
-
expresion_column = Orange.data.DiscreteVariable(name="
|
|
1238
|
+
expresion_column = Orange.data.DiscreteVariable(name="Expression", values=expresiones)
|
|
1239
1239
|
|
|
1240
1240
|
# Creo el dominio
|
|
1241
1241
|
domain = Orange.data.Domain([variable_column, expresion_column])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|