{"id":2600,"date":"2015-06-19T17:49:41","date_gmt":"2015-06-19T17:49:41","guid":{"rendered":"https:\/\/notebooks.dataone.org\/?p=2600"},"modified":"2015-06-19T17:49:41","modified_gmt":"2015-06-19T17:49:41","slug":"week-4-overcoming-struggles","status":"publish","type":"post","link":"https:\/\/notebooks.dataone.org\/workflow-view\/week-4-overcoming-struggles\/","title":{"rendered":"Week 4: Overcoming Struggles"},"content":{"rendered":"

 <\/p>\n

 <\/p>\n

I just finished week four of my internship. This week was full of researching and struggling through problems.<\/p>\n

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\u00a0solution\u00a0that allows threads to\u00a0send 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\"<\/a><\/p>\n

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.<\/p>\n

\"6-19-15_1\"<\/a> \"6-19-15_2\"<\/a><\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

    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 Continue reading Week 4: Overcoming Struggles<\/span>→<\/span><\/a><\/p>\n","protected":false},"author":99,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[347],"tags":[],"_links":{"self":[{"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/posts\/2600"}],"collection":[{"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/users\/99"}],"replies":[{"embeddable":true,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/comments?post=2600"}],"version-history":[{"count":1,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/posts\/2600\/revisions"}],"predecessor-version":[{"id":2604,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/posts\/2600\/revisions\/2604"}],"wp:attachment":[{"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/media?parent=2600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/categories?post=2600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/tags?post=2600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}