<div>Dear Mailing list,</div><div><br></div><div>Here is the next to last report on improving the online package review</div><div>interface for <a href="http://mentors.debian.net">mentors.debian.net</a> (debexpo),</div><div>
<br></div><div>_So what's done yet?_</div><div><br></div><div>__git Storage__</div><div><br></div><div>        The first work was supposed to be test with real data from package, I made something really easy to use, a function</div>
<div>    change() that will handle the import, than I will use the repository from the git at every place (and help function</div><div>    for harder stuff)</div><div><br></div><div>        I share this work with dulwich people and I change a lot of thing after this, I really miss some information in the</div>
<div>    doc and they explain me why I was doing some stuff wrong, and how I can fix it.</div><div><br></div><div>        I add some trouble with os.path.join or split, but I finally found why it's wasn't working and use string.join/split</div>
<div>    when os.path can't do the job.</div><div><br></div><div>        Than I fix it and the importer work pretty fine except some dual import that I fixed later, I also add log message</div><div>    to know what's going on during the import.</div>
<div><br></div><div>        I test this lib with real source, and I had trouble to build them (missing lib...) but Clément gave me the good</div><div>    commands that I was looking for since 2 or 3 weeks and everything went fine include importer. It was working; I can</div>
<div>    get sources from the repository. While doing the import I fix a lot of import in the importer.py.</div><div>    But first git access show that tree were empty, and mad everything by hand (building blob, than tree, link both than</div>
<div>    commit) instead of using stage function. But the problem came from two things, first of all I used absolute path,</div><div>    instead of repository path, and a function was supposed to list file and do.. Nothing.</div>
<div>        Now it's working and tested with several random useful package and history tracker work fine.</div><div><br></div><div>__Version browser__</div><div><br></div><div>        I made a first new version with changing url map in order to get the last revision but I add a lot of small bug each</div>
<div>    time I try to access revision, that's why I decided to rewrite almost the half of the browser in order to start from</div><div>    revision and then handle last version instead of last revision and patch for revision.</div>
<div><br></div><div>        I made something really cleaner than excepted with logical function, get and build, that's work together. this take a</div><div>    lot of time because I wanted to change all the logic of the controller.</div>
<div><br></div><div>        The new version work with revision better than possible. I added links to get older and newer revision in order to</div><div>    browse it. I fix some commit_id stuff, one of the main goal  was to have a readable url, and having a commit id that</div>
<div>    take 20 char in you url isn't really.. Readable.</div><div><br></div><div>        Than I started the work on diff viewer, I didn't want to work as github[0] for diff viewer because I think this is</div><div>
    not really user-friendly, we don't have the whole document, the diff break it. I first let the difflib build the</div><div>    table, it's showing something quite pretty but they were no color, line numbers and no syntax highlighting. I decided</div>
