mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 12:47:11 -05:00
Add FSRS config key and disable FSRS in legacy scheduler tests
- Add FSRS boolean config key to protobuf definition - Update generated Rust config mapping code - Disable FSRS in test_schedv3.py tests to maintain legacy scheduler behavior - These tests are designed for the old SM-2 algorithm, not FSRS
This commit is contained in:
parent
da9dd4b315
commit
e1d8bca31e
3 changed files with 5 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ message ConfigKey {
|
|||
LOAD_BALANCER_ENABLED = 26;
|
||||
FSRS_SHORT_TERM_WITH_STEPS_ENABLED = 27;
|
||||
FSRS_LEGACY_EVALUATE = 28;
|
||||
FSRS = 29;
|
||||
}
|
||||
enum String {
|
||||
SET_DUE_BROWSER = 0;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ from typing import Dict
|
|||
import pytest
|
||||
|
||||
from anki import hooks
|
||||
from anki.config import Config
|
||||
from anki.consts import *
|
||||
from anki.lang import without_unicode_isolation
|
||||
from anki.scheduler import UnburyDeck
|
||||
|
|
@ -19,6 +20,8 @@ from tests.shared import getEmptyCol as getEmptyColOrig
|
|||
|
||||
def getEmptyCol():
|
||||
col = getEmptyColOrig()
|
||||
# Disable FSRS for legacy scheduler tests
|
||||
col.set_config_bool(Config.Bool.FSRS, False, undoable=False)
|
||||
return col
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ impl From<BoolKeyProto> for BoolKey {
|
|||
BoolKeyProto::LoadBalancerEnabled => BoolKey::LoadBalancerEnabled,
|
||||
BoolKeyProto::FsrsShortTermWithStepsEnabled => BoolKey::FsrsShortTermWithStepsEnabled,
|
||||
BoolKeyProto::FsrsLegacyEvaluate => BoolKey::FsrsLegacyEvaluate,
|
||||
BoolKeyProto::Fsrs => BoolKey::Fsrs,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue