I'm trying to write a test for review logs for the Rust library and I'm using this library as the source of truth. However, when I generate logs, the elapsed_days isn't making sense to me.
Here's my quick and dirty code:
from datetime import datetime
from src.fsrs import FSRS, Card, Rating
import random
from rich import print
fsrs = FSRS()
card = Card()
ratings = (
Rating.Good,
Rating.Good,
Rating.Good,
Rating.Good,
Rating.Good,
Rating.Good,
Rating.Again,
Rating.Again,
Rating.Good,
Rating.Good,
Rating.Good,
Rating.Good,
Rating.Good,
)
now = datetime(2023, 4, 18)
logs = []
for rating in ratings:
scheduling_cards = fsrs.repeat(card, now)
card = scheduling_cards[rating].card
log = scheduling_cards[rating].review_log
logs.append(log)
now = card.due
for log in logs:
print(vars(log))
For the second review, it says the elapsed days is 2, but the review dates are on the same day just 10 minutes apart. This isn't expected behaviour, is it?
I'm trying to write a test for review logs for the Rust library and I'm using this library as the source of truth. However, when I generate logs, the elapsed_days isn't making sense to me.
Here's my quick and dirty code:
Here's the output:
For the second review, it says the elapsed days is 2, but the review dates are on the same day just 10 minutes apart. This isn't expected behaviour, is it?