Skip to content

Commit

Permalink
⬆️ update to FSRS-5 & [email protected] (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock authored Aug 28, 2024
1 parent 718add5 commit 39ca6bc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion deck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"testing"

"github.com/open-spaced-repetition/go-fsrs"
"github.com/open-spaced-repetition/go-fsrs/v2"
)

func TestDeck(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions fsrs_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"time"

"github.com/88250/gulu"
"github.com/open-spaced-repetition/go-fsrs"
"github.com/open-spaced-repetition/go-fsrs/v2"
"github.com/siyuan-note/filelock"
"github.com/siyuan-note/logging"
"github.com/vmihailenco/msgpack/v5"
Expand All @@ -42,7 +42,7 @@ func NewFSRSStore(id, saveDir string, requestRetention float64, maximumInterval
params := fsrs.DefaultParam()
params.RequestRetention = requestRetention
params.MaximumInterval = float64(maximumInterval)
params.W = [17]float64{}
params.W = [19]float64{0}
for i, w := range strings.Split(weights, ",") {
w = strings.TrimSpace(w)
params.W[i], _ = strconv.ParseFloat(w, 64)
Expand Down
5 changes: 3 additions & 2 deletions fsrs_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
package riff

import (
"github.com/88250/gulu"
"os"
"strings"
"testing"
"time"

"github.com/open-spaced-repetition/go-fsrs"
"github.com/88250/gulu"

"github.com/open-spaced-repetition/go-fsrs/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.21.6

require (
github.com/88250/gulu v1.2.3-0.20231209020950-b7b6994e395c
github.com/open-spaced-repetition/go-fsrs v1.2.1
github.com/open-spaced-repetition/go-fsrs/v2 v2.0.1
github.com/siyuan-note/filelock v0.0.0-20240419132904-2fbfe64f1939
github.com/siyuan-note/logging v0.0.0-20231208035918-61f884c854f0
github.com/vmihailenco/msgpack/v5 v5.4.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE=
github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY=
github.com/open-spaced-repetition/go-fsrs v1.2.1 h1:vY1hSQ3gvHtfnw8ahylcZyyqusKWDkWCd1+ca4lZoSc=
github.com/open-spaced-repetition/go-fsrs v1.2.1/go.mod h1:WpbNs4TTKZChOHFO+ME0B9femUVZsepFT5mhAioszRg=
github.com/open-spaced-repetition/go-fsrs/v2 v2.0.1 h1:ODpQGZqZNsKqAF4/WUdRtfuNtwDIfI6Xj3cSznxk0g0=
github.com/open-spaced-repetition/go-fsrs/v2 v2.0.1/go.mod h1:Ry+MLx079nUXwSbYm+OYLK9pQ9yu0cCLWSo3N4H5ZBI=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down

0 comments on commit 39ca6bc

Please sign in to comment.