CSC/ECE 517 Spring 2019 - Project E1925. Refactor E1858. Github metrics integration

From Expertiza_Wiki
Revision as of 19:04, 8 April 2019 by Zwu17 (talk | contribs)
Jump to navigation Jump to search

Introduction

Problem Statement

Expertiza provides teammate reviews to gauge how much each team member contributed, this information could be generated from data from external tools like Github (for example, number of commits, number of lines of code modified, number of lines added, number of lines deleted.) from each group’s submitted repo link. Currently, Expertiza provides Teammate Reviews under View Scores functionality for each assignment.

1. Teammate Reviews functionality in the View Scores page gauges teammate views on how much other team members contributed to the project. We need to augment this data with data from external tools like GitHub in order to validate that feedback. New metrics will be appended under each student data under the same functionality.
2. Github Metrics under View Submissions page should include a bar chart that shows number of commits by the team throughout the assignment timeline. This will help instructors to get a team overview, and aid grading process.

While this data will not have marks associated directly, it will prove useful to the instructor in differentiating the performance of team members and hence awarding marks as per contribution. Overall data for the team, like the number of committers and number of commits may also help instructors to predict which projects are likely to be merged.

Project Task

Extract Github metadata of the submitted repos and pull requests.

  1. The metadata should be stored in the local Expertiza DB (we have a sample design here, which you may use or modify). For each participant, record should include at least include:
    • Committer id
    • Total number of commits
    • Number of files changed
    • Lines of code changed
    • Lines of code added
    • Lines of code removed
    • Lines of code added that survived until final submission [if available from Github]
  2. The code should sync the data with Github whenever someone (student or instructor) looks at a view that shows Github data.
  3. The data for teams should be shown in the instructor’s View Scores window, in a new tab, probably between Reviews and Author Feedback.
    • Design a good view for showing data on individuals. Please discuss this with the project mentor(s).
    • It seems to me that this should be on the Teammate Reviews tab, right below the grid for teammate reviews. The reason for this is that we’d like to see all the data on an individual in a single view. For teams, by contrast, there is already a pretty large grid, and potentially multiple grids for multiple rounds, so adding a new grid is more likely to clutter the display.
  4. Create a bar chart for the # of lines changed for each assignment team on “view_submissions” page. The x-axis should be the time starting from the assignment creation time, till the last deadline of the assignment, or current time, whichever is earlier.

This task has been partially implemented by another group for project E1858. Github Metrics Integration in 2018 Fall semester. However, their work has been rejected with the feedback "They have integrated the github metrics into expertiza to show the number of commits, pull requests status, etc against every project. They have also integrated it into the metrics. Looks like they covered the edge cases. The code looks good but needs comments as it is pretty complex. The documentation feels like it is flooded with code, if there was a description of the changes, it would have been better.Extensive tests, but it might be good to see if additions to existing tests really belong in those same tests". The goal of our current project is to resolve issues existing in their previous work, refactor codes their created and modify their code following "DRY" principles. The ultimate goal is to have the Github Metric Integration work in Expertiza.


Issues in Project E1858

Detailed implementation document can be found from E1858 wiki page.


Refactors and Improvements

To refactor and improve project E1858, we will achieve the following tasks:

  • Run the E1858 code on the lastest Expertiza environment.
  • Clean the redundant and inaccurate code.
  • Refactor the old code into the correct controller(could be a new controller).
  • Move the Javascript code into the correct position.
  • Writing the new helper code.
  • Design the new interface page.
  • Wrting the new test case.

<Refactor>: grades_controller

File location: app/controllers/grades_controller.rb

Project E1858 Issues

Issues description here.

Project E1925 Improvements

Detialed improvemnts work here.

<Refactor>: grades_helper

File location: app/helpers/grades_helper.rb

Project E1858 Issues

Issues description here.

Project E1925 Improvements

Detialed improvemnts work here.






References

Project E1858 wiki

Expertiza_wiki

E1815:_Improvements_to_review_grader

Expertiza_PR_1179

Expertiza_PR_1179_Video

GitHub API documentation