Repository navigation
0.4 LPO performance update - Fix learner-metrics endpoint - #306
Merged
Merged
Conversation
* Updated figures.admin
* Added 'UserRelatedMixin' to add a search bar on user fields (
username, email, profile__name) and abstracted the 'user_link'
method. Added this mixin to the LearnerCourseGradeMetrics and
EnrollmentData model views
* Added more filter terms to both LearnerCourseGradeMetrics and
EnrollmentData model views
* Added new module, figures.queries
* This abstracts the queryset contruction from the viewset and makes
testing the queryset easier in the Django shell without needing to
invoke the viewset. Probably a pattern I'll continue
* See the 'site_users_enrollment_data' function docstring for details
* Cleaned up figures.serializers
* Minor stuff: Removed list_serializer_class from
LearnerMetricsSerializerV2 and removed commented out code
* Reworked figures.views.LearnerMetricsViewSetV2
* Removed the query to get course ids. Now just relies on the
'course' query params for course ids. The query will filter out
invalid 'course' values. See notes above on 'figures.query'. This
helps reduce execution time
* Added new pattern to figures.views by calling an external function
to construct the queryset to help with testing and debugging
The Hawthorn tests were not running due to a recent typo I added in the tox.ini 'commands' section. Fixed that. Also calling out Hawthorn in the same way as Ginko and Juniper. Now all have Open edX release specific pytest-<named release>.ini files and Hawthorn now specifies the 'OPENEDX_RELEASE' also This means that regardless of what the default environment that is set in the settings, the Hawthorn tests will specify the proper environment
* Reworked functions to reduce queries * Updated tests that broke from the refactoring * Add .pytest_cache cleanup to Makefile
johnbaldwin
force-pushed
the
john/0.4-fix-learner-metrics-api
branch
from
December 13, 2020 21:08
0de0dfa to
0cba5fd
Compare
OmarIthawi
reviewed
Dec 14, 2020
| # We don't need to call out Hawthorn as it is the current default environment | ||
| ginkgo: OPENEDX_RELEASE = GINKGO | ||
| hawthorn: OPENEDX_RELEASE = HAWTHORN | ||
| hawthorn_multisite: OPENEDX_RELEASE = HAWTHORN |
OmarIthawi
approved these changes
Dec 14, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improved performance and fixed filter for the 'learner-metrics' API endpoint
Updated figures.admin
EnrollmentData model views
Added new module, figures.queries
Cleaned up figures.serializers
Reworked figures.views.LearnerMetricsViewSetV2
'course' query params for course ids. The query will filter out
invalid 'course' values. See notes above on 'figures.query'. This
helps reduce execution time
to construct the queryset to help with testing and debugging
Fix tox.ini issue and minor changes
Minor figures.sites performance improvement refactoring