Commit graph

157 commits

Author SHA1 Message Date
Damien Elmes
4cafd92c6d Dependency updates (#3040)
* Update JS deps

* Update semver-compat Rust deps

* Update some semver-incompat Rust deps

- hyper/axum held back because reqwests is not ready
- rusqlite held back due to burn-rs incompat version
- wiremock held back due to compile issue

* pylint wants changes to our _rsbridge.pyi

* Update Python deps

Also solves a security warning in orjson

Reformat with latest black
2024-02-28 16:28:04 +07:00
Damien Elmes
660e7f9ac4 Fix cargo deny in CI
The 0.14.12 release appears to have broken "-A duplicate". Fix by
updating our checks to use the latest release/format.

Also update iana-time-zone, which was yanked, and ignore safemem,
which is only used when bundling.
2024-02-24 15:22:57 +07:00
Abdo
739e0196e9 Keep previous FSRS parameters if they get worse when optimizing (#2996)
* Update to fsrs-rs 0.3.0

* Keep previous FSRS parameters if they get worse when optimizing
2024-02-11 16:26:04 +10:00
Jarrett Ye
f76763b10e update FSRS to v0.2.0 (#2977)
* update FSRS to v0.2.0

* update comments

* ./ninja fix:minilints

* 1000 -> 400 in translation (dae)
2024-01-30 16:27:12 +10:00
Damien Elmes
94fd8b817d Update shlex for security issue 2024-01-23 14:05:19 +10:00
Damien Elmes
aaffcf2472 Update Rust deps 2024-01-18 11:00:01 +10:00
Damien Elmes
f94a129f5e Pull in FSRS fix for pretrain 2023-12-28 18:15:44 +10:00
Jarrett Ye
9af073cd0e Update to FSRS-4.5 (#2901) 2023-12-22 16:17:40 +10:00
Damien Elmes
08a7b3ccab Update FSRS
We're on the commit prior to
https://github.com/open-spaced-repetition/fsrs-rs/pull/141, as that is
going to require work that will need to wait until after 23.12
2023-12-22 14:02:39 +10:00
Damien Elmes
09c506a682 Update zerocopy for soundness fix 2023-12-16 09:48:30 +10:00
Damien Elmes
701e0b7e60 Fix error generating parameters when a parameter is 0 2023-12-12 12:33:32 +10:00
Damien Elmes
f4acaa17cd Update FSRS for new default weights 2023-12-08 13:54:31 +10:00
Damien Elmes
75681810b0 Update to latest fsrs-rs
The extra entries in Cargo.lock and licenses.json are mostly spurious,
and caused by https://github.com/tracel-ai/burn/pull/1025#issuecomment-1842006690
2023-12-07 14:13:58 +10:00
Damien Elmes
910d864ee7 Update to Rust 1.74, and update most Rust deps
hyper has been held back, as neither reqwest nor axum support 1.0 yet
2023-11-27 13:34:42 +10:00
Damien Elmes
91d2822358 Update to latest FSRS 2023-11-27 11:24:31 +10:00
Damien Elmes
60cfa254e8 Fix broken bundling on Windows 11
When Windows notices "install" in the filename it triggers a UAC elevation,
causing 'cargo run' to fail.
2023-11-20 12:01:34 +10:00
Damien Elmes
b989c98639 Update fsrs-rs 2023-11-13 10:13:20 +10:00
Damien Elmes
36fae1a30e Update self_cell for UB fix 2023-11-12 10:40:33 +10:00
Damien Elmes
0f2303002c Fix Android backend failing to build on Windows with n2 2023-11-08 13:31:35 +10:00
Damien Elmes
158eb4322a We can now use burn from crates.io 2023-10-28 08:23:33 +10:00
Damien Elmes
b9ffdcfbd5 Update fsrs and Rust deps 2023-10-25 10:22:36 +10:00
dependabot[bot]
2910d71be2 Bump rustix from 0.38.14 to 0.38.19 (#2747)
* Bump rustix from 0.38.14 to 0.38.19

Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.14 to 0.38.19.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.14...v0.38.19)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update licenses

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2023-10-19 09:44:51 +10:00
Damien Elmes
695bb9e291 Update to latest fsrs 2023-10-18 09:03:23 +10:00
Damien Elmes
e41e7cc508 Fix stuttering in FSRS progress display 2023-10-14 14:03:20 +10:00
Damien Elmes
7669dd3d2a Update to merged PR commit 2023-10-13 14:07:53 +10:00
Damien Elmes
c8f14d36af Update fsrs-rs for partial fix for #2706 2023-10-13 14:05:31 +10:00
Damien Elmes
ec8990dc11 Use sm2 retention when deriving memory state
Closes #2702
2023-10-13 10:37:35 +10:00
Damien Elmes
db6dc5a30f Update FSRS for performance improvement 2023-10-05 16:27:10 +10:00
Dominique Martinet
db87b4ed57 Update rust-csv (#2703)
Upstream rust-csv 1.3.0 includes our patch and can be used instead of
the ankitects repo.

This fixes `cargo vendor`
2023-10-04 13:21:47 +10:00
Damien Elmes
9168e33ac6 Update FSRS crate 2023-10-03 11:28:56 +10:00
Damien Elmes
63088b0caf Update FSRS
- up to 10x performance increase in optimal retention
- expose loss aversion
- use SpinBoxes
2023-09-30 16:10:22 +10:00
Damien Elmes
a0e32286bb Update incompatible Rust deps 2023-09-28 10:00:47 +10:00
Damien Elmes
8ff65fff81 Update compatible Rust deps
Fixes a CVE in tungstenite
2023-09-28 09:54:56 +10:00
Damien Elmes
c9b35c4fc6 Update FSRS; fix handling of invalid revlogs
State is now inferred from SM-2 data when the revlog is not suitable
2023-09-27 13:13:10 +10:00
Damien Elmes
f0802da152 Update FSRS 2023-09-23 14:05:28 +10:00
Damien Elmes
f441462312 Pull in weight clipping fix 2023-09-20 13:17:27 +10:00
Damien Elmes
a13879021a Update fsrs-rs for updated burn pin 2023-09-17 13:38:21 +10:00
Damien Elmes
41bcb20f1e Integrate FSRS into Anki (#2654)
* Pack FSRS data into card.data

* Update FSRS card data when preset or weights change

+ Show FSRS stats in card stats

* Show a warning when there's a limited review history

* Add some translations; tweak UI

* Fix default requested retention

* Add browser columns, fix calculation of R

* Property searches

eg prop:d>0.1

* Integrate FSRS into reviewer

* Warn about long learning steps

* Hide minimum interval when FSRS is on

* Don't apply interval multiplier to FSRS intervals

* Expose memory state to Python

* Don't set memory state on new cards

* Port Jarret's new tests; add some helpers to make tests more compact

https://github.com/open-spaced-repetition/fsrs-rs/pull/64

* Fix learning cards not being given memory state

* Require update to v3 scheduler

* Don't exclude single learning step when calculating memory state

* Use relearning step when learning steps unavailable

* Update docstring

* fix single_card_revlog_to_items (#2656)

* not need check the review_kind for unique_dates

* add email address to CONTRIBUTORS

* fix last first learn & keep early review

* cargo fmt

* cargo clippy --fix

* Add Jarrett to about screen

* Fix fsrs_memory_state being initialized to default in get_card()

* Set initial memory state on graduate

* Update to latest FSRS

* Fix experiment.log being empty

* Fix broken colpkg imports

Introduced by "Update FSRS card data when preset or weights change"

* Update memory state during (re)learning; use FSRS for graduating intervals

* Reset memory state when cards are manually rescheduled as new

* Add difficulty graph; hide eases when FSRS enabled

* Add retrievability graph

* Derive memory_state from revlog when it's missing and shouldn't be

---------

Co-authored-by: Jarrett Ye <jarrett.ye@outlook.com>
2023-09-16 16:09:26 +10:00
Damien Elmes
9d04c2a848 Update crate name 2023-09-05 19:08:51 +10:00
Damien Elmes
fff60936bc Integrate the FSRS optimizer (#2633)
* Support searching for deck configs by name

* Integrate FSRS optimizer into Anki

* Hack in a rough implementation of evaluate_weights()

* Interrupt calculation if user closes dialog

* Fix interrupted error check

* log_loss/rmse

* Update to latest fsrs commit; add progress info to weight evaluation

* Fix progress not appearing when pretrain takes a while

* Update to latest commit
2023-09-05 18:45:05 +10:00
Damien Elmes
fd61250f39 Shift output suppression into n2 (#2618)
After updating with tools/install-n2, you should now be able to see
the last line of long-running commands like cargo invocations.
2023-08-23 11:59:52 +10:00
Damien Elmes
0e76779f5f Update Rust deps 2023-08-23 11:44:33 +10:00
Damien Elmes
ed8c04b0da Take another approach to dealing with conflicting flattened keys
The approach in #2542 unfortunately introduced a regression, as whilst
it ensured that duplicate keys are removed when downgrading, it no longer
prevented the duplicates from being removed when converting to a legacy
Schema11 object. This resulted in things like backend.get_notetype_legacy()
returning duplicate keys, and could break syncing:

https://forums.ankiweb.net/t/windows-desktop-sync-error/33128

As syncing and schema11 object usage is quite common compared to downgrading,
the extra Value deserialization seemed a bit expensive, so I've switched
back to explicitly removing the problem keys. To ensure we don't forget to
add new keys in the future, I've added some new tests that should alert us
whenever a newly-added key is missing from the reserved list.
2023-08-15 11:25:53 +10:00
Damien Elmes
a1b4edc442 Extract inline images as part of media check
We also need to get to the bottom of what's causing this:
https://forums.ankiweb.net/t/anki-browse-extremely-laggy/32533
2023-07-31 12:23:16 +10:00
Damien Elmes
fa7805cb8f Update regex crate for .extract()
Also update yanked hermit-abi
2023-07-31 12:20:07 +10:00
Damien Elmes
0ddec0bcb7 Add an improved tool for copying/moving FTL strings 2023-07-04 13:39:01 +10:00
Damien Elmes
39393d3520 Move i18n helpers into ftl/, with a single main.rs
Clap gives us a nice help message and better arg parsing
2023-07-04 10:47:15 +10:00
Damien Elmes
c83f577601 Move .ts i18n method generation to Rust
Based on a similar approach I used for AnkiDroid. The separate modules
file has been integrated into ftl.js.
2023-07-03 14:36:09 +10:00
Damien Elmes
03d4f24ff5 Support creating a standalone sync server 2023-07-02 18:22:44 +10:00
Damien Elmes
03ec72ea19 Update Rust and Python deps (#2567)
* Update Python deps

* Update semver-compat Rust deps

* Update most crates to latest semver

* Update to latest axum-client-ip
2023-07-01 18:26:43 +10:00