Author Archives: tahnok

Meeting Minutes for Nov 25th, 2012

Announcements

  • Next meeting is our last meeting in semester!
  • Please, post whatever you have up now so that the mentors can look at it.
  • We will be having a post-mortem chat on Sunday, December 16th.
    Please think about:

    1. What did we do that was effective, that we should definitely keep
      doing?
    2. What things did we not do enough of that we should do more of?
    3. What things did we do too much of?
    4. What things should we not do at all?
    5. What new things could we do?

Questions/Answers/Tips

Q: (aam1r) Does anyone know how I can go about using a classmethod
as view for a URL pattern in Django? I’ve tried simply moving the method into a class and added the @classmethod decorator but I get the following error: http://i.imgur.com/2j9CL.png . Here’s the function that I am talking about btw: http://reviews.reviewboard.org/r/3526/diff/2/?file=23787#file23787line1344 . And here’s how it looks locally: (r'^(?P<review_request_id>[0-9]+)/file/(?P<file_attachment_id>[0-9]+)/rendered$','reviewboard.reviews.ui.markdownui.rendered_attachment')

A: (ChipX86) Try adding the class name. If that doesn’t work, just move the view out of the class

Q: (jzamp) snippet So i’m doing it this way because i need to call reviewRequestFieldEditor() if the ‘.editable’ fields are not binded to the inlineEditor(this is the case when a previously discarded review request is opened)

A: (m_conley) I don’t really like how the code is peering inside for editicon. I mean, the whole point of inlineEditor is to manage all of that stuff for us. Always bind, but if we’re in a non-editing state, bind with the initial state as disabled.
all state management should definitely go through that

Q: (slchen) I spent this past week working on new requirements for the thumbnails project; I think now it’s mostly done. Now I hope to double check with the mentors for general advice on the extensions integration with reviewUI project. I’ve gotten as far as the registering logic for registering reviewUIs from extensions. I think I can hammer out 30-40 hours before hard pencils down into the project; and if I can bug with the mentors with more questions than usual, I should be able to get most of it done. Should I continue as planned? The next steps are slchen: write the tests for registering reviewUIs as we discussed (didn’t get to do that yet b/c of thumbnails project), then mockups and then build a sample extension with a sample reviewUI based on the boilerplate code generator

A: (m_conley) Sounds like the right trajectory – just make sure you give us enough time to review

Q: (tahnok) Is it possible to have formatting inside of comments on a review, like colour?

A: (ChipX86:) Nope

Q: (yangtina) We can’t delete a file attachment from a review request yet, is that correct? If so, is there any tips on clearing up the review request? I have a lot of screenshot files on my review requests that are no longer applicable, I think they make the review request somewhat confusing and want to clean them up somehow. Would labeling them by revision number in the caption help? Any tip on good practice in this case?

A: There should be a red X next to the images that works. It turns out there was a js bug that had to be fixed.

Other news

(yangtina) I’m trying to compile a useful list of tips/useful things we wish we knew at the beginning of the term as one of the legacies of the UCOSP students for 2012. (specially on new materials, like the new api etc) I hope that it will become something that the mentors can give future students to get them started on the project faster, use as a reference as they go along, and add to as they go. If that’s something you find interested. Link to blog post

Advertisements

UCOSP Blog Post – November 6th

Hi everyone! My name is Wesley Ellis and I’m a 4th year Computer Science/International Development student at McGill university and I’ve had a lot of fun working on Reviewboard so far. This past summer I did a lot of web development in Ruby using the Rails framework and it has been very interesting to see how python and Django stack up. I do miss Ruby’s collection.each{|a| do_something(a)} but I’m looking forward to abusing using list comprehensions.

My project this semester has been to create tools for ReviewBot, an extension to Reviewboard that’s actively under development. The first tool, which I’m still working on, is to integrate BuildBot’s ability to “try” and build the code contained in review once it has been posted, and then add the status of the build to the review request. Buildbot was an obvious first choice for the Reviewboard project because that’s what we use! If you’re interested you can see the status of our test suite run against a multitude of different Django versions and operating systems at build.reviewboard.org .

ReviewBot in generall has me quite excited. I think there are many tools that would be useful to run on code that has been submitted for review. Test suites are the most obvious thing to run, especially if the test suite runs long or involves different architectures. It would be impractical to expect a contributor to be able to manage three or four installs of Django just for testing purposes. In addition, I think this is a better solution than TravisCI because it doesn’t depend on the use of git for your version control.

Automagically running code style tools like pep8 (which is already part of buildbot) and JSLint (which a fellow student is working on) can also be useful. I know that a good portion of the feedback that the mentors leave on a UCOSP student’s first review is style related. By automating this process, reviewers can focus on more important aspects of the code, like structure. You could also create a tool to run a spell checker through code comments or announce newly  posted/changed reviews to IRC, Campfire or Twitter.

Personally, I’ve found that ReviewBot has some really fascinating architecture that I’d like to try an explain here. First of all, when I say ReviewBot I’m actually referring to 2 different things. There’s the ReviewBot extension which is installed on a Reviewboard server and there’s the ReviewBot bot or worker which can be installed on any machine as long as it can contact the Reviewboard server. At first I was perplexed about this design choice, but it makes sense once explained. Some of the tasks I’ve mentioned above could be quite long running or require a special configuration, so it would be a bad design choice to require ReviewBot tools to be executed on the same server as ReviewBoard. It’s also quite possible that some people have to a tool run on Windows, but their Reviewboard server is a linux machine. No problem with this setup, but much more challenging if tools were tied more closely to the extension. ReviewBot deals with this seperation by using Celery, a distributed message processing system. In plain English, that means that workers listen for messages on a queue that the extension submits requests to in order to run certain tools on certain reviews. Sadly, the docs on Celery are a bit… lacking so I spent quite some time attempting to get what should have been (and even turned out to be!) a simple attribute, but it’s a fascinating application to learn about. While slightly more complex than one might expect at first, the benefit of isolating workers is that they can be setup to run in different environments and scaling is as easy as adding more workers.

Welp, that’s all for now folks. I hope you learned something and now want to write some awesome tools for ReviewBot!

Status Report — October 14th, 2012

Wesley Ellis

Currently:

  • Working on getting my first patch landed for reviewbot

Roadblocks:

  • Getting the host name of a celery worker!

Next:

  • Start planning/coding the build bot plugin. Looks like there was some chatter in the mailing list about this

Questions:

  • None at the moment

Jesus Zambrano

Currently:

  • Working on getting the logic of review_header.html correct.

Roadblocks:

  • None at the moment, just finding difficult to invest time on the project.

Next:

  • Getting the template right and start the jQuery side of my task.

Allyshia Sewdat

Currently:

  • Working on getting my first submission of ReviewBot in for review (aiming at this weekend at the latest)

Roadblocks:

  • None really, now trying to get JSLint to run with desired options from the command line.

Next:

  • Get feedback on the JSLint static analysis tool, and making appropriate changes. Then, look at adding the UI for manually triggering the code analysis.

Aamir Mansoor

Currently:

  • Looking into libraries (either frontend or backend) to work with .doc/.docx files. The goal is to be able to diff 2 .doc files
  • Finishing reading “Dive Into Python”

Roadblocks:

  • Hadn’t had much of a chance over the past few days to work on ReviewBoard. Been busy with personal stuff (Thanksgiving weekend, making up time at work)

Next:

  • Spend the weekend and upcoming week on pluggable UI and hopefully make some progress on .doc parsing
  • Work with Christian and Michelle if I have any questions or need to discuss anything

Questions:

  • None

John Sintal

Currently:

  • Looking at the new base command class, and examining how diffs are generated.

Roadblocks:

  • None

Next:

  • Coding up the rb diff command.

Questions:

  • None at the moment

Karl Leuschen

Currently:

  • Adding auto key association for new github repositories. I’ve been able to add keys via the Github API without much trouble, so it’s now a matter of working it in to the existing “Add Repository” sequence of events.

Roadblocks:

  • None so far.

Next:

  • Write tests for the key adding code and start work on making key association part of the add/edit repository form (for Github first). Probably post a WIP review before I get too far.

Questions:

  • Will key association be a Reviewboard API feature as well? If so, is there any overlap that I should be concerned about? That is, I’ve only been looking at changing the HostingService classes and RepositoryForms, not the Repository model. Should the key association be done by the model (save or post_save) or as part of the form processing?

Tina Yang

Currently:

  • Switched from working on “uploading file attachment via post-review with revision” to “differentiating file attachments that’s attached to a revision from those tied to a review request”

Roadblocks:

  • Finding a continuous block of time to work on reviewboard (perhaps it will get better after midterm season passes)

Next:

  • Change the FileAttachment schema to record revision

Questions:

  • Could someone please reply to my questions from last week? At least the second one.
  • Any tips on time management and work-life-reviewboard balance?
  • Any work done the “uploading file attachment via post-review with revision” function already?

Michelle Chuang

Currently:

  • Wrapping up the bug I was working on during the code sprint.
  • Was looking into pdf.js and how to use that (before the recent turn of events)

Roadblocks:

  • Figuring out what Aamir and I will be working on

Next:

  • Getting started on Pluggable UIs (for realsies this time)

Questions:

  • Seconding Tina’s question about time management and work-life-reviewboard balance.

Sampson Chen

Currently:

  • Crossed a few options for rendering PDF / .doc off the list. Investigated pyPDF / PDFMiner for rendering PDF.
  • It seems we are refocusing from PDF / .doc. to rendering text-ish formats (MarkDown, ReST): Not too familiar with these formats; researching then looking for existing Python libraries.
  • Working on a convenience tool on the side to expedite navigation through the codebase.

Roadblocks:

  • None

Next:

  • Talk with Aamir and Michelle about which libraries to use, or if we should write our own logic for the text-ish renderers
  • Check with mentors about whether the libraries I find are acceptable

Questions:

  • None at the moment