From 6144e2548d2bedc5edd9d24af629fa475d88e494 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Thu, 1 Aug 2024 22:19:45 +0200 Subject: [PATCH 01/34] added gui example --- featuretools/gui/start.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 featuretools/gui/start.py diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py new file mode 100644 index 0000000000..ed4b35900a --- /dev/null +++ b/featuretools/gui/start.py @@ -0,0 +1,30 @@ +import wx + +class MyPanel(wx.Panel): + def __init__(self, parent=None): + super(MyPanel, self).__init__(parent) + + # Create a label + self.label = wx.StaticText(self, wx.ID_ANY, "This is a label") + self.label.SetPosition((50, 20)) # Set position manually + + # Create a button + self.button = wx.Button(self, wx.ID_ANY, "Test Button") + self.button.SetPosition((50, 60)) # Set position manually + + # Bind event handler for the button + self.Bind(wx.EVT_BUTTON, self.onButtonClicked, self.button) + + def onButtonClicked(self, event): + print("Button clicked!") + +class MyApp(wx.App): + def OnInit(self): + frame = wx.Frame(None, wx.ID_ANY, "Panel Example") + panel = MyPanel(frame) + frame.Show() + return True + +if __name__ == "__main__": + app = MyApp() + app.MainLoop() From 801cb47e53d3e3f6b925d5c9e9cea6a546e40ebf Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Fri, 2 Aug 2024 19:54:10 +0200 Subject: [PATCH 02/34] added text --- featuretools/gui/start.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index ed4b35900a..52a7a05583 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -4,8 +4,8 @@ class MyPanel(wx.Panel): def __init__(self, parent=None): super(MyPanel, self).__init__(parent) - # Create a label - self.label = wx.StaticText(self, wx.ID_ANY, "This is a label") + # Label 1 + self.label = wx.StaticText(self, wx.ID_ANY, "Featuretools - Choose a feature") self.label.SetPosition((50, 20)) # Set position manually # Create a button From 603142c457f6cf76ec83e5a9c6911cb853a5279e Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Sat, 3 Aug 2024 17:05:45 +0200 Subject: [PATCH 03/34] Added docstring --- featuretools/gui/start.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 52a7a05583..0017b4fd74 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -1,5 +1,9 @@ import wx +""" +This module provides a GUI for some parts of Featuretools. +""" + class MyPanel(wx.Panel): def __init__(self, parent=None): super(MyPanel, self).__init__(parent) From 1cf880de7d49e1fb33a1214b252d428f8845859b Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Sun, 4 Aug 2024 21:46:21 +0200 Subject: [PATCH 04/34] Added documentation --- featuretools/gui/start.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 0017b4fd74..b596b481c5 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -20,6 +20,9 @@ def __init__(self, parent=None): self.Bind(wx.EVT_BUTTON, self.onButtonClicked, self.button) def onButtonClicked(self, event): + + """Action when button is clicked""" + print("Button clicked!") class MyApp(wx.App): From 5b3677fb9f46954dd0eff479876d517ba86095b5 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:05:27 +0200 Subject: [PATCH 05/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index b596b481c5..63833288c5 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -12,7 +12,7 @@ def __init__(self, parent=None): self.label = wx.StaticText(self, wx.ID_ANY, "Featuretools - Choose a feature") self.label.SetPosition((50, 20)) # Set position manually - # Create a button + # Create first button self.button = wx.Button(self, wx.ID_ANY, "Test Button") self.button.SetPosition((50, 60)) # Set position manually From b26a11be24dcba92b7b795546d30f4b41b7240af Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Tue, 6 Aug 2024 19:23:26 +0200 Subject: [PATCH 06/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 63833288c5..1fd7c1208f 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -23,7 +23,7 @@ def onButtonClicked(self, event): """Action when button is clicked""" - print("Button clicked!") + print("Button clicked") class MyApp(wx.App): def OnInit(self): From b86581e60edbed31f371c77b885fd419716d1b64 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Wed, 7 Aug 2024 18:06:41 +0200 Subject: [PATCH 07/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 1fd7c1208f..b1749caf2b 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -16,7 +16,7 @@ def __init__(self, parent=None): self.button = wx.Button(self, wx.ID_ANY, "Test Button") self.button.SetPosition((50, 60)) # Set position manually - # Bind event handler for the button + # Bind event handler for the first button self.Bind(wx.EVT_BUTTON, self.onButtonClicked, self.button) def onButtonClicked(self, event): From eb585a87343d3476e6446d65a49abe9c5b2a9827 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:29:51 +0200 Subject: [PATCH 08/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index b1749caf2b..fb2a181bbf 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -21,7 +21,7 @@ def __init__(self, parent=None): def onButtonClicked(self, event): - """Action when button is clicked""" + """Action when button is clicked """ print("Button clicked") From e9a890567dd3647180302265544be355d44a02c1 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:29:24 +0200 Subject: [PATCH 09/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index fb2a181bbf..2dc4e600a0 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -9,7 +9,7 @@ def __init__(self, parent=None): super(MyPanel, self).__init__(parent) # Label 1 - self.label = wx.StaticText(self, wx.ID_ANY, "Featuretools - Choose a feature") + self.label = wx.StaticText(self, wx.ID_ANY, "Featuretools - Choose a feature ") self.label.SetPosition((50, 20)) # Set position manually # Create first button From a1a185fd9296d79d304d2888f57fba9570a0efcc Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Sat, 10 Aug 2024 15:32:13 +0200 Subject: [PATCH 10/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 2dc4e600a0..f29ce2623d 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -1,7 +1,7 @@ import wx """ -This module provides a GUI for some parts of Featuretools. +This module provides a GUI for some parts of Featuretools. """ class MyPanel(wx.Panel): From 563091f66785f250f751f0460ab544611b665b2e Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Sun, 11 Aug 2024 20:20:07 +0200 Subject: [PATCH 11/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index f29ce2623d..01d0492501 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -9,7 +9,7 @@ def __init__(self, parent=None): super(MyPanel, self).__init__(parent) # Label 1 - self.label = wx.StaticText(self, wx.ID_ANY, "Featuretools - Choose a feature ") + self.label = wx.StaticText(self, wx.ID_ANY, " Featuretools - Choose a feature ") self.label.SetPosition((50, 20)) # Set position manually # Create first button From 0e635b4e7a4c42b0e223be1db48ecc6ae14f0b1e Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Mon, 12 Aug 2024 18:18:18 +0200 Subject: [PATCH 12/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 01d0492501..bff7e7c2fc 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -13,7 +13,7 @@ def __init__(self, parent=None): self.label.SetPosition((50, 20)) # Set position manually # Create first button - self.button = wx.Button(self, wx.ID_ANY, "Test Button") + self.button = wx.Button(self, wx.ID_ANY, " Test Button") self.button.SetPosition((50, 60)) # Set position manually # Bind event handler for the first button From 88981c34cca070892080fd04fe6f2ee04fec1df9 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Tue, 13 Aug 2024 10:50:45 +0200 Subject: [PATCH 13/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index bff7e7c2fc..975420399e 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -13,7 +13,7 @@ def __init__(self, parent=None): self.label.SetPosition((50, 20)) # Set position manually # Create first button - self.button = wx.Button(self, wx.ID_ANY, " Test Button") + self.button = wx.Button(self, wx.ID_ANY, " Test Button ") self.button.SetPosition((50, 60)) # Set position manually # Bind event handler for the first button From 33333b34e20a2e67168cb5bd9c8944c22f57c2c9 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Wed, 14 Aug 2024 22:41:24 +0200 Subject: [PATCH 14/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 975420399e..24856d468e 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -21,7 +21,7 @@ def __init__(self, parent=None): def onButtonClicked(self, event): - """Action when button is clicked """ + """ Action when button is clicked """ print("Button clicked") From a2851c02684a7519754189b11a96d60818c59686 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Thu, 15 Aug 2024 19:51:47 +0200 Subject: [PATCH 15/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 24856d468e..663d723de1 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -27,7 +27,7 @@ def onButtonClicked(self, event): class MyApp(wx.App): def OnInit(self): - frame = wx.Frame(None, wx.ID_ANY, "Panel Example") + frame = wx.Frame(None, wx.ID_ANY, " Panel Example") panel = MyPanel(frame) frame.Show() return True From 1179938becd6d709f68a0f9f3d4480eb8ec7c118 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Fri, 16 Aug 2024 12:27:54 +0200 Subject: [PATCH 16/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 663d723de1..61c9136c55 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -27,7 +27,7 @@ def onButtonClicked(self, event): class MyApp(wx.App): def OnInit(self): - frame = wx.Frame(None, wx.ID_ANY, " Panel Example") + frame = wx.Frame(None, wx.ID_ANY, " Panel Example ") panel = MyPanel(frame) frame.Show() return True From 7692bc8d5abb0f4017745ed0a3ad8948203c77dc Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Sat, 17 Aug 2024 17:22:40 +0200 Subject: [PATCH 17/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 61c9136c55..90c5e10f67 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -14,7 +14,7 @@ def __init__(self, parent=None): # Create first button self.button = wx.Button(self, wx.ID_ANY, " Test Button ") - self.button.SetPosition((50, 60)) # Set position manually + self.button.SetPosition((50, 60)) # Set position manually # Bind event handler for the first button self.Bind(wx.EVT_BUTTON, self.onButtonClicked, self.button) From 3efad8783a34fed41ae7ac5ca4c152e51d54b645 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Sun, 18 Aug 2024 15:01:43 +0200 Subject: [PATCH 18/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 90c5e10f67..84c735c52b 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -23,7 +23,7 @@ def onButtonClicked(self, event): """ Action when button is clicked """ - print("Button clicked") + print("Button clicked") class MyApp(wx.App): def OnInit(self): From 1eca1bc01ed41a6af94cfe80232a0fa03ffc311f Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Mon, 19 Aug 2024 18:46:55 +0200 Subject: [PATCH 19/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 84c735c52b..803fbf8cf3 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -28,7 +28,7 @@ def onButtonClicked(self, event): class MyApp(wx.App): def OnInit(self): frame = wx.Frame(None, wx.ID_ANY, " Panel Example ") - panel = MyPanel(frame) + panel = MyPanel(frame) frame.Show() return True From ee5169c711ac52984fee54b3f489ed42317e5eca Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Wed, 21 Aug 2024 22:54:28 +0200 Subject: [PATCH 20/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 803fbf8cf3..1421f87c04 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -30,7 +30,7 @@ def OnInit(self): frame = wx.Frame(None, wx.ID_ANY, " Panel Example ") panel = MyPanel(frame) frame.Show() - return True + return True if __name__ == "__main__": app = MyApp() From 631101daff7f73515be1c62ce28f6800f7ba7517 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Thu, 22 Aug 2024 13:04:04 +0200 Subject: [PATCH 21/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 1421f87c04..c5629ec333 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -29,7 +29,7 @@ class MyApp(wx.App): def OnInit(self): frame = wx.Frame(None, wx.ID_ANY, " Panel Example ") panel = MyPanel(frame) - frame.Show() + frame.Show() return True if __name__ == "__main__": From 92c35cf79a51ea5544497f1714bc22cdcd1240e9 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Fri, 23 Aug 2024 17:15:25 +0200 Subject: [PATCH 22/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index c5629ec333..d6c965cade 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -16,7 +16,7 @@ def __init__(self, parent=None): self.button = wx.Button(self, wx.ID_ANY, " Test Button ") self.button.SetPosition((50, 60)) # Set position manually - # Bind event handler for the first button + # Bind event handler for the first button self.Bind(wx.EVT_BUTTON, self.onButtonClicked, self.button) def onButtonClicked(self, event): From 951f2e71a40349ce265f6be0f6dfcaa49f2ed9f6 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:41:56 +0200 Subject: [PATCH 23/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index d6c965cade..ba8db1dc56 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -27,7 +27,7 @@ def onButtonClicked(self, event): class MyApp(wx.App): def OnInit(self): - frame = wx.Frame(None, wx.ID_ANY, " Panel Example ") + frame = wx.Frame(None, wx.ID_ANY, " Panel Example ") panel = MyPanel(frame) frame.Show() return True From 8b4cfcb44ddf85cbabcb622c95f6e13ff866e4ed Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Sun, 25 Aug 2024 15:54:42 +0200 Subject: [PATCH 24/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index ba8db1dc56..76a94d5a5b 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -29,7 +29,7 @@ class MyApp(wx.App): def OnInit(self): frame = wx.Frame(None, wx.ID_ANY, " Panel Example ") panel = MyPanel(frame) - frame.Show() + frame.Show() return True if __name__ == "__main__": From 27177f14a83a0022d89e48cdf01a1a2da3c13f4d Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Mon, 26 Aug 2024 20:11:39 +0200 Subject: [PATCH 25/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 76a94d5a5b..bc4481570b 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -21,7 +21,7 @@ def __init__(self, parent=None): def onButtonClicked(self, event): - """ Action when button is clicked """ + """ Action when button is clicked """ print("Button clicked") From fdcee47f8092fa8d9d9a023c59fb74693a73bc1e Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Tue, 27 Aug 2024 21:20:49 +0200 Subject: [PATCH 26/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index bc4481570b..c34b39d554 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -1,7 +1,7 @@ import wx """ -This module provides a GUI for some parts of Featuretools. +This module provides a GUI for some parts of Featuretools. """ class MyPanel(wx.Panel): From d2fee0c713d750409312011eb19d462c7e520218 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:05:10 +0200 Subject: [PATCH 27/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index c34b39d554..57e0a62547 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -34,4 +34,4 @@ def OnInit(self): if __name__ == "__main__": app = MyApp() - app.MainLoop() + app.MainLoop() From 810589b337ad26ae71ecbc5ecd36b4d4c7e277da Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Thu, 29 Aug 2024 18:10:01 +0200 Subject: [PATCH 28/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 57e0a62547..261f1fe95c 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -6,7 +6,7 @@ class MyPanel(wx.Panel): def __init__(self, parent=None): - super(MyPanel, self).__init__(parent) + super(MyPanel, self).__init__(parent) # Label 1 self.label = wx.StaticText(self, wx.ID_ANY, " Featuretools - Choose a feature ") From 4db386cac75554daeb4b8df5ce9682196addbc69 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:59:09 +0200 Subject: [PATCH 29/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 261f1fe95c..1f7c0e157a 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -32,6 +32,6 @@ def OnInit(self): frame.Show() return True -if __name__ == "__main__": +if __name__ == "__main__": app = MyApp() app.MainLoop() From aa865f6059c598405fc39cb19a51a6d1ef37ce76 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Sat, 31 Aug 2024 18:07:42 +0200 Subject: [PATCH 30/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 1f7c0e157a..d711dd6780 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -26,7 +26,7 @@ def onButtonClicked(self, event): print("Button clicked") class MyApp(wx.App): - def OnInit(self): + def OnInit(self): frame = wx.Frame(None, wx.ID_ANY, " Panel Example ") panel = MyPanel(frame) frame.Show() From 3995d8f98a8435f8d60eb40b302c5a635d18d0f6 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Sun, 1 Sep 2024 19:25:35 +0200 Subject: [PATCH 31/34] Update start.py --- featuretools/gui/start.py | 76 +++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 27 deletions(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index d711dd6780..ef1b9ec139 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -1,37 +1,59 @@ import wx -""" -This module provides a GUI for some parts of Featuretools. -""" +class Frame(wx.Frame): + def __init__(self, parent, title): + super().__init__(parent, title=title, size=(400, 300)) + + #Create panels + self.panel1 = wx.Panel(self) -class MyPanel(wx.Panel): - def __init__(self, parent=None): - super(MyPanel, self).__init__(parent) + # List of chosen files + self.chosen_files = [] - # Label 1 - self.label = wx.StaticText(self, wx.ID_ANY, " Featuretools - Choose a feature ") - self.label.SetPosition((50, 20)) # Set position manually - - # Create first button - self.button = wx.Button(self, wx.ID_ANY, " Test Button ") - self.button.SetPosition((50, 60)) # Set position manually + # Primary key + self.primary_key = "" + + # Text area for primary key + self.text_area = wx.TextCtrl(self.panel1) - # Bind event handler for the first button - self.Bind(wx.EVT_BUTTON, self.onButtonClicked, self.button) + # Create file picker + self.file_picker = wx.FilePickerCtrl(self.panel1, style=wx.FLP_DEFAULT_STYLE) + + # Create description labels + self.description_label_1 = wx.StaticText(self.panel1, label="Choose multiple files:") - def onButtonClicked(self, event): + self.description_label_2 = wx.StaticText(self.panel1, label="Choose a primary key:") - """ Action when button is clicked """ + # Create static text control + self.file_name_label = wx.StaticText(self.panel1, label="") - print("Button clicked") + # Create and bind button + self.button1 = wx.Button(self.panel1, label="Continue") + self.Bind(wx.EVT_BUTTON, self.button_pressed, self.button1) + + # Layout controls manually + self.description_label_1.SetPosition((10,10)) + self.file_picker.SetPosition((10, 40)) + self.button1.SetPosition((150,40)) + self.description_label_2.SetPosition((10,80)) + self.text_area.SetPosition((10,120)) + self.file_name_label.SetPosition((10, 160)) + + # Bind file picker change event + self.file_picker.Bind(wx.EVT_FILEPICKER_CHANGED, self.on_file_changed) + -class MyApp(wx.App): - def OnInit(self): - frame = wx.Frame(None, wx.ID_ANY, " Panel Example ") - panel = MyPanel(frame) - frame.Show() - return True + def on_file_changed(self, event): + file_path = self.file_picker.GetPath() + self.chosen_files.append(file_path) + self.file_name_label.SetLabel('\n'.join(self.chosen_files)) + + def button_pressed(self,event): + self.primary_key = self.text_area.GetValue() + -if __name__ == "__main__": - app = MyApp() - app.MainLoop() +if __name__ == '__main__': + app = wx.App() + frame = Frame(None, title="Feature Tools") + frame.Show() + app.MainLoop() From 6e301c75cd0af030d3e1c454c5b504ef0e97b0c1 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Mon, 2 Sep 2024 08:32:56 +0200 Subject: [PATCH 32/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index ef1b9ec139..baf44908e1 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -8,7 +8,7 @@ def __init__(self, parent, title): self.panel1 = wx.Panel(self) # List of chosen files - self.chosen_files = [] + self.chosen_files = [] # Primary key self.primary_key = "" From ac9e91e210f1cb9875e92845a14a07b35b514f57 Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Tue, 3 Sep 2024 21:04:45 +0200 Subject: [PATCH 33/34] Update start.py --- featuretools/gui/start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index baf44908e1..00462d4199 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -2,7 +2,7 @@ class Frame(wx.Frame): def __init__(self, parent, title): - super().__init__(parent, title=title, size=(400, 300)) + super().__init__(parent, title=title, size=(400, 300)) #Create panels self.panel1 = wx.Panel(self) From c3f5797d079da90be3e940ea7f8cc1344a1a6f7a Mon Sep 17 00:00:00 2001 From: arminm22 <113990269+arminm22@users.noreply.github.com> Date: Wed, 4 Sep 2024 15:24:09 +0200 Subject: [PATCH 34/34] Update start.py --- featuretools/gui/start.py | 206 ++++++++++++++++++++++++++++++-------- 1 file changed, 163 insertions(+), 43 deletions(-) diff --git a/featuretools/gui/start.py b/featuretools/gui/start.py index 00462d4199..3db284c301 100644 --- a/featuretools/gui/start.py +++ b/featuretools/gui/start.py @@ -1,56 +1,176 @@ +""" +This module provides a GUI to merge 2 CSV-files containing data-sets into one +using deep feature sythesis. +""" + import wx +import pandas as pd +import featuretools as ft +import warnings + +# Disable all warnings +warnings.filterwarnings("ignore") + + +VERT_SPACE = 40 +LEFT_MARGIN = 10 + class Frame(wx.Frame): + + """ + This class contains all the GUI-functions + """ + def __init__(self, parent, title): - super().__init__(parent, title=title, size=(400, 300)) - - #Create panels - self.panel1 = wx.Panel(self) + super().__init__(parent, title=title, size=(600, 800)) + + # Create panel + self.panel = wx.Panel(self) - # List of chosen files - self.chosen_files = [] + # Create variables + self.filepath_1 = "" + self.filepath_2 = "" - # Primary key - self.primary_key = "" + # Directory to save csv-file + self.directory = "" - # Text area for primary key - self.text_area = wx.TextCtrl(self.panel1) - - # Create file picker - self.file_picker = wx.FilePickerCtrl(self.panel1, style=wx.FLP_DEFAULT_STYLE) + # Text area for primary keys + self.text_area_1 = wx.TextCtrl(self.panel) + self.text_area_2 = wx.TextCtrl(self.panel) - # Create description labels - self.description_label_1 = wx.StaticText(self.panel1, label="Choose multiple files:") + description_1 = "Select 2 CSV-files and merge them into 1 using deep feature synthesis\n" + description_2 = "The primary key of file 1 must be also present in file 2" + + # Description labels + self.general_description = wx.StaticText( + self.panel, label=description_1+description_2) + self.user_information = wx.StaticText(self.panel, label="") + self.path_1_label = wx.StaticText(self.panel, label="") + self.key_1_label = wx.StaticText( + self.panel, label="Primary key of file 1:") + self.path_2_label = wx.StaticText(self.panel, label="") + self.key_2_label = wx.StaticText( + self.panel, label="Primary key of file 2:") - self.description_label_2 = wx.StaticText(self.panel1, label="Choose a primary key:") - # Create static text control - self.file_name_label = wx.StaticText(self.panel1, label="") - - # Create and bind button - self.button1 = wx.Button(self.panel1, label="Continue") - self.Bind(wx.EVT_BUTTON, self.button_pressed, self.button1) - - # Layout controls manually - self.description_label_1.SetPosition((10,10)) - self.file_picker.SetPosition((10, 40)) - self.button1.SetPosition((150,40)) - self.description_label_2.SetPosition((10,80)) - self.text_area.SetPosition((10,120)) - self.file_name_label.SetPosition((10, 160)) - - # Bind file picker change event - self.file_picker.Bind(wx.EVT_FILEPICKER_CHANGED, self.on_file_changed) - - - def on_file_changed(self, event): - file_path = self.file_picker.GetPath() - self.chosen_files.append(file_path) - self.file_name_label.SetLabel('\n'.join(self.chosen_files)) - - def button_pressed(self,event): - self.primary_key = self.text_area.GetValue() - + self.file_name_label = wx.StaticText(self.panel, label="") + + # Create and bind buttons + self.pick_1_button = wx.Button(self.panel, label='Pick file 1:') + self.Bind(wx.EVT_BUTTON, self.on_pick_file_1, self.pick_1_button) + + self.pick_2_button = wx.Button(self.panel, label='Pick file 2:') + self.Bind(wx.EVT_BUTTON, self.on_pick_file_2, self.pick_2_button) + + self.continue_button = wx.Button(self.panel, label="Continue") + self.Bind(wx.EVT_BUTTON, self.continue_pressed, self.continue_button) + + # Layout control + self.general_description.SetPosition((LEFT_MARGIN, VERT_SPACE*1)) + + self.pick_1_button.SetPosition((LEFT_MARGIN, VERT_SPACE*4)) + self.path_1_label.SetPosition((LEFT_MARGIN, VERT_SPACE*5)) + self.key_1_label.SetPosition((LEFT_MARGIN, VERT_SPACE*6)) + self.text_area_1.SetPosition((LEFT_MARGIN, VERT_SPACE*7)) + + self.pick_2_button.SetPosition((LEFT_MARGIN, VERT_SPACE*9)) + self.path_2_label.SetPosition((LEFT_MARGIN, VERT_SPACE*10)) + self.key_2_label.SetPosition((LEFT_MARGIN, VERT_SPACE*11)) + self.text_area_2.SetPosition((LEFT_MARGIN, VERT_SPACE*12)) + + self.continue_button.SetPosition((LEFT_MARGIN, VERT_SPACE*14)) + self.user_information.SetPosition((LEFT_MARGIN, VERT_SPACE*16)) + + def continue_pressed(self, event): + """ + Action when continue-button is pressed + First asks for a directory to save the result, + then the data-processing starts + """ + + if not self.check_fields(): + self.user_information.SetLabel("Error: Missing values") + return False + + with wx.DirDialog(self, "Choose a directory to save the new file", style=wx.DD_DEFAULT_STYLE) as dialog: + if dialog.ShowModal() == wx.ID_OK: + self.directory = dialog.GetPath() + + # Error handling + try: + self.process_data() + self.user_information.SetLabel( + "File result.csv has been generated") + except: + self.user_information.SetLabel( + " Error: Wrong information \n Check keys and dataset") + + def process_data(self): + """The acutal data processing and saving""" + + # Load the data into dataframes + df1 = pd.read_csv(self.filepath_1) + df2 = pd.read_csv(self.filepath_2) + + # Load primary keys: + pk1 = self.text_area_1.GetValue() + pk2 = self.text_area_2.GetValue() + + # Create a new EntitySet + entities = { + "data1": (df1, pk1), + "data2": (df2, pk2), + } + + # Add a relationship between datasets + relationships = [("data1", pk1, "data2", pk1)] + + # Run deep feature synthesis to automatically generate features + feature_matrix, features_defs = ft.dfs( + dataframes=entities, + relationships=relationships, + target_dataframe_name="data1", + ) + + print(feature_matrix) + + dir_and_filename = self.directory+'result.csv' + + feature_matrix.to_csv(dir_and_filename) + + def on_pick_file_1(self, event): + self.pick_file(1) + + def on_pick_file_2(self, event): + self.pick_file(2) + + def pick_file(self, filenumber): + """File dialog""" + + with wx.FileDialog(self, "Open a file", wildcard="CSV files (*.csv)|*.csv", + style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST) as fileDialog: + if fileDialog.ShowModal() == wx.ID_OK: + # Get the selected file path + filepath = fileDialog.GetPath() + + if filenumber == 1: + self.filepath_1 = filepath + self.path_1_label.SetLabel(filepath) + else: + self.filepath_2 = filepath + self.path_2_label.SetLabel(filepath) + + def check_fields(self): + """Checks if necessary fields are empty""" + + if self.text_area_1 == "" or self.text_area_2 == "": + return False + if self.filepath_1 == "" or self.filepath_2 == "": + return False + + return True + if __name__ == '__main__': app = wx.App()