Report #3 about Porting GTG – Final Report


Finally comes the end of GSoC 2013. After submitting the final evaluation, I am glad to have a chance to look back to what I have done in this summer.

During the last period of GSoC, I am working on two major tasks. One is to make current porting code get rid of deprecated objects [1] , the other is to set up coverage to test the porting code as much as possible.

For deprecated objects, it’s not a hard task as most deprecated objects can be replaced by other alternative ones easily. With the help of tool like grep [2] or ack [3], it’s easy to find them and everything can be done with little modification. The only one needs more attention is `Resource Files` [4]. Different from simply changing `GtkVBox` to `GtkBox` with the “orientation” property set to `GTK_ORIENTATION_VERTICAL`, `Resource Files` do not follow the pattern. We need to check each methods like `gtk_rc_get_style()` [5] whether exists in previous code. Then it will comes to the problem how GTK C documentation [6] “convert” to `PyGObject` [7]. As C doesn’t support objects so each method is named specifically with `gtk_` prefix followed by object name like `rc_` and the rest is the `real` method name. So we need to grep or ack `get_style` and do the same thing for others.

The `coverage` [8] part is another big harvest I learned in this summer. After discussion with mentor, Izidor Matušov [9], I finally came up the usage of coverage and how to apply it to current codebase to make sure most porting work especially the gtk part works fine. As it is hard to write unit test for interactive GUI applications, we can use coverage to run GTG GUI program and use it just like common user. And then generate the coverage report to see which part has been tested or not. At the same time, we can come up a list of actions for future testing. So I listed the actions for testing in a shared evernote [10] also with the coverage report. It shows that the gtk part of GTG works almost fine with 86% coverage after fixing serveral bugs.

It’s really amazing to have the porting work almost done, I am going to propose a merge request to make all the code into trunk branch. Though it really comes to the end of GSoC 2013, I will continue to work on the project. This is only a beginning for my open source experience. :-)

[1] https://developer.gnome.org/gtk3/stable/DeprecatedObjects.html
[2] http://www.gnu.org/software/grep/
[3] http://beyondgrep.com/
[4] https://developer.gnome.org/gtk3/stable/gtk3-Resource-Files.html
[5] https://developer.gnome.org/gtk3/stable/gtk3-Resource-Files.html#gtk-rc-get-style
[6] https://developer.gnome.org/gtk3/stable/index.html
[7] https://wiki.gnome.org/PyGObject
[8] http://nedbatchelder.com/code/coverage/
[9] http://izidor.matusov.sk/
[10] https://www.evernote.com/shard/s43/sh/8e6e0ce8-227e-4c7a-b1e4-1e4e13e2728a/3b9d652d1303c5418292963b9483155c

,

One response to “Report #3 about Porting GTG – Final Report”

  1. Great post! GTG is a neat little project, reminds me of Hamster a lot in terms of clean but minimal and functional UI. GTG still needs some work, since it is a new project, but I am using it, and I like it so far! (I have fixed the Hamster plugin somewhat so it works again on my end, but it still needs more work.)

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.