* Migrate build system to uv
Closes#3787, and is a step towards #3081 and #4022
This change breaks our PyOxidizer bundling process. While we probably
could update it to work with the new venvs & lockfile, my intention
is to use this as a base to try out a uv-based packager/installer.
Some notes about the changes:
- Use uv for python download + venv installation
- Drop python/requirements* in favour of pyproject files / uv.lock
- Bumped to latest Python 3.9 version. The move to 3.13 should be
a fairly trivial change when we're ready.
- Dropped the old write_wheel.py in favour of uv/hatchling. This has
the unfortunate side-effect of dropping leading zeros in our wheels,
which we could try hack around in the future.
- Switch to Qt 6.7 for the dev repo, as it's the first PyQt version
with a Linux/ARM WebEngine wheel.
- Unified our macOS deployment target with minimum required for ARM.
- Dropped unused fluent python files
- Dropped unused python license generation
- Dropped helpers to run under Qt 5, as our wheels were already
requiring Qt 6 to install.
* Build action to create universal uv binary
* Drop some PyOxidizer-related files
* Use Windows ARM64 cargo/node binaries during build
We can't provide ARM64 wheels to users yet due to #4079, but we can
at least speed up the build.
The rustls -> native-tls change on Windows is because ring requires
clang to compile for ARM64, and I figured it's best to keep our Windows
deps consistent. We already built the wheels with native-tls.
* Make libankihelper a universal library
We were shipping a single arch library in a purelib, leading to
breakages when running on a different platform.
* Use Python wheel for mpv/lame on Windows/Mac
This is convenient, but suboptimal on a Mac at the moment. The first
run of mpv will take a number of seconds for security checks to run,
and our mpv code ends up timing out, repeating the process each time.
Our installer stub will need to invoke mpv once first to get it validated.
We could address this by distributing the audio with the installer/stub,
or perhaps by putting the binaries in a .pkg file that's notarized+stapled
and then included in the wheel.
* Add some helper scripts to build a fully-locked wheel
* Initial macOS launcher prototype
* Add a hidden env var to preload our libs and audio helpers on macOS
* qt/bundle -> qt/launcher
- remove more of the old bundling code
- handle app icon
* Fat binary, notarization & dmg
* Publish wheels on testpypi for testing
* Use our Python pin for the launcher too
* Python cleanups
* Extend launcher to other platforms + more
- Switch to Qt 6.8 for repo default, as 6.7 depends on an older
libwebp/tiff which is unavailable on newer installs
- Drop tools/mac-x86, as we no longer need to test against Qt 5
- Add flags to cross compile wheels on Mac and Linux
- Bump glibc target to 2_36, building on Debian Stable
- Increase mpv timeout on macOS to allow for initial gatekeeper checks
- Ship both arm64 and amd64 uv on Linux, with a bash stub to pick
the appropriate arch.
* Fix pylint on Linux
* Fix failure to run from /usr/local/bin
* Remove remaining pyoxidizer refs, and clean up duplicate release folder
* Rust dep updates
- Rust 1.87 for now (1.88 due out in around a week)
- Nom looks involved, so I left it for now
- prost-reflect depends on a new prost version that got yanked
* Python 3.13 + dep updates
Updated protoc binaries + add helper in order to try fix build breakage.
Ended up being due to an AI-generated update to pip-system-certs that
was not reviewed carefully enough:
https://gitlab.com/alelec/pip-system-certs/-/issues/36
The updated mypy/black needed some tweaks to our files.
* Windows compilation fixes
* Automatically run Anki after installing on Windows
* Touch pyproject.toml upon install, so we check for updates
* Update Python deps
- urllib3 for CVE
- pip-system-certs got fixed
- markdown/pytest also updated
* improve the accuracy of the expected workload calculation
* ./ninja fix:minilints
* implement smoothing & a separate struct for return value
* set TERMINATION_PROB to 0.001
* Feat/FSRS-6
* update comment
* add decay to Card
* ./ninja fix:minilints
* pass check
* fix NaN in evaluation
* remove console
* decay should fallback to 0.5 when it's None.
* Update SimulatorModal.svelte
* Update a few comments
* Update FSRS decay defaults to use constants for better maintainability and clarity
* Update rslib/src/storage/card/data.rs
* Added: Leech suspend to simulator
* Added: leech threshold spin box
* Update git rev
* Added: Save to preset options
* ./check
* Added: "Advanced settings" dropdown
* Removed: Indent
* Added: Easy days
* Added: Sticky header
* Removed: Easy Day updating without saving
* un-nest disclosure
* bump fsrs
* Update a VSCode setting to match recent releases
* Move Easy Days above the Advanced settings
I think it's a bit more logical to have Advanced come last.
* Ensure graph fits inside screen height
* Bump fsrs version
* Feat/support load balance and easy days in FSRS simulator
* format
* consider LoadBalancerEnabled
* use fsrs::PostSchedulingFn
* add load balance and easy days to compute_optimal_retention
* move simulator to a pop-over
* fix incorrect simulationNumber when error 500
* Feat: Save to Preset Options
* update tabs when update newPerDay & reviewsPerDay
* don't reset deckSize & daysToSimulate when save options
* fix missing easy days
* plan to support review priority
* Fix graph line rendering with non-scaling stroke
* simplify review priority function with helper wrapper
* fallback to default ReviewPriority for Added & ReverseAdded
* Update ts/routes/deck-options/SimulatorModal.svelte
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* Wrap review priority function in Arc for thread-safe sharing
* more granularity for R sorting
* Add graph smoothing option to FSRS simulator
* Improve graph resize handling in FSRS simulator
* simplify review priority calculation
* Add review order selection to FSRS simulator modal
* Refactor review priority function using macro for conciseness
* Add copyright and license header to SimulatorModal.svelte
* cargo clippy
* ./ninja fix:eslint
* update fsrs-rs
* Update FSRS dependencies and refactor load balancing functions
- Update fsrs-rs dependency to latest commit
- Modify retention and simulator modules to use Arc instead of Box
- Update function signatures and imports in simulator module
- Simplify review card order handling with direct enum usage
* resolve reviewed changes
* replace .unwrap() with ?
* move simulating into SimulatorModal
* add (crate) to interval_to_weekday
* Update FsrsOptions.svelte
* format
---------
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* Feat/support new cards ignore review limit in simulator
* ./ninja fix:minilints & ./ninja format
* use published crate
* make newCardsIgnoreReviewLimit reactive
* format
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
* Update to FSRS-rs v1.3.2
* add fsrs_short_term_with_steps_enabled to config
* ./ninja fix:minilints
* fix defaults_for_testing
* if current parameters are invalid, skip comparison
fix#3498
* fix redundant_field_names
* cargo clippy --fix
* Update to FSRS-rs v1.3.3
* Update to FSRS-rs v1.3.4
* Avoid an extra config lookup on each card answer (dae)
* Fully switch to File::set_times() from utime crate
* Switch to open_file()
Future me will end up wondering why we're explicitly declaring read=true
* Fix failing on windows
* Minor tidy-up (dae)
* Fix comment typo
* Fully switch to File::set_times() from utime crate
* Switch to open_file() (dae)
Future me will end up wondering why we're explicitly declaring read=true
- Primarily for the latest RUSTSEC on pyo3
- utime has been pinned, as they've introduced a deprecation warning
without a solution being available for folder mtimes
* graduate card when user press hard and has 0 learning steps
* fix error: useless conversion to the same type
* do the same thing to again
* fix expected `Option<u32>`, found integer
* ./ninja format
* let FSRS control short term schedule
* Update to FSRS-rs v1.3.0
* ./ninja check:clippy
* Update to FSRS-rs v1.3.1
* Pin FSRS version (dae)
https://github.com/ankidroid/Anki-Android-Backend/pull/417
* Remove redundant parens (dae)
* keep the same-day reviews in feature
* Update to FSRS-rs v1.2.3
* format
* don't remove short-term reviews if not training
* Update to FSRS-rs v1.2.4
* Bump Python deps
Primarily for flask-cors CVE
* Bump TS deps; pin license checker
Current checker is missing the binary
https://github.com/RSeidelsohn/license-checker-rseidelsohn/issues/118
* Update Rust deps
Hyper and axum are held back as we currently make use of the older
http library that reqwest pulls in
* graduate card when user press hard and has 0 learning steps
* fix error: useless conversion to the same type
* do the same thing to again
* fix expected `Option<u32>`, found integer
* ./ninja format
* Update to FSRS-rs v1.2.0
* if else -> match
* Weight length check has been moved into FSRS (dae)
* Don't mention the number of FSRS parameters (dae)
It has changed, and may change again.
* Feat/FSRS-5
* adapt the SimulatorConfig of FSRS-5
* update parameters from FSRS-4.5
* udpate to FSRS-rs v1.1.0
* ./ninja fix:minilints
* pass ci
* update cargo-deny to 0.14.24
* udpate to FSRS-rs v1.1.1
* update to fsrs-rs v1.1.2