From cdcd9bcce044550f17d92a26f2da94ed08bcbe84 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 19 Aug 2023 13:27:53 +1000 Subject: [PATCH] New collections now start with the v3 scheduler --- pylib/tests/test_decks.py | 1 + pylib/tests/test_schedv2.py | 2 ++ pylib/tests/test_undo.py | 2 ++ rslib/src/config/schema11.rs | 1 + 4 files changed, 6 insertions(+) diff --git a/pylib/tests/test_decks.py b/pylib/tests/test_decks.py index 25e08e103..1e9951444 100644 --- a/pylib/tests/test_decks.py +++ b/pylib/tests/test_decks.py @@ -9,6 +9,7 @@ from tests.shared import assertException, getEmptyCol def test_basic(): col = getEmptyCol() + col.set_v3_scheduler(False) # we start with a standard col assert len(col.decks.all_names_and_ids()) == 1 # it should have an id of 1 diff --git a/pylib/tests/test_schedv2.py b/pylib/tests/test_schedv2.py index 0339c132e..931998713 100644 --- a/pylib/tests/test_schedv2.py +++ b/pylib/tests/test_schedv2.py @@ -28,6 +28,8 @@ def getEmptyCol(): col.upgrade_to_v2_scheduler() if is_2021(): col.set_v3_scheduler(True) + else: + col.set_v3_scheduler(False) return col diff --git a/pylib/tests/test_undo.py b/pylib/tests/test_undo.py index 6988adc8a..ecc6fb004 100644 --- a/pylib/tests/test_undo.py +++ b/pylib/tests/test_undo.py @@ -15,6 +15,7 @@ def getEmptyCol(): def test_op(): col = getEmptyCol() + col.set_v3_scheduler(False) # should have no undo by default assert not col.undo_status().undo # let's adjust a study option @@ -47,6 +48,7 @@ def test_op(): def test_review(): col = getEmptyCol() + col.set_v3_scheduler(False) col.conf["counts"] = COUNT_REMAINING note = col.newNote() note["Front"] = "one" diff --git a/rslib/src/config/schema11.rs b/rslib/src/config/schema11.rs index cb3c9f451..afbc398e6 100644 --- a/rslib/src/config/schema11.rs +++ b/rslib/src/config/schema11.rs @@ -24,6 +24,7 @@ pub(crate) fn schema11_config_as_string(creation_offset: Option) -> String "dayLearnFirst": false, "schedVer": 2, "creationOffset": creation_offset, + "sched2021": true, }); serde_json::to_string(&obj).unwrap() }