Skip to content
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

Refactor code #75

Open
wants to merge 63 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
aafb71a
extract initial stability from parameters
vlopezferrando Dec 30, 2024
d9a9df9
precompute initial difficulty
vlopezferrando Dec 30, 2024
9e32148
compact fuzz ranges
vlopezferrando Dec 30, 2024
ae2bf1a
join functions
vlopezferrando Dec 30, 2024
b61551a
extract variable
vlopezferrando Dec 30, 2024
00f9cac
Extract hard_penalty and easy_bonus from parameters
vlopezferrando Dec 30, 2024
9d9a209
Send card to _next_stability
vlopezferrando Dec 30, 2024
2edcee0
simplified _next_difficulty
vlopezferrando Dec 30, 2024
5148591
Simplify _next_interval
vlopezferrando Dec 30, 2024
2fe0f5f
Reuse code. is this logic actually correct?
vlopezferrando Dec 30, 2024
c51a4ff
Remove unused code
vlopezferrando Dec 30, 2024
3fe2bd5
Join short and long term stability update
vlopezferrando Dec 30, 2024
70da887
Simplify logic
vlopezferrando Dec 30, 2024
d2aad37
make _next_interval return timedelta
vlopezferrando Dec 30, 2024
82040a7
Unify steps logic
vlopezferrando Dec 30, 2024
7220e7a
Send full card to _next_difficulty
vlopezferrando Dec 31, 2024
1080968
Simplify conditions
vlopezferrando Dec 31, 2024
6bd8234
Simplify
vlopezferrando Dec 31, 2024
f9413bd
simplify conditions
vlopezferrando Dec 31, 2024
3a915da
Join condifionts
vlopezferrando Dec 31, 2024
e081d3c
Simplify logic for steps
vlopezferrando Dec 31, 2024
c3dc0ec
Simplify initialization of stability and difficulty
vlopezferrando Dec 31, 2024
52b860e
Reorder comparison
vlopezferrando Dec 31, 2024
60b6e6e
Generalize steps for hard rating
vlopezferrando Dec 31, 2024
efddaff
Add extra functions
vlopezferrando Dec 31, 2024
8048a1e
Inline function
vlopezferrando Dec 31, 2024
8828a71
Skip function call
vlopezferrando Dec 31, 2024
20b4ffa
remove methods
vlopezferrando Dec 31, 2024
c721568
reorder
vlopezferrando Dec 31, 2024
51498be
simplify condition
vlopezferrando Dec 31, 2024
b1d2e83
small tudy
vlopezferrando Dec 31, 2024
d5334fe
refactor
vlopezferrando Dec 31, 2024
a12086f
Order usage of weights
vlopezferrando Jan 1, 2025
9b4128f
Extract initial_difficutly method
vlopezferrando Jan 1, 2025
1be505b
Refactor next_difficulty
vlopezferrando Jan 1, 2025
5e6a285
Make explicit the usage of the first 4 parameters
vlopezferrando Jan 1, 2025
921d257
Be more consistent
vlopezferrando Jan 1, 2025
851d372
Remove docstring
vlopezferrando Jan 1, 2025
1412d8c
Be more concise
vlopezferrando Jan 1, 2025
c7d11e4
Join ifs
vlopezferrando Jan 1, 2025
0dbde85
Small tidy
vlopezferrando Jan 1, 2025
7df9de3
small tidy
vlopezferrando Jan 1, 2025
e43f0e4
small tidy
vlopezferrando Jan 1, 2025
708dd37
Recover original formula
vlopezferrando Jan 1, 2025
46133c0
extract algorithm to separate file
vlopezferrando Jan 1, 2025
fb449c0
split code in multiple files
vlopezferrando Jan 1, 2025
a5874c3
rename file
vlopezferrando Jan 1, 2025
2a06860
add file
vlopezferrando Jan 1, 2025
5e2f45c
Add docs to fsrs v5
vlopezferrando Jan 1, 2025
a960b4b
simplify model code
vlopezferrando Jan 1, 2025
9c0a393
simplify comparison
vlopezferrando Jan 1, 2025
78ef106
convert datetimes to utc instead of raising an error
vlopezferrando Jan 1, 2025
c86a522
join ifs
vlopezferrando Jan 1, 2025
0201af2
remove decay as parameter
vlopezferrando Jan 1, 2025
3829e03
remove clamp helper function
vlopezferrando Jan 1, 2025
6450411
simpler serialization
vlopezferrando Jan 1, 2025
f055a5d
keep tz
vlopezferrando Jan 1, 2025
5f3ddc9
slightly more robust
vlopezferrando Jan 1, 2025
1119b8b
tidy
vlopezferrando Jan 1, 2025
73f03b3
improve docstrings
vlopezferrando Jan 2, 2025
17a5e54
remove outdated doc comment
vlopezferrando Jan 2, 2025
24392cd
rename variables for concuseness
vlopezferrando Jan 2, 2025
30b5386
Recover get_retrievability for backwards compatibility
vlopezferrando Jan 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/fsrs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Py-FSRS is the official Python implementation of the FSRS scheduler algorithm, which can be used to develop spaced repetition systems.
"""

from .fsrs import Scheduler, Card, Rating, ReviewLog, State
from .models import Card, Rating, ReviewLog, State
from .scheduler import Scheduler

__all__ = ["Scheduler", "Card", "Rating", "ReviewLog", "State"]
Loading