Week 4: Overcoming Struggles



I just finished week four of my internship. This week was full of researching and struggling through problems.

The first problem I encountered was integrating the Python Watchdog API, a directory monitoring library, into my GUI. As my first attempt, I tried integrating Watchdog as a thread using the normal threading library and tried giving access to GUI objects and classes. After trying to modify the GUI, I received numerous errors and the GUI crashed. I discovered that PyQt (the library I am using to create my GUI) has a main loop queue for GUI events. Once an event such as a mouse click or a button click is noticed, the main loop thread queues these into the event queue and the GUI handler does the rest. When working with one of my mentors, Tim, we thought the best solution would be to access the main queue and modify the event handler to process the type of event that Watchdog could send. After trying numerous things, I came across an alternative solution that allows threads to send signals to the main GUI thread. I connected the proper signal to a response inside of the GUI thread so that Watchdog can display changes to the current directory inside of the GUI.6-19-15_3

After accomplishing this task, I thought the best next step to take would be to allow Watchdog to re-render the image inside of a tab that already has a rendered image. In addition to this, adding YesWorkflow properties to the left side of the graph so that the user can change the view of the graph at will. Prior to this, I had little knowledge of dynamically adding tabs and widgets, and used a visual program that can place all of the widgets and tabs once starting the program to wherever I’d like them to be. However, as the user renders more and more workflow graphs, there need to be options that correspond to these new renderings. The ordering in adding horizontal/vertical layouts as well as widgets in them that can “fit-to-screen” is very important and took some time with experimentation. At the end of the week, I added some buttons and widgets that allow the user to customize their renderings, but next week I will be working more on live updates with the user. Below are some images I have taken of the current YesWorkflow GUI.

6-19-15_1 6-19-15_2


Leave a Reply

Your email address will not be published. Required fields are marked *