Author Archives: bigfoot

Project Documentation for Per-Diff Attachments

Hello UCOSP students!

Previously, ReviewBoard only allows per-review attachments. We need a mechanism for per-diff file attachments for binary files, since the diff for binary files cannot be textually displayed. The project aims to enable this feature. The project is split into the following parts:

  1. Modify the current database structure to allowing storage of per-diff attachments
  2. Enable display of per-diff attachments on the diff-viewer page
  3. Modify the server-side JSON API to enable uploading of per-diff attachments
  4. Modify the client-side post-review tool to enable automatic uploading of per-diff attachments

Due to time constraints, only part 1 and 2 of the project have been completed, and the code is in for review (have received many reviews, now only minor code formatting to be fixed). Please see the following URL for the review:

http://reviews.reviewboard.org/r/2651/diff/#index_header

Some explanation about the code changes for part 1 and 2:

In attachments/models.py, two database fields are added:

diff_source_file : the original(source) file name of the particular diff

diff_source_revision : the revision number of the source file

In the attachments/tests.py, a new test case has been added to test the model change.

NOTE: The attachments/evolutions/dd_binary_attachment.py is added to added to apply the database model change. It is based on the Django Evolution and it must be applied to the database. Please see the documentation for Django Evolution on how to apply the change.

In the diffviewer/views.py, code has been added to query the database for attachments that have matching source file name and revision number for each binary file diff in the review. The found attachments are added to the “context” and sent to the diff viewer page.

On the diff viewer page, templates/diffviewer/diff_file_fragment.html, code snippet has been added to display the per-diff attachments in the context, if any.

For the details of code changes, please see the review at the URL given above. If you have any questions, please feel free to contact the UCOSP mailing lists. Thanks and have a good term!

Advertisements

November 27th Meeting Minutes

Mentors:  Make

Students: Dave, Jacob, Yazan

Points:

  • Dave will be using DataGrid feature to implement the Timezone changes
  • Yazan has a new assigned feature “Expose Toggles for Opening Issues in Review Summary Dialog”
  • Mike announced upgrade on the servers
  • Jacob is working on the WebAPI, hoping to get something working soon
  • Dave suggests documenting and blogging about changes and experience

UCOSP Student Post

Thanks to UCOSP, this school term has been a very busy and exciting one, where I get to work with some talented students and mentors on the ReviewBoard project. As the term draws to a close, I have learned many aspects of working on an open source project that has a wide user spectrum.  I learned that effective communication and cooperation is vital to the successful progression of a project. Every week, we hold a one-hour online group meeting through IRC to ask and answer questions, and exchange thoughts and ideas. Moreover, the UCOSP blog provides a convenient facility to exchange developer tips and tricks, project status and other important information. Students and mentors also communicate actively via e-mails.

Over the term, I have been working on adding the features of uploading, storing and displaying per-diff file attachments. Up to this point, the UI, database model and business logic changes for storing and displaying the attachments have been implemented. The remaining work is modifying the Web API and the PostReview tool to enable the features.

Although this term has been a great learning experience, I’ve realized that it would have been even more rewarding if I had done more thorough preparation before the term started. This is exactly what I would suggest to new UCOSP students. One or two weeks before the first UCOSP orientation meeting, learn as much as you can about the project on your own, including the programming language, the source control system, and any related tools. Then, you can take hard questions to the orientation meeting and get the most out of the opportunity to have the talented mentors instruct you face-to-face. By doing this, you will be taking a big first step towards your success in the term!

Status Update Nov. 20, 2011

Dave Druska

Status:

-Change in timezone plans, Django dev now has timezone support
-No longer implementing custom UTC field, using build-in support instead

Next Steps:
-Continue writing feature, much of my code can remain the same

Road Blocks:
-No blocks, more like a curvy road

Yazan Medanat

Status:

-First feature posted. Working on review recommendations.
-Started on second feature.
Next Steps:
-Wait for future reviews/further implementations on first feature.
-Post second feature up for review.
Road Blocks:
-None. Yay!

Jacob Lu

Status:

– Studying the Web API, looking for best place to implement binary attachment upload

Next Steps:

– Implement code to enable processing of binary attachments

Blocks:

– Some questions to clear up in the API code

Oct. 30 Meeting Minutes

Mentors: Christian, David, Make
Students: Dave, Jacob, Yazan

Points:
• Waleed has not been responding to communications lately, may have dropped the course
• Dave decided on the next project to work on (not from the list of recommended projects, but he came up with his own)
• Yazan has been very busy last week, but will devote more time in coming weeks
• Jacob has questions about the types of tests to write and how to execute tests. Dave and Mike answered them.
• Yazan started writing the UCOSP blog post
• Dave encountered an issue in post-review relating to djeblet, and Dave recommended the “git format-patch –full-index” solution
• Mike says it is a busy time for everyone, but communication must be kept going
• Dave posted a simple bug fix review request

Status Report as of Oct. 23

Dave Draska

 

Status:
-Added unit tests to reduce diff storage and posted up for review
-Looked into various bugs in the issue tracker

Next Steps:
-Submit bug fixes, decide on new project

Blocks:
-post_review issues with Djblets

 

Jacob Lu

 

Status:
– Fixed styling and the model code and updated the review

Next Steps:
– Create test code for the new feature

Blocks:

– When trying to run “manage.py test”, it gave me the error “Import Error:
no module named nose”. (thanks to Dave, it’s resolved)

 

Yazan Medanat

 

Status:

-Checking out new master to rebase feature-branch
-Extremely busy week, not much was achieved

 

Next steps:
-Rebase feature-branch onto new master
-Implement recommendations from Christian and Mike during last meeting

 

Road Blocks:
-Not enough hours in a day

Status Report for September 26, 2011

Jacob

 

Status

–          Familiarized with the development environment and tools

–          Learned Django framework and understood part of the project-related code base

–          Submitted code review request for a documentation typo fix

Next Steps

–          Ramp up on more Django features and fully understand project code base

–          Start mocking the DiffViewer UI

Road Blocks

–          None

 

Yazan

 

Status

–          Started implementing issue summary feature, server-side code/HTML/CSS code almost ready and ready for review

–          Worked with Git/post-review/Review Board

Next Steps

–          Write javascript to complement table functionality.

Roadblocks

–          None

 

David

 

Status

–          Implemented diff file hashing and submitted for review

Next Steps

–          Fix style and code issues pointed out by Christian

Roadblocks

–          None

 

Waleed

 

Status

–          Read a lot more code

–          Posted my first review request.

–          30% to 40% project done.

Next Steps

–          Commit and post-review again.

Roadblocks

–          None