Skip to content

v5.0.0

Choose a tag to compare

@joshdavham joshdavham released this 24 Jan 19:01
· 56 commits to main since this release
4daa566

Py-FSRS v5.0.0

This release makes a major change to the ReviewLog class and additionally introduces the Optimizer class which can be optionally installed to compute an optimal set of Scheduler parameters based on previous ReviewLog objects.

Changes to ReviewLog

The ReviewLog class no longer stores the Card attribute and has been replaced with a simpler card_id attribute.

# Py-FSRS v4 (old)
class ReviewLog:

    card: Card
    rating: Rating
    review_datetime: datetime
    review_duration: int | None
# Py-FSRS v5 (new)
class ReviewLog:

    card_id: int
    rating: Rating
    review_datetime: datetime
    review_duration: int | None

If you've previously stored your ReviewLog objects as .json files, upgrading should be fairly simple

# Py-FSRS v4 (old)
{'card': {'card_id': 1737744147587,
  'state': 1,
  'step': 0,
  'stability': None,
  'difficulty': None,
  'due': '2025-01-24T18:42:27.587133+00:00',
  'last_review': None},
 'rating': 3,
 'review_datetime': '2025-01-24T18:42:27.587305+00:00',
 'review_duration': None}
# Py-FSRS v5 (new)
{'card_id': 1737744147587,
 'rating': 3,
 'review_datetime': '2025-01-24T18:42:27.587305+00:00',
 'review_duration': None}

Optional Optimizer

As mentioned above, a new optional Optimizer class has been added. Please see the updated README for more details.

What's Changed

Full Changelog: v4.1.2...v5.0.0