-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Add more fields to CardReviewData
#798
Conversation
…ace/ankihub_addon into feat/add-more-review-data-fields
Codecov Report
@@ Coverage Diff @@
## main #798 +/- ##
==========================================
+ Coverage 81.81% 81.83% +0.01%
==========================================
Files 64 64
Lines 5737 5743 +6
==========================================
+ Hits 4694 4700 +6
Misses 1043 1043
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
""" | ||
SELECT MAX(r.id) | ||
SELECT MIN(r.id), MAX(r.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.
I really like how this was built in a way that the change to get the new data was really simple! 💯
total_card_reviews_last_7_days = _get_review_count_for_ah_deck_since( | ||
ah_did, now - timedelta(days=7) | ||
) |
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.
Awesome, really nice that you could reuse this method! 💯
* Add fields to `CardReviewData` * Get field values from db and add them to review data * Begin updating tests * Change log message * fixup get_first_and_last * Update tests * Add comment * Remove newline
This PR adds the
total_card_reviews_last_7_days
andfirst_card_review_at
fields toCardReviewData
and adds the logic to get the values for these fields.Related issues
Proposed changes
total_card_reviews_last_7_days
andfirst_card_review_at
fields toankihub.ankihub_client.models.CardReviewData
ankihub.main.review_data
to get the values for the fields and set them on theCardReviewData
objects sent to the API