Version 11 (modified by 8 years ago) (diff) | ,
---|
Contents
Distributed Peer Review - User Guide
Overview
Distributed Peer Review system is a plugin for Trac that facilitates distributed peer review of code. Normally peer review happens in a central location with paper copies of code, or works in an disorganized fashion involving email or other electronic means to communicate. However, these systems are inefficient for multiple code reviews, and can become unmanageable very quickly. Hence, this system assists developers in managing and performing code reviews in a distributed way.
Description
Distributed peer review facilitates code review without the need for all team members to meet together, saving time. In addition, changes proposed under a distributed system are easier to implement. Our project seeks to create a distributed peer review system by creating a plugin for Trac, which is a browser-based content management system that includes bug-tracking. The plugin integrates with Subversion, a popular open-source version control system.
Trac supports plugin development with Python on the backend, and ClearSilver, a fast and powerful HTML template system, on the front-end. Javascript and AJAX were used to provide pages with dynamic features. An SQLite database is utilized to store all information about reviews and users.
Note: Since version 2.1 this plugin uses the new template engine Genshi, and supports SQLite, PostgreSQL and MySQL as database backends.
Manual
Main Page
The main page is displayed when the Peer Review button on the navigation bar is clicked.
The first table is the list of code reviews where you are the author. Clicking on any element in a particular row will take you to the View Code Review page for that row. Also, this table displays the code review ID, code review name, current status of the review, and the date that the review was opened.
The second table is the list of code reviews where you are the reviewer. Clicking on any element in a particular row will redirect to the View Code Review page for that row. Also, this table displays the code review ID, code review author, review name, your voting status for the review, and the date that the review was opened.
Managers will see an additional table at the top of the page above the two tables that are typically there for a developer. These are the code reviews that need to be reviewed by a manager. After approval by a manager, the manager should add the changes in the code review to the development trunk.
Finally, just below the navigation bar in the upper right corner are some navigation links for moving through the plugin. The links will take you to the Main Page, New Code Review Page, and Search Code Review Page, respectively.
New Code Review
A new code review is created by the following steps:
- Choose a name
- Select files and section to be reviewed
- Add reviewers
- Provide additional notes and instructions
Choose a name
This will be the name that will appear on the main page after the code review is created. A name cannot be longer than fifty characters in length.
Add files
The user is presented with the Subversion repository tied to TRAC.
Navigation through this repository is identical to navigation through the TRAC repository. Clicking on folders navigates through the folder. Clicking on files will open that file if an HTML preview is available. To navigate back up, click on the corresponding folder above the repository (for example, where it says "root").
Once a file has been opened, the repository browser will look similar to this:
In order to select a file to be added into the peer review, click the corresponding lines of code on the left that you would like to add. For example, here the user clicked on 82 and clicked on 87 to select lines 82-87. Alternately, the user could type those numbers into the corresponding text boxes below the repository browser.
Once the correct lines of code have been selected, click "Add File" to add the code to the code review. The location will appear in the table below the repository browser, along with the line numbers and revision number.
Add reviewers
Select reviewers from the dropdown list and click "Add user" to add them to the table of reviewers. This is the list of people that will vote on whether or not the code for the current code review is acceptable. Reviewers may be removed by clicking their names in the reviewers table.
Only users with permission CODE_REVIEW_DEV will be shown in the dropdown list.
Provide notes and instructions
General comments can be added to the code review. These comments can be seen by anyone viewing the code review.
After adding general comments, the user is ready to add the code review. Click "Add Code Review" at the bottom of the page to do this. The user will be taken to the View Code Review page for this code review.
Peer Review Search
This page helps search for code reviews, given relevant information to find the correct code reviews. First, search constraints are selected, and then a search is performed by clicking on the search button. When search constraints are selected and a search is performed, code reviews that still satisfy the constraints are listed. If no constraints are given, all reviews, both active and inactive (closed), are listed. Combinations of fields narrow the search results. For example, searching for reviews after one month ago and by a certain author will likely return less results than searching by one of the constraints alone. It is possible to constrain the search such that no results are returned. Such a condition is indicated after searching.
To find a particular code review name or code review names that contain certain characters, enter it in the "Code Review Name" field. Further, to find reviews after a certain date, enter the date in the second set of input boxes. Likewise, to constrain the returned results of the search to a certain status, change the "Status" field. Finally, to find all code reviews matching a certain author, fill in the final field. After specifying the constraints for the search, click on the "Search" button.
As seen above, the results include information on the review ID, author name, current status, and review name. For each review listed, links are given to jump directly to the view code review page for the review. Alternately, the constraints can be increased or relaxed by choosing different values for the fields and searching again.
Perform Code Review
This page allows commentary on code reviews, and viewing others' comments. All users can see the comments posted on this page.
The page shows the file that is being commented on, as well as the revision number and starting and ending lines. Initially, the page shows the section under review with three lines of code on either side of the section. To expand the number of buffer lines shown at the beginning and end of a section, edit:
Note that the number of lines will never exceed the beginning or end of the document. In the case that an invalid number of lines is provided, the page will restore the last valid value entered.
Comments can be associated with each line in the range of lines the author wants others to examine. If a line already has some comments, it is denoted with a 'pin' symbol. The line numbers are links that will open a comment editor:
After the comments box is opened, the "Refresh" link updates the comments box to the most updated comments (which is automatically done whenever the box is initially loaded). Also, users can reply directly to previous posts by clicking the "Reply" link under the existing comment.
Alternately, users can add a new comment by clicking the "Add New Comment" button:
This will open up a new comment box, as shown above, where comments can be inserted into the text box. A code sample can be attached as well by clicking on the "Attach Code Sample" box. Then, type the pathname to the desired file on your computer or click the "Browse..." button to pull up a file selection dialog which will fill in the filename. Finally, click on the "Add Comment" button to add the comment so others can view it, or click on the 'X' in the upper-right hand corner to cancel at any time.
View Code Review
To be written.
Manager Options
To be written.
Glossary
To be written.
License/Disclaimer
This plugin is licensed under the BSD license.
Attachments (27)
-
mainPage_2.PNG (9.9 KB) - added by 16 years ago.
My code reviews list
-
mainPage_3.PNG (17.0 KB) - added by 16 years ago.
Assigned code reviews
-
mainPage_1.PNG (8.5 KB) - added by 16 years ago.
Code reviews awaiting approval
-
peerReviewSearch_1.PNG (24.0 KB) - added by 8 years ago.
Specify search criteria
-
peerReviewSearch_2.PNG (32.2 KB) - added by 8 years ago.
Search results
-
performCodeReview_1.PNG (41.1 KB) - added by 8 years ago.
Code review screen
-
performCodeReview_2.PNG (1.2 KB) - added by 8 years ago.
Line selection
-
performCodeReview_4.PNG (20.8 KB) - added by 8 years ago.
Comment dialog
-
performCodeReview_5.PNG (5.7 KB) - added by 8 years ago.
Add new comment
-
viewCodeReview_1.PNG (5.4 KB) - added by 8 years ago.
Code review details
-
viewCodeReview_2.PNG (7.6 KB) - added by 8 years ago.
Code review files
-
viewCodeReview_3.PNG (5.5 KB) - added by 8 years ago.
Assigned users
-
viewCodeReview_4.PNG (6.6 KB) - added by 8 years ago.
Assigned users - authors view
-
viewCodeReview_5.PNG (4.2 KB) - added by 8 years ago.
Notes and instructions
-
viewCodeReview_6.PNG (2.4 KB) - added by 8 years ago.
Vote summary
-
viewCodeReview_7.PNG (3.0 KB) - added by 8 years ago.
Voting
-
viewCodeReview_8.PNG (4.0 KB) - added by 8 years ago.
Manager options
-
viewCodeReview_10.PNG (2.8 KB) - added by 8 years ago.
author options
-
viewCodeReview_9.PNG (10.8 KB) - added by 8 years ago.
User votes - author view
-
options_1.PNG (22.6 KB) - added by 8 years ago.
Manager options
-
newCodeReview_step1.PNG (15.8 KB) - added by 8 years ago.
New screenshot for review name
-
newCodeReview_step3.PNG (27.1 KB) - added by 8 years ago.
New screenshot for user selection
-
newCodeReview_step4.PNG (39.8 KB) - added by 8 years ago.
New screenshot for author notes
-
newCodeReview_step2_1.PNG (176.3 KB) - added by 8 years ago.
Screenshot update
-
newCodeReview_step2_2.PNG (152.8 KB) - added by 8 years ago.
Screenshot update for file preview in browser
-
assigned_reviews.png (117.6 KB) - added by 8 years ago.
List of assigned reviews
-
my_code_reviews.png (329.6 KB) - added by 8 years ago.
Main code review page: My Code Reviews
Download all attachments as: .zip