I have tweaked the layout of application a little bit. Some tweaks come from my head and others mainly from my GSoC mentor.
My mentor Josef Skladanka added issue that bugs should not be opening in browser after single click. It’s a little disturbing and user may not know what’s happening. I’ve changed this behavior to double-click opening. I think this solution should be enhanced because double click is still not good enough. You can see the change in this commit.
Next Josef’s issue was about sorting of comments. QTreeWidget supports sorting but if I want to sort numbers (as order of comment) it sorts it as text – not as number. This is really a problem and I had to overwrite method __lt__() of QtGui.QTreeWidgetItem.
def __lt__(self, otherItem):
column = self.treeWidget().sortColumn()
return float( self.text(column) ) > float( otherItem.text(column) )
return self.text(column) > otherItem.text(column)
Another issue pointed out vertical alignment of first three columns in comments. It’s fixed too and it really looks better now.
The next is addition is in adding comments. I’ve moved text inputs to another tab. Now it looks like this:
Fedora Gooey Karma now supports adding comments to Bodhi so you can use this app for adding karma. 🙂
List of packages can be filtered for packages which does not have submitted karma from provided user. This feature was in layout but not working. This bug is fixed now and you can use it for easier navigation in packages.
A big step in Fedora Gooey Karma development are available packages. This feature should be able to filter out packages which the user has installed but there is newer build in Bodhi. Thanks to this user can browse what’s new in newer build easily.
There will be button to update to this version in near future.
I think left side of layout was a little messy. I’ve decided to split it to 3 main parts. Top part is called Filter and contains search box, karma username filter and buttons to switch between installed and available packages. The middle part is just list of (already filtered) packages. Finally the bottom part is control panel for loading packages where user can specify release number and number of “package-oldness” days.
Fedora Gooey Karma now has its own repository! It was developed by examon (Tomas Meszaros) who wrote some basic functionality before. I’ve forked his repository and created a new one which will be the main for Google Summer of Code.
Problem with threads
Tomas did a lot of great work but the code needed some tweaks. The main problem I’ve hit was with threads in Python. BodhiClient query started from thread got stuck in deadlock. It’s important to have internet queries in different thread than main GUI to don’t get it freeze for user.
So I filled a bug 972429 against fedora-python (it contains BodhiClient class) because I thought it’s problem with that. After IRC discussion with Toshio Kuratomi we figured out that problem is in implementation of python (or QT) threads. Thread cannot be spawned from imported library as it’s mentioned on the very bottom of official docs page.
Firstly, other than in the main module, an import should not have the side effect of spawning a new thread and then waiting for that thread in any way. Failing to abide by this restriction can lead to a deadlock if the spawned thread directly or indirectly attempts to import a module.
This problem was pretty serious because Tomas’s code has pretty much everything imported from one main file. I had to rewrite it to some “less abstract” code. I’ve split classes to separated files. Now we have two main “workers”. 🙂 One is for packages which get info mainly from RPM database or YUM. Second one is communicating with Bodhi servers. Application spawns 15 threads of Bodhi workers now and I hope it will be good enough to have relevant results from servers in quite a short time.
You can see these changes in this and this commit.
What to do next
Now I’m going to edit Makefile to have it properly “installable” on system because it’s runnable from src/fedora-gooey-karma which can be a little confusing for random strangers now. 🙂
After recommendation from my classmate I’ve decided to join Google Summer of Code for year 2013. Firstly I had to decide which organization and project I would like to contribute. Fedora was the first organization which came to my mind so I’ve started to read about projects on wiki idea page.
As a tester I’ve scrolled down to the section “Applications for Testers” and Fedora Gooey Karma was the best for me. I really like the idea of adding karma to new patches and how people can contribute/decide what will be in updates. I know something about project Fedora Easy Karma which is a CLI tool for adding karma via Bodhi. I am a big fan of CLI tools but it’s not enough user-friendly for this kind of work. So I’ve decided to try it.
After discussions with mentors I’ve written proposal and “won” this project for this year of GSOC.
GUI tool should bring more people to be part of testing part and I am glad that I will be part of it.
I am waiting to get writing access to correct repository and studying functionality of Fedora Easy Karma and Bodhi library.
I would like to prepare a few functions to communicate with Fedora servers and get some basic information about updates or comments which I will surely need in Fedora Gooey Karma.