Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Fix tests by “pinning” Anki dependencies via a time machine #334

Merged
merged 3 commits into from
Jun 12, 2022

Conversation

oakkitten
Copy link
Contributor

This implements some of the changes I mentioned in #327. The other changes are more optional; the changes here are rather “core”. This also adds running tests in parallel and the new versions of Anki. The tests do pass!
image

Packages anki and aqt do not pin their requirements,
which breaks anki <= 2.1.49 because of protobuf major version bump.

While it's possible to use requirements.txt as constraints,
it might not be the best idea:
  * requirements.txt can’t be used as constraints
    without some careful sed’ding to remove hashes and extras;
  * its location changes between versions;
  * you can’t get this file for a pre-release version of Anki
    since these don't get git tags;
  * it’s rarely updated anyway and hence won’t reliably
    produce the environment that actual Anki uses.

So use a pypi-timemachine, which prevents pip from using packages
that were uploaded after a specified date.
While the code is a tad complex, it feels slightly less hacky,
and is likely to be producing more accurate environments.
@FooSoft FooSoft merged commit 113dc50 into FooSoft:master Jun 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants