Author Archives: gfromthehood

Status Reports – February 15, 2013

Yuri Honami

CURRENT

  • Work on ( https://hackpad.com/Trophy-Case-Design-MK30awhb3nL ).[reviewboard/accounts/managers.py]
    *Add new function to TrophyManager.
    ——————
    newfunc( user ):
    for review_requests in user.review_requests.all()
    this.compute_trophies( review_requests.get_display_id() )
    user.site_profiles.extra_data[has_trophy_case] = True
    ——————[reviewboard/accounts/models.py]
    *Add this to head.
    ——————
    from djblets.util.fields import CounterField, JSONField,
    ——————*Add this to LocalSiteProfile.
    ——————
    extra_data = JSONField(null=True)
    ——————[reviewboard/templates/reviews/user_page.html]
    *Add this at next of “Groups”.
    ——————
    <tr>
    <td>
    <p><label>{% trans “Trophies:” %}</label></p>
    {% for trophy in viewing_user.site_profiles.trophies.all %}
    {{trophy.trophy_type}},{{trophy.recieved_date}},{{trophy.review_request}}{% if not forloop.last %}<br>{% endif %}
    {% endfor %}
    </td>
    </tr>
    ——————!!WIP!!
    *Translate this to “template tags” and add.
    ——————
    if viewing_user.site_profiles.extra_data[has_trophy_case] is False , calls newfunc( viewing_user )
    ——————[reviewboard/accounts/tests.py]
    !!WIP!!
    *Create a few review requests.
    *Publish them.
    *Erase the list of trophies for the user.

ROADBLOCKS

  • I don’t know how to code unittest to [tests.py]

NEXT

  • Work about [user_page.html] and [tests.py]

QUESTIONS

  • *I want to test my code such as [user_page.html]. How to add test-data to database?

Hiroki GOHARA

CURRENT

  • Changed Database Models for Trophy.
  • In the process of changing Trophy’s logic to use Database.

ROADBLOCKS

  • Time management

NEXT

  • work up the process of changing Trophy’s logic to use Database.
    make unit tests for compute_trophies method.

QUESTIONS

  • None yet

Niklas Hambüchen

CURRENT:

  • Managed to write some useful tests for my self-issue-closing
  • Having a look at rbtools
  • It was my turn writing the the Blog post this week

ROADBLOCKS

  • I need to know how to give other users modify access to a review request

NEXT

  • I found out that rbtools can already submit revision ranges, but that
    it doesn’t really do what it advertises for single commits (at least for
    git), so I will either fix the program or the docs.

QUESTIONS

  • None

Surya Nallu

CURRENT

  • Extensions can now be searched with some parameters and are displayed for a user to install. Installation is done on-the-fly through Ajax (an extension which is already installed has a “grayed” out link — analogous to what’s done on the iStore as suggested by ChipX86). The codebase was also moved from Djblets to ReviewBoard (as suggested by ChipX86) to have better JavaScript support.
  • Each extension in addition to having an install link has a “Details” link which would fire up a modal window that pulls fresh data (through ajax) about the extension and shows a more detailed information about the extension; such as full length description, rating (or what ever more parameter is decided to be added later)
  • Make a short video to demonstrate the progress so far, seek feedback and discuss next steps.

ROADBLOCK

  • None

NEXT

  • Check and fix for edge case bugs such as — installing an extension from a URL which is a 404, installing an extension from a valid URL but not a zip file (Though these URLs would be served from the official store’s JSON responses and are expected not to be malformed, they should be sanitized or ReviewBoard would throw a fatal 500).
  • Work from this point is directly dependant on the feedback/discussions from the demo.

Jonathan Demelo

CURRENT

  • Implemented a somewhat finalized version of dependencies (currently only via admin panel).
  • Began research on how to approach the inverse blocking relationships.
  • Planned out a list of requirements/features for a completed project.

 ROADBLOCKS

  • Understanding how to reverse the dependency relationship to allow for simple blocking.
  • Addressing the front-end approach to adding relationships (input sanitation, look-ups, etc.)

 NEXT

  • Activate the blocking relationship fields.
  • Addressing front-end input requirements.
  • Any bug fixes that result, and confirming code for finalization.

 QUESTIONS

    • I’m having a difficult time understanding the the python ability to backtrace m2m relationships. For example, lets say my template has access toreview_request_details, which is a ReviewRequest. Now of course I have access to review_request_details.depends_on.all, which would display all the review request that this review request is dependant upon. However, how would I go about finding all the review requests that are dependant on the review within review_request_details? Surely there is a better way then going –

    … within the ReviewRequest model class.

    def get_blocks(self):
    all = ReviewRequest.objects.all()
      for request in all:
        if self in request.depends_on.all():
    keep.append(request)
      return keep

    • (Slightly off-topic) I’m in a predicament where because I have to do an another two half credits after my school’s graduation deadline, I’m basically forced to wait until late sept/early oct before I can graduate and move into the industry. However, it just so happens that my window between school finishing and graduation is the same as the duration of Google Summer of Code, which runs ~June to Sept. I’m thinking about going forward with that as my plan, but since I know a lot of you have had experience with GSoC, I was wondering your opinions on the matter.

Miguel Flores

CURRENT

  • Sorry, for dropping the ball on the status report. A family emergency happened where I had to rush home for a few days of the week. I returned yesterday. This also limited the work I could do on coding, since the later end of the week is when I can do work.
  • I sent the mentors an e-mail with my updates on reading up all of the extensions code as well as python sandboxes. I also created a dummy extension that I would be able to use to test the sandbox, exception handling, and logging. If it crashes, I can test it out on the development server.

 ROADBLOCKS

  • I also sent the mentors an e-mail about issues with the IRC bouncer. I will test out the responses that I’ve received.

 NEXT

  • I will work on exception handling and logging for all of the extensions so that if they crash, the server would not crash along with them.

 QUESTIONS

  • None.  Sent a few through e-mail.

Katherine Schramm

CURRENT

  • Reading through the code for the ReviewRequestDataGrid and starting to put together what I think I’ll need for one for the reviews

NEXT

  • More of the same

ROADBLOCKS

  • Other classes, but that won’t be a problem this week (mid-term break, woo!)

QUESTIONS

  • Is this meant to be just a list of the review requests the user has done reviews for, or should it include data on the reviews themselves too (like the date the review was submitted or something)

Greg Wang

CURRENT

  • Adjust the SSH Key deletion implementation according to Chip’s suggestion
  • Apply local_site_reverse in testcases
  • Playing around with review&comment models/data schema, adding markdown enabling option for each text entry

ROADBLOCKS

  • Need clear direction on how the Markdown going to be integrated, including:
    • In which layer should the markdown enable/disable been controlled
      • System wide
      • User preferences
      • Each post setting
    • How to treat the old post’s format, i.e.,
      • If user enable markdown, should the old post by this user all turns into markdown format?
    • What is the best way to show the markdown preview before posting

NEXT

  • Discuss with mentors about the above details
  • Write up a summary of all the design decisions and functionality details, so can have something to following once start implementation

QUESTIONS

  • Those I have mentioned in the roadblock, details on hackpad: https://hackpad.com/Reviewboard-Markdown-rFZ4SZPfVVO

Meeting Minutes for Group A – February 10th, 2013

Announcements:

See Meeting Minutes for Group B (Feb 9th).

Q / A: 

Q: In review you mentioned, the POST request parameters gotta use 1 instead of True however, `True` is what I got from the browser
A: if it’s not ‘false’ or ‘0’, it’s considered true, still prefer ‘1’ just because it feels weird to use ‘True’, since that’s more of a djangoism

Q: how to use reverse() in the unit test to ensure we are requesting the correct URL, all the timethere are couple different usage, `reverse` or `local_site_reverse` maybe not the same thing?
A: go with local_site_reverse for consistency, basically, it’s a smart reverse() wrapper that knows how to deal with LocalSites (which are how we partition one RB instance into several fake instances)

Q: is there any standard for how to name git branches?
A: they’re for your own use, so whatever oyu feel comfortable with, I’m in the habit these days of namespacing them, liek webapi/blah, or js/blah
A: I usually use bug-numbers and keywords

Q: In the diff view of a review request, we have things like `Changes between r9 and: 1 2 3 4 5 6 7 8 9, which makes no sense to view “changes between r9 and r9
A: which it won’t let you do, it’s in a “selected” state