Author Archives: ayrus12

Status Reports: Mar 15, 2013

Jonathan Demelo:

Currently

  • Completed 1.0 version of my second task, adding new optional fields to the Submission banner.
  • This involved changing the original structure of the banner – front-end, back-end, and the connections between, touching HTML templates, page jQuery, conversion datastore jQuery,  API layer, review models, change description models, and finally the review views.
  • Received feedback via grading report, helping tailor my final steps over the final few weeks.

Roadblocks

  • None.

Next

  • Help others through peer reviewing.
  • Finalize anything left over for my two projects to prep for inclusion.

Questions

  • None.

Yuri Honami:

Currently:

Roadblocks

  • None.

Next

  • Add infobox for trophy.

Questions

  • None.

Felix Sung:

Current

  • Set up configuration files, code for schema (will post WIP later).

Roadblocks

  • None.

Next

  • Thinking about interface for adding checklist items
  • Build said interface

Questions

  • None.

Surya Nallu:

Current

  • Ported existing AJAX calls and dynamic data on the DOM to backbone (as opposed to using jQuery calls).
  • Added new features continuing on the backbone model/views: Screenshots, Pre-install warnings/information, extension category information.
  • All of this information is showed within a tabbed modal box for a smoother interface.
  • A draft WIP review request will be up by Saturday (16th).

Roadblocks

  • None.

Next

  • There are still some usability issues that are present. For example, the tabbed interface within the modal currently uses a native jQuery UI theme. This needs to be customized to fit the RB interface. I will be polishing these usability issues.
  • I would have to wait for a review on the WIP coming out to determine my next steps accurately. I’m not sure if my backbone implementations follow everything correctly. If there are issues/suggestions, I’ll fix them or if it’s mostly fine with little changes, I’ll come up with new tasks by looking at other add-on stores (as mentioned in previous weeks) and let the mentors know.
  • Following the midterm feedback received, I’ll be participating in code reviews.

Questions

  • None

Niklas Hambüchen:

Current

  • Was not able to do RB work since I’m still pretty sick and have my exams
    next week

Questions

  • Can we shift my last two weeks by two weeks? I would appreciate getting
    reviewboard out of my exam time.

Hiroki GOHARA:

Current

Roadblocks

  • None

Next

  • modify according the review.

Questions

  • None 

Greg Wang:

Current

  • Add markdown rendering to diff_comment and review.body_bottom
  • Failed to apply markdown to regular comments

Roadblocks

  • Adding markdown rendering to comments in review_reply.html prevents the `This reply is a draft` banner to appear.

Next

  • Finish adding markdown rendering
  • Adjust markdown style

Questions

  • Have no idea why changing the text will cause issue to the banner. The ID for the block stayed same, but changed from `pre` to `div`. Is that a issue?

Katherine Schramm

Current

  • Updated code based on ReviewBot reviews (not completely sure what “continuation line under-indented for visual indent” means though)
  • Added more columns and removed unnecessary code

Next

  • Start putting this data grid in its own place on the user profile rather than taking over the regular list of review requests

If the above doesn’t take long, I might also start one of the following:

  • Adapt the ShipItColumn to use for this
  • Count comments and replies to review and display in a column
  • Ddetermine if a reply has issues and display this

Roadblocks

  • Just figuring out how to do the things on my ‘next’ list

Questions

  • It looks like comments on a review are considered another review. Should the list just display the non-comment reviews and maybe also indicate if the review has comments?

Status Reports: Mar 8, 2013

Jonathan Demelo:

Currently

  • Moved on from first task and began second task, which added new fields to the submitted/discarded banner.
  • Added the fields into reviews/models.py, and connected it to the admin panel.
  • Developed an initial front-end display for the fields in the banner.
  • Addressed some of the connections in the views.py, reviews.js, etc.

Roadblocks

  • I believe I’ve found something odd… possibly an existing bug with the banner. It seems that if you publish a review, then go to the submitted banner, it’s submitted. But if you attempt to add the optional description, it’ll add the text, but then discard the submission. Is this a bug?
  • Changing the current way the description is saved, as the current way is quite limiting to the possibility of adding additional fields (see line 708 in reviews/views.py).

Next

  • Address the roadblocks and move forward for the frontend-backend connections.

Questions

  • See roadblocks.

Yuri Honami

Currently:

Roadblocks

  • I don’t detect the cause why unit-test doesn’t work.

Next

  • detect the cause of that

Questions

  • None.

Hiroki Gohara:

Current

Roadblocks

None.

Next

  • Implement handling many trophies.

Questions

  • How review request should be separated?
  • I’m about to separate tasks, “Using database for trophy” and “Handling many trophies”

Greg Wang:

Current

  • Move `FileAttachmentComment` evolution into separate evolution script.
  • Insert rendered text along the page loading process using document.write()
  • Use PIPELINE to include js and css

