-
Notifications
You must be signed in to change notification settings - Fork 3
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
Added analytics to booking and laundry APIs and removed previous analytics tracking functionalities #341
base: master
Are you sure you want to change the base?
Conversation
…ations and locations as well as laundry washing time minutes by dorm
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: backend/gsr_booking/views.py
📄 File: backend/laundry/views.py (Click to Expand)
Did you find this useful? React with a 👍 or 👎 |
…ng analytics functionalities
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #341 +/- ##
=======================================
Coverage 88.15% 88.15%
=======================================
Files 67 66 -1
Lines 2777 2753 -24
=======================================
- Hits 2448 2427 -21
+ Misses 329 326 -3 ☔ View full report in Codecov by Sentry. |
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.
Also needs to be unit tested after changes are made. Good work so far!
|
||
|
||
# Creates a singleton of of the 'AnalyticsRecorder' class | ||
LabsAnalytics = get_analytics_recorder(Product.MOBILE_BACKEND) |
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.
@vcai122 Looking at the code from DLA, it seems that this singleton creates a new one each time? I could be wrong but if so, it might be optimal to create one and pass it around as an import from settings or something.
/ 60 | ||
), | ||
) | ||
) |
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.
The logic here doesn't seem to be triggering for testing--needs to be fixed
@@ -83,6 +85,24 @@ def get_snapshot_info(room_id): | |||
snapshots = LaundrySnapshot.objects.filter(filter).order_by("-date") | |||
return (room, snapshots) | |||
|
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.
Let's come up with a more consistent naming schema. Potentially subproject (so gsr_booking, laundry) as head, so like <subproject>.<details>.<type (ex. duration)>
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.
No need for naming scheme. Library handles it intentionally so developers do not have to waste time thinking about scheme
Added analytics to booking and laundry APIs to record GSR booking durations and locations, added analytics for laundry washing time minutes by dorm, removed previous analytics tracking functionalities