<div>    to drop this Idea and try with sequence matcher and adding by hand tags to html.</div><div>    This was not really user-friendly because of deleted/inserted lines the document wasn't really side-by-side.</div>
<div><br></div><div>        I tried again with make_file from diff lib and I discover that it was better than I thought first, I notice class</div><div>    name for change highlighting, and I apply this change to the make_table function (where make_file build the whole</div>
<div>    file, with legend, anchor html tag etc.. make_table build  the table only). This was one of the best versions of the</div><div>    diff viewer but it was without syntax highlighting.</div><div><br></div><div>        I try to do something like, highlight first than put in table or the opposite but both produce html as text and not</div>
<div>    as html.. I gave up for a mix between both solutions.</div><div>        I came back to the sequence matcher, I didn't really use it as it's supposed to be used, I first imagine something</div><div>    that build a list like [ (nb_of_line,type_of _change) ...] and do in mako a loop over original content and diff content</div>
<div>    at the same time, which check at each line if the line got a style. This was a too low-level solution. After</div><div>    discussing about it with my mentor, I decided to do the list, and apply the list to the content before displaying it.</div>
<div>    Finally I find a function on the difflib that give me lines that changes, blank lines, new lines and deleted lines,</div><div>    it was perfect and work pretty fine, some choice in this lib are not the best one for this work but it's working and it's useful.</div>
<div><br></div><div>        As requested I build a diff standard output in order to display both (side-by-side) and highlighted diff output,</div><div>    this was quite easy, excluding encoding issues.</div><div><br></div>
<div>        I also add something that display diff between folder, it use the dulwich include write_tree_diff that show what</div><div>    change between two tree.</div><div><br></div><div>        Now I have something working, I have trouble to using the project repository to show issues that I have, I rather like</div>
<div>    my own work to show my own work :)</div><div><br></div><div>__msg_service__</div><div>    Ajax is working pretty fine, and a sample show how to use it in the easiest way, also if we want to use it without ajax</div>
<div>    we will need a global change on mako system in order to add block to base.mako</div><div><br></div><div>__Comments__</div><div>        I start the work on comments as I was supposed to, the first work was on the database, I have to create something</div>
<div>    which links users and comments to have a 'activity' to follow later. This was quite easy to code but less to make it</div><div>    work, I created a new table in my database in order to feet with my own requirement.</div>
<div><br></div><div>        I begin to work on the controllers to test if the database is working and how I will handle it, it's work with two</div><div>    part, the comments.mako which is used to list the comments and interact with existing comments and the form.mako</div>
<div>    which is used to create new comments.</div><div><br></div><div>        Both part are linked with javascript, but after a small fix, I will add a no-js version. Also they are made to work</div><div>    with all part of debexpo which deals with package.</div>
<div><br></div><div>        The current work is on database, I have to changes some names on the whole project in order to have something that</div><div>    fits the rest of the project. And after that the rating will be ready</div>
<div><br></div><div>_what is missing?_</div><div><br></div><div>  Comments tab on diff viewer (few minutes)</div><div>  Index (less than 1 hours)</div><div>  Stamina (few hours)</div><div><br></div><div><br></div><div>_what were the main difficulties?_</div>
<div>       I couldn't end this report without talking about encoding, In all the test I could make on debexpo, I had</div><div>    encoding/decoding issues, always everywhere, I first spend a lot of time in docs in order to know how to handle it</div>
<div>    write, but you can find a lot of doc about Unicode>string but as soon as you want the opposite, doc suddenly</div><div>    disappear! they was only the find-encodage-by-using-lib solution that seem working. But for a stupid reason</div>
<div>    (wget say 403 when I tried to download the lib) I gave up for this solution.</div><div>        I finally fix my first problem using a xhtml encoding, and this was working pretty fine. it was too good for work</div>
<div>    everywhere, as soon as I began the diff viewer it stops working. The best solution I found was to avoid theses errors</div><div>    by using clever trick.</div><div>    But with all the work I produce on encoding, I'm able to handle all type of char (including jap char and ü)</div>
<div><br></div><div>        The second main difficulties was my older working process on the code browser, I made something working, than add</div><div>    other work as patch on the first work. But each time I add something, I got bugs on the first work, it took at lot</div>
<div>    of time to fix again and again issues in original work (including a lot of encoding issues). I solve this point by</div><div>    rebuilding the whole work with something that could handle all case.</div><div><br>
</div><div>        Having a working database was the latest difficulties of the latest weeks; I gave up with creating a new database</div><div>    with everything new. I add only the table but first I have no id for comments, then I had the same problem than usual</div>
<div>    'no right to do that'. then it's issues with column, then with data type and nullable rows..</div><div>    I solve most of them and I didn’t find new bugs in latest tests.</div><div>    I had also trouble with form validating that doesn't appear to work properly with ajax, I find a small trick that avoid the decorator</div>
<div><br></div><div><br></div><div>_What is next?_</div><div><br></div><div>  I will focus on started jobs, end the comments engine will take few days (to have everything’s fine). Then the activity</div><div>  trackers, then list filter then team integration then syndication interface.</div>
<div>  at this point there is a lot of work to do but I will have more times than weeks before, I will try to do as much as</div><div>  possible before the deadline, it may be hard to end perfectly all the stuff that I planed but not impossible.</div>
<div><br></div><div>_this is cool, show me evidences!_</div><div><br></div><div>    of course!</div><div>    you can find sample on my work environment (I can't do static content for this it will take too much time) :</div>
<div><br></div><div>    code browser : <a href="http://kolo.fr/codebrowser.html">http://kolo.fr/codebrowser.html</a></div><div>    side-to-side : <a href="http://kolo.fr:5000/package/cowsay/diff/e6..e4/debian/copyright">http://kolo.fr:5000/package/cowsay/diff/e6..e4/debian/copyright</a></div>
<div>    diff output : <a href="http://kolo.fr:5000/package/cowsay/difffile/e6..e4/debian/copyright">http://kolo.fr:5000/package/cowsay/difffile/e6..e4/debian/copyright</a></div><div>    folder diff viewer : <a href="http://kolo.fr:5000/package/cowsay/diff/e6..e4/debian/">http://kolo.fr:5000/package/cowsay/diff/e6..e4/debian/</a></div>
<div>    revision browser : <a href="http://kolo.fr:5000/package/cowsay/browser/e6/debian/">http://kolo.fr:5000/package/cowsay/browser/e6/debian/</a></div><div>    comments : <a href="http://kolo.fr:5000/package/cowsay/browser/d9/README">http://kolo.fr:5000/package/cowsay/browser/d9/README</a></div>
<div><br></div><div>Thanks for reading!</div><div>Again Feel free to query me on Irc for any question, idea, or information!</div><div>Good luck!</div><div>ko_lo</div><div><br></div><div>[0] <a href="https://github.com/rails/rails/commit/7d54fba4218115b77c6775ef9c2257d56b2df577">https://github.com/rails/rails/commit/7d54fba4218115b77c6775ef9c2257d56b2df577</a></div>
<div><br></div><div><br></div><div><br></div>