Roadblocks

  • None.

Next

  • Adjust the css style for markdown text
  • Apply Markdown to more textfields

Questions

  • None.

Katherine Schramm:

Current

  • Continued work on Review datagrid.

Roadblocks

  • None

Next

  • The Same
  • Will update WIP patch this weekend

Questions

  • None

Surya Nallu:

Current

  • Implement a modal box with tabs inside it for handling the extension information, screenshots, dependencies and pre-install information.
  • Migrate previous javascript work to Backbone: create a model/view for every transaction.
  • Change the extension information boxes, installation procedure to accommodate new changes: Tabbed modal box on the front-end and Backbone in the backend. This is still WIP.

Roadblocks

  • None

Next

  • Note: Some tasks have been bottenecked until the backbone migration is complete.
  • Add spinners when backbone is attempting to fetch information.
  • Usability issue mentioned last week (here: http://pastie.org/private/tnpp7yu06m4nsn8b6iydrq ). Shifted over to the week ahead because (after discussing with m_conley and ChipX86) it was decided that a modal box with tabs would be more appropriate.
  • Add category information to extensions.

Questions

  • None.

Felix Sung

Current

  • Have skeleton of an extension as per the Reviewboard Extension Guide
  • Schema proposal for Checklist Extension here:
  • Mockups on the blog post above too

Roadblocks

None

Next

  • Get feedback on design
  • Start code

Questions

  • I will need to change the “view” for reviews. I’m guessing ideally an extension shouldn’t need to do anything to the original project code. How should I insert elements, for example the checklist? I can imagine appending them through Javascript/Jquery, but that sounds somehow suboptimal.

Niklas Hambüchen

None this week, since I’m pretty sick, staying in bed and using
my computer only when I really have to.

Meeting Minutes: Group A – March 3, 2013

Announcements:

  • UCOSP (Canadian) students just passed the midterm point and their evaluations have been processed by the mentors. These students will recieve feedback soon. Feel free to discuss anything regarding the feedback – PM/email any of the mentors.

Notes:

Katherine Schramm:

  • Had trouble finding time this week for a WIP patch, but a WIP patch should be in by the end of the day.
  • Suggestion: It’s okay to post patches halfway since it’s a WIP patch.

Niklas Hambüchen:

  • Reviews of some requests completed, they look good.
  • Discussion about differences between ‘git show’ and ‘git diff’: Agreed to use ‘git show’ for now and to address any problem in the future if need be.
  • Refactored tests on request #3837
  • Wants to write the ‘how-to’ that was dicussed last week and will make a list of things that would improve the workflow.
  • It’s okay for him to re-schedule his goals since he doesn’t get credit.

Greg Wang:

  • Got the ‘marked’ library working with ‘Google code prettify’; but adding the rendering component to ‘document.ready’ is causing the text to expand it’s heiight.
  • ChipX86 instead suggests to try “document.write” instead — so that it executes as the page is being loaded and addresses the issue raised above.
  • Will try ChipX86’s suggestion and put up a WIP.
  • Question: How to go about the styling? — Shouldn’t stand out, should feel like monospaced text in the field.
  • m_conley suggests changing the zebra-stripping in the codeblocks: The source code would ideally look like the diff viewer’s code (style wise).
  • Everyone agrees that the screenshot on the review request looks very promising.
  • Will implement the live previewing soon – preview shows up on the drafts.

Surya Nallu:

  • m_conley reviewed request #3906 (ChipX86 is currently reviewing it).
  • No questions.

Closing Remarks: Keep up the good work and keep delivering WIP patches.

 

UCOSP Blog Post — Surya

I’m Surya Nallu, a 3rd year Computer Science specialist student at the University of Toronto. Past summer I was excited to be a part of Google’s Summer of Code where in I got the opportunity to work on a project; that also introduced me to Django. Django’s elegant way of representing the components within the MVC framework is hands down awesome. I liked the experience so much that I wanted to continue working on a similar project during the school term. Fast forward and it’s been the same fun ride with ReviewBoard so far.

To get a feel of the code-base and to grasp the workflow, we were encouraged to find and fix some easy bugs during the three day long sprint at Facebook. I started off with checking some bugs on the backend and fixed a simple bug involving truncation of whitespace characters in an email field. How easy was it? As easy as calling .strip() on a variable. I sent the code for a review and it was pushed to the repository. But that’s not the point. It was my first bug fix and it does, indeed feel awesome to realize that your one line change will be implicitly used by a wide array of people.

The Extension Browser
While going through the potential list of projects the one that I was most interested was in developing an extension browser module for ReviewBoard. Given that I was comfortable with Django and preferred the back-end, I was stuck on pursuing the same. What is it? It’s a module on the ReviewBoard administration end, which lets you browse extensions (from a yet to be store — which will serve as a directory of extensions available) and install them right away. It’s analogous to WordPress’ automatic plugin installation. Why is it needed? First, since anyone can make an extension for ReviewBoard as a potential administrator you don’t possibly know all the extensions that exist. Second, as of now, you have to manually install the extension (which is ultimately a Python egg, given that Django runs on Python) on the server — which involves you to SSH into the server and perform the installation. This isn’t ideal. By creating an in-application extension manager, the administrators have the convnience of finding and installing an extension of their choice on-the-fly. No SSH, direct access to the server or technical know hows are required. Just find an extension and install.

Under the hood, the module would communicate with an API on the (yet to be) extension store and expect JSON responses. You get to specify what kind of extensions you’re looking for and are presented with the search results. You then have the option to look into more details for a particular extension or to install it. Installation is handled on the back-end through invoking easy_install within RevewBoard. If everything goes well, your new extension is up for use.

The progress so far: YouTube screencast

Starting trouble:

Initially upon taking up the project, one of the bugs that had been already reported needed attention. The bug was that upon installing an extension, you had to re-start the server (the development server or the appropriate WSGI platform) for the installation to take effect. You can see why this was something that needed to be fixed right away — on-the-fly installations from the extension browser module won’t take effect immediately. I started looking into it during the sprint and it took a while for us (Christian, Steven and I) to figure out what exactly was causing it in the first place. What was the problem?

Aside: When easy_install is used to install a package (in our context – the extension), the package/extension is made exposed to ReviewBoard with the help of entrypoints. The way I see it, it’s a registry of installed Python modules with each package associating itself with one or more entrypoints. The entrypoint associated with ReviewBoard is “reviewboard.extensions”; so any package that advertises itself to this entrypoint is accessible within ReviewBoard (and can be treated as an extension).

The issue technically here was that upon installing an extension, the extension wasn’t visible within the ReviewBoard’s extension entrypoint immediately. If we restarted the test server, the entrypoints got updated. Okay, so we figured (after a couple of searches and reading up resources) that the problem was with the package not being activated within the entry point and hence not being accessible instantly. We ended up reading through this thread and figured that’s the exact problem we were facing. We went ahead and applied the fix only to find it still not working. It became clear eventually that something specific to ReviewBoard was further causing the problem. How did we figure where?

We had to narrow down the problem to its root. Since we were calling easy_install directly within a python script, our first guess was that doing so was creating a problem; since usually easy_install is invoked through the shell. We created a test python script emulating exactly what we wanted and it worked; the entrypoints were getting updated as it was stated in the StackOverflow thread. Alright, narrowed down a little deeper. Next point was to see if Django itself was inhibiting something. So I emulated the same process within a test Django app and it worked fine. Okay, so Python’s good, so is Django. This confirmed that the ReviewBoard codebase was doing something special (or rather weird!). ReviewBoard (Djblets to be specific) provides a convenience function that lets you iterate through its extensions entrypoint.  I then manually iterated and printed through all the packages that were present in this entrypoint (post an installation) and the new extension didn’t show up. To confirm again, I accessed the entrypoint directly myself (this time, not through the convenience function) using Python’s pkg_resources module and voila the new extension did show up now. So we clearly realized that the problem was the way the class holding the convenience function was handling the entrypoint (Djblets/extensions/base.py). It turned out that a stale line of import had no effect and it was creating the problem. Removing it, everything worked well.

Tips

Here are some tips that I personally find effective to be productive with working on ReviewBoard (or generally UCOSP itself):

  • Find a good chunk of time to work on it. Having a continuous chunk of hours is way better than having small blocks of them split across the week. I typically prefer to spend a whole day in a week as a result and it helps me keep the momentum. It’s especially bad when you’re having all these nice ideas fly through your head about your implementation and you’ve to quickly stop and switch to some other work.
  • When in doubt, ask! Though I’m fairly comfortable with Django, I often find myself not remembering the exact specifics of it. Django has pretty awesome documentation on everything you’d need. Moreover, if the problem is too specific chances are someone else has encountered the same problem before and it’s up on StackOverflow (that’s how we found the thread linked above in “Starting trouble” — I just Google’d “easy_install without restart”). Lastly, ping your mentors whenever you’re stuck. I often think of approaches that seem very elegant at first but after a quick discussion, it turns out there are better ways.
  • Although this can be contested, printing for debugging is okay. While I love debuggers, it’s not all that easy (and often not necessary, especially) to quickly inspect a variable or a function you wrote on the server side with a debugger for Django. I add a raw_input() statement immediately followed by a print statement so that the values I’m interested in show up on the console running the test server and wait for my go (raw_input() will block) to continue processing ahead.

That’s all I have for now! I’m excited that the extension browser module would soon be a useful addition to ReviewBoard.