<div id="magicdomid2" class="" style="padding-right:1px;font-family:Arial,sans-serif;font-size:13px;line-height:17px"><div id="magicdomid2" class="" style="padding-right:1px">Dear Mailing list,</div><div id="magicdomid2" class="" style="padding-right:1px">
<br></div><div id="magicdomid2" class="" style="padding-right:1px">Here is the last report on improving the online package review</div><div id="magicdomid2" class="" style="padding-right:1px">interface for <a href="http://mentors.debian.net">mentors.debian.net</a> (debexpo),</div>
<div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px">_ Summary for our friendly org admins _</div><div id="magicdomid2" class="" style="padding-right:1px">
<br></div><div id="magicdomid2" class="" style="padding-right:1px"> My summer of code project, "Improving the online package review interface for <a href="http://mentors.debian.net">mentors.debian.net</a>", intended to add and </div>
<div id="magicdomid2" class="" style="padding-right:1px"> improve some of the features of debexpo. This software, while in production for a year now on <a href="http://mentors.debian.net">mentors.debian.net</a>, </div>
<div id="magicdomid2" class="" style="padding-right:1px"> needed some work to be more adapted to the workflow of its users. During this project, I implemented a code browser</div><div id="magicdomid2" class="" style="padding-right:1px">
with revisions and online threaded comments, to allow for easy online reviews. Those comments can be rated by</div><div id="magicdomid2" class="" style="padding-right:1px"> other users for "karma", and can be summarized and sent by email to, for instance, the sponsorship-request bug,</div>
<div id="magicdomid2" class="" style="padding-right:1px"> hence keeping track of progress and accomodating other users' workflows. Provisions have also been made </div><div id="magicdomid2" class="" style="padding-right:1px">
for the integration of specific workflows for packaging teams, although they need to be completed.</div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px">
_So what's done yet?_</div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px">__comment engine__</div><div id="magicdomid2" class="" style="padding-right:1px">
<br></div><div id="magicdomid2" class="" style="padding-right:1px"> This was the biggest part of my work, I didn't expect to work that much on it but I got a lot of issues very hard to handle,</div><div id="magicdomid2" class="" style="padding-right:1px">
I had to change a lot of things in the database in order to have something clean,</div><div id="magicdomid2" class="" style="padding-right:1px"> yet it's almost clean but If I want to have something perfect,</div>
<div id="magicdomid2" class="" style="padding-right:1px"> I need to change all of debexpo's database model declarations and it will take too much time.</div><div id="magicdomid2" class="" style="padding-right:1px">
</div><div id="magicdomid2" class="" style="padding-right:1px"> My first try on database resulted in painful errors, I got cyclic imports, not for 1 or 2 loops but for at least 3 loops,</div><div id="magicdomid2" class="" style="padding-right:1px">
I found a solution on the Great Internet that looks ok. Documentation on cyclic imports with python isn't really helpful,</div><div id="magicdomid2" class="" style="padding-right:1px"> I learned that it was one of the most painful issue with python, and I learned that there is no perfect solution,</div>
<div id="magicdomid2" class="" style="padding-right:1px"> and I should try some small tricks.</div><div id="magicdomid2" class="" style="padding-right:1px"> After these first issues, I realised that I was not able to use the same validation decorator with ajax and later with</div>
<div id="magicdomid2" class="" style="padding-right:1px"> standard POST, I found a solution that acts exactly as the decorator but with human readable code.</div><div id="magicdomid2" class="" style="padding-right:1px">
</div><div id="magicdomid2" class="" style="padding-right:1px"> The first working samples were with ajax and worked pretty fine, I changed a lot of things in the user interface</div><div id="magicdomid2" class="" style="padding-right:1px">
during this part, and that's why my first works on message service was really helpful. Now posting comments is</div><div id="magicdomid2" class="" style="padding-right:1px"> working and if it fails, you will have a fancy little message that tells you the error.</div>
<div id="magicdomid2" class="" style="padding-right:1px"> </div><div id="magicdomid2" class="" style="padding-right:1px"> As posting comments was now working I focused my work on the thread system, this was not as easy as I thought,</div>
<div id="magicdomid2" class="" style="padding-right:1px"> I wanted to do as reddit[0] does, while using a type of comments (good things, bad things, information, idea) </div><div id="magicdomid2" class="" style="padding-right:1px">
in order to have something that you can browse fast if you are lazy. Answering to a comment was just about</div><div id="magicdomid2" class="" style="padding-right:1px"> adding a field to the form, to refer to the parent comment. this was quite easy but I made the best list builder</div>
<div id="magicdomid2" class="" style="padding-right:1px"> that I could in order to output threads. Unfortunately, this didn't work, there were about 5 lines and somewhere in these 5 lines something was wrong.</div>
<div id="magicdomid2" class="" style="padding-right:1px"> I asked for some help and Nicolas noticed that I wasn't using my relation in the good direction,</div><div id="magicdomid2" class="" style="padding-right:1px">
I was using the fact that a comment had a parent instead of using the fact that comments could have replies.</div><div id="magicdomid2" class="" style="padding-right:1px"> </div><div id="magicdomid2" class="" style="padding-right:1px">
So I worked again on the database and I noticed that I wasn't using any relation,</div><div id="magicdomid2" class="" style="padding-right:1px"> I finally understood that it was because of my cyclic import issue. I tried it again and again,</div>
<div id="magicdomid2" class="" style="padding-right:1px"> and finally asked again for some help then I realise that I shouldn't have cycling import if I'm doing things in the right order.</div><div id="magicdomid2" class="" style="padding-right:1px">
Finally, the relation 'comment answers to another comment' (child has a parent) works. With my code</div><div id="magicdomid2" class="" style="padding-right:1px"> it should work fine but it may be better to work with a relation 'comment got answer' so I tried again and this time</div>
<div id="magicdomid2" class="" style="padding-right:1px"> I couldn't avoid the cycling import. Nicolas sent me the comments model using another type of model declaration</div><div id="magicdomid2" class="" style="padding-right:1px">
but this kind of declaration (the "declarative base" in SQLAlchemy) required a change on all model declarations.</div><div id="magicdomid2" class="" style="padding-right:1px"> </div><div id="magicdomid2" class="" style="padding-right:1px">
I finaly solved my issue with comment sorting, I thought that python would be able to compare 2 objects with their</div><div id="magicdomid2" class="" style="padding-right:1px"> id but it's not possible (and not useful). so I fixed that and it was working fine. </div>
<div id="magicdomid2" class="" style="padding-right:1px"> But this isn't the best way to do this and I should change all the model declarations one day.</div><div id="magicdomid2" class="" style="padding-right:1px">
</div><div id="magicdomid2" class="" style="padding-right:1px"> The next step was the rating on comment, this was as easy as adding a new form on the page excluding some form issues,</div><div id="magicdomid2" class="" style="padding-right:1px">
this was simple to solve with pylons' webhelper. It's currently working fine with or without js.</div><div id="magicdomid2" class="" style="padding-right:1px"> As requesteed, the best rated comment and the latest one are listed on the main page. For the latest it was quite easy</div>
<div id="magicdomid2" class="" style="padding-right:1px"> but the first one used a filter that sorts comments from lower karma to higher karma, then comments without karma</div><div id="magicdomid2" class="" style="padding-right:1px">
and I wasn't able to get the best comments, I had to remove all the None values before getting the best rated comment.</div><div id="magicdomid2" class="" style="padding-right:1px"> I would like to produce a work that can work at every place you want, so I split it in small part in order to get exactly</div>
<div id="magicdomid2" class="" style="padding-right:1px"> what you want, for example in the index page, I need only something that display 1 comments, and 1 other.</div><div id="magicdomid2" class="" style="padding-right:1px">
this looks really easy with a mako template inclusion, but for each included stuff I lost almost all the variables from the context.</div><div id="magicdomid2" class="" style="padding-right:1px"> </div><div id="magicdomid2" class="" style="padding-right:1px">
I lost time trying to solve this with "global" variables but this wasn't the good solution,</div><div id="magicdomid2" class="" style="padding-right:1px"> I needed to use mako includes with arguments. Of course docs on it exist but it was pretty hard to find because</div>
<div id="magicdomid2" class="" style="padding-right:1px"> it wasn't used in the same way than I did. This changed a lot of things in the mako templates but it's working better</div><div id="magicdomid2" class="" style="padding-right:1px">
than expected. Also it makes ajax answers safer because instead of sending the User objet </div><div id="magicdomid2" class="" style="padding-right:1px"> (with every things including password *cough*) I'm sending only the name. (Of course this security was planned</div>
<div id="magicdomid2" class="" style="padding-right:1px"> but the solution was found before I noticed this problem)</div><div id="magicdomid2" class="" style="padding-right:1px"> At each time I read again my code, I found a lot of things that could change in order to get something better and better</div>
<div id="magicdomid2" class="" style="padding-right:1px"> so I will be able to make better version of this soon.</div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px">
__git storage__</div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px"> I was working with a not-obvious link between Package's version and git storage, as simple as new version == new commit</div>
<div id="magicdomid2" class="" style="padding-right:1px"> than access to the 3rd package's version result in access to the 3rd commit.</div><div id="magicdomid2" class="" style="padding-right:1px"> This was easy to understand ( as soon as you got it, this is a little paradoxal, I know) but not really suitable</div>
<div id="magicdomid2" class="" style="padding-right:1px"> to the work needed, so I added the "commit id" to the database and changed the parts of the project that needed it.</div><div id="magicdomid2" class="" style="padding-right:1px">
it was quite easy and may help other developers with this tool, docs is now available.</div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px">_what is missing?_</div>
<div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px"> Activity tracker isn't here, it was started but not finished for the first deadline. But the work wasn't really good</div>
<div id="magicdomid2" class="" style="padding-right:1px"> as the project is not really 'user' aimed but more 'package' aimed (which is more logical)</div><div id="magicdomid2" class="" style="padding-right:1px">
Syndication interface isn't started, time was missing to start another chunk of work, even if how I planned it,</div><div id="magicdomid2" class="" style="padding-right:1px"> it was supposed to be easy to do.</div>
<div id="magicdomid2" class="" style="padding-right:1px"> Team integration, this is very sad that I didn't get time to finish it, I know that I started to think about it</div><div id="magicdomid2" class="" style="padding-right:1px">
because it was one of the most important things for the project, I know that I did some work on it in my first commit,</div><div id="magicdomid2" class="" style="padding-right:1px"> but I didn't find the time to end it.</div>
<div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px">_what were the main difficulties?_</div>
<div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px"> As I said before, I had a lot of difficulties with the python language, cyclic imports were the most hard to handle,</div>
<div id="magicdomid2" class="" style="padding-right:1px"> the small one with the equal (I may think more in 'object'). I got difficulties with the form validation system</div><div id="magicdomid2" class="" style="padding-right:1px">
that required some searches on the Great Internet.</div><div id="magicdomid2" class="" style="padding-right:1px"> Again I spent a lot of time with the database, because of cyclic import and because of something that wasn't on the docs</div>
<div id="magicdomid2" class="" style="padding-right:1px"> of the project (and is now), the database wasn't setup by the project, I had to do it by hand,</div><div id="magicdomid2" class="" style="padding-right:1px">
and it's because an import was missing in the initialization file.</div><div id="magicdomid2" class="" style="padding-right:1px"> Time and organisation was the last hard point of this last part of the project, I did the best possible but</div>
<div id="magicdomid2" class="" style="padding-right:1px"> I have too many things to do and I have to make good work.</div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px">
_What is next?_</div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px"> Excluding gsoc stuff ( evaluation, code submission), I have to merge my branch to the current project,</div>
<div id="magicdomid2" class="" style="padding-right:1px"> solve the possible issues, then I would like to do the missing stuff you could read before.</div><div id="magicdomid2" class="" style="padding-right:1px"> Finally, there is room for improvement on the comments engine.</div>
<div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px">_All this sounds cool, but show me some evidence!_</div><div id="magicdomid2" class="" style="padding-right:1px">
<br></div><div id="magicdomid2" class="" style="padding-right:1px"> comments : <a href="http://kolo.fr/comments.html">http://kolo.fr/comments.html</a></div><div id="magicdomid2" class="" style="padding-right:1px"> this is a sample of the comments engine with threads,</div>
<div id="magicdomid2" class="" style="padding-right:1px"> comments are hidden by default, a panel will apear if you click on the button</div><div id="magicdomid2" class="" style="padding-right:1px"> it won't annoy you if you need to use the horizontal scroll</div>
<div id="magicdomid2" class="" style="padding-right:1px"> it will still work if you turn off javascript</div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px">
_last words _</div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px"> This is the last report and I would like to end it with several thanks to all the people that help me / cooking-giving / make gsoc possible, </div>
<div id="magicdomid2" class="" style="padding-right:1px"> especially to my mentors and other people on #debexpo. I learnt a lot of things during this few months</div><div id="magicdomid2" class="" style="padding-right:1px">
and I hope the work I did will help some packages get into Debian!</div><div id="magicdomid2" class="" style="padding-right:1px"> Thanks for reading!</div><div id="magicdomid2" class="" style="padding-right:1px"><br>
</div><div id="magicdomid2" class="" style="padding-right:1px">Again Feel free to query me on Irc for any question, idea, or information!</div><div id="magicdomid2" class="" style="padding-right:1px">Good luck!</div><div id="magicdomid2" class="" style="padding-right:1px">
ko_lo</div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px">[0] <a href="http://www.reddit.com/r/debian/comments/bhd6u/thank_you_debian/">http://www.reddit.com/r/debian/comments/bhd6u/thank_you_debian/</a></div>
<div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px"><br></div><div id="magicdomid2" class="" style="padding-right:1px">
<br></div></div>