-
-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds average star rating calculations #4080
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4080 +/- ##
==========================================
- Coverage 30.28% 30.22% -0.06%
==========================================
Files 206 206
Lines 16334 16345 +11
Branches 2149 2155 +6
==========================================
- Hits 4946 4941 -5
- Misses 11212 11228 +16
Partials 176 176
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
app/dashboard/models.py
Outdated
feedbacks = FeedbackEntry.objects.filter(receiver_profile=self).all() | ||
average_rating = {} | ||
average_rating['overall'] = sum([feedback.rating for feedback in feedbacks]) / feedbacks.count() | ||
# average_rating['code_quality_rating'] = sum([feedback.code_quality_rating for feedback in feedbacks]) / feedbacks.count() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume these commented out lines are for upcoming features, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind - I see they are in Octavio's PR 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since that PR is merged now, I will remove the comments now. :)
Description
Calculates the average star rating for a profile and returns a dictionary of different ratings.
Since the star rating PR hasn't been merged, I have commented out the calculation of the individual quality ratings so that once that gets merged, I can uncomment that.
Checklist
Affected core subsystem(s)
Refers/Fixes
Fixes #4059