Motivated by https://forums.ankiweb.net/t/python-anki-sync-server-broken/64069
From https://protobuf.dev/support/cross-version-runtime-guarantee/:
"Python-specific Guarantees
Since the 3.20.0 release, the Protobuf Python generated code became a thin wrapper around an embedded FileDescriptorProto. Because these protos are supported on extremely long timeframes, our usual major version compatibility windows aren’t typically necessary.
Python may break generated code compatibility in specific future major version releases, but it will be coupled with poison pill warnings and errors in advance. As of 6.32.0, all generated code since 3.20.0 will be supported until at least 8.x.y."
This changes 'keep existing version' to 'sync project changes'
when changes to the pyproject.toml file have been detected that
are newer than the installer's version.
Also adds a way to temporarily enable the launcher, as we needed some
other trigger than the pyproject.toml file anyway, and this approach
also solves #4165.
And removes the 'quit' option, since it's an uncommon operation, and
the user can just close the window instead.
Short-term caveat: users with older launchers/addon will trigger the old
pyproject.toml mtime bump, leading to a 'sync project changes' message
that will not make much sense to a typical user.
* set UV_PYTHON_DOWNLOADS=auto when doing `uv sync`
* Clear env vars prior to invoking uv, and add --no-config
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
* Fix/FSRS simulator fallback to memory_state_from_sm2 for after setting “Ignore cards reviewed before”
* add comment to fsrs_item_for_memory_state
* Add historical retention field to FSRS review request and update related logic
- Added `historical_retention` field to `SimulateFsrsReviewRequest` in `scheduler.proto`.
- Updated `simulator.rs` to use `req.historical_retention` instead of the removed `desired_retention`.
- Modified `FsrsOptions.svelte` to include `historicalRetention` in the options passed to the component.
* Update rslib/src/scheduler/fsrs/memory_state.rs
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
* Update rslib/src/scheduler/fsrs/simulator.rs
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
* pass ci
* Update rslib/src/scheduler/fsrs/simulator.rs
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
* format
* Update rslib/src/scheduler/fsrs/simulator.rs
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* format
* Fix condition in is_included_card function to check CardType instead of CardQueue
---------
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* Only get_deck_config when load balancer is enabled
* Refactor load balancer card addition logic to use pre-fetched deckconfig_id
* Refactor get_scheduling_states to use context for deck configuration
It had some downsides:
- the lockfile was discarded when switching between beta/non-beta
- it could result in beta versions of transitory dependencies
By adding 'anki' and 'aqt' as first-party packages with explicit
version numbers (validated by the version list we get from PyPi),
we can allow them to be installed without breaking other deps.
https://forums.ankiweb.net/t/bundling-numpy-in-an-add-on/62669/15
* add deck name field to metadata protobuf msg
* fallback to creating new deck specified in `#deck:...`
* update tests
* create deck if it doesn't exist
* plumbing
* allow creating deck via `#deck:...`
* apply suggestion for protobuf
* Add `last_review_time` to card data
* cargo clippy
* Calculate days elapsed since last review time in add_extract_fsrs_relative_retrievability
* expose last_review_time to Card in Python
* Fix last_review_time assignment in Card class to use last_review_time_secs
* format
* Update last_review_time assignment to exclude filtered preview state in Card class