-
Notifications
You must be signed in to change notification settings - Fork 37
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
Learner metrics endpoint - Prerelease for evaluation #239
Conversation
a95e234
to
651c5f3
Compare
I need to fix the unit test. It is failing because it is getting all users instead of the expected users. Should still work in devsite. I'll work on that tomorrow |
results = response.data['results'] | ||
# Check user ids | ||
result_ids = [obj['id'] for obj in results] | ||
assert set(result_ids) == set([obj.user_id for obj in enrollments]+[caller.id]) |
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.
This is what is failing because the result_ids is also including users created in the base test class from which this class inherits
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.
This is fixed
} | ||
] | ||
} | ||
``` |
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.
@grozdanowski I pasted a sample from the mock results in devsite
fddaec3
to
5b69d15
Compare
Codecov Report
@@ Coverage Diff @@
## master #239 +/- ##
==========================================
+ Coverage 91.62% 91.78% +0.15%
==========================================
Files 41 41
Lines 2078 2129 +51
==========================================
+ Hits 1904 1954 +50
- Misses 174 175 +1
Continue to review full report at Codecov.
|
This is the initial commit so Matej and work on the front end The endpoint is `/figures/api/learner-metrics/` * There is a basic viewset just to exercise the code. The test requires test data to be filled out and tested in the response * UserFilterSet needs to be updated or an alternate filter set needs to be used in order to provide more filtering, in particular * Show only users who have enrollments * Show only users who do not have enrollments * Show only users who have completed * Show only users who have not completed * List serializers need to be added to prefetch data to improve API performance * test_learner_metrics_viewset needs to be completed * Updated the CourseEnrollment mock to provide the `is_enrolled` method
5b69d15
to
926f45d
Compare
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.
@johnbaldwin I'm going a light review, I didn't spot checked any problem. Let's get this merged so we can test it. Thanks!
This PR is for the initial evaluation version of the learner metrics endpoint for Matej's implementation on the front end and evaluation in production.
The endpoint is
/figures/api/learner-metrics/
There is a basic viewset just to exercise the code. The test requires test data to be filled out and tested in the response
UserFilterSet needs to be updated or an alternate filter set needs to be used in order to provide more filtering, in particular
Show only users who have enrollments
Show only users who do not have enrollments
Show only users who have completed
Show only users who have not completed
List serializers need to be added to prefetch data to improve API performance
test_learner_metrics_viewset needs to be completed
Updated the CourseEnrollment mock to provide the
is_enrolled
method