Commit graph

2581 commits

Author SHA1 Message Date
Damien Elmes
7fceffa890 rework the new scheduler's rollover/day counting code
The previous implementation interpreted the creation date as a local
time, and applied the rollover to that. If the initial creation date
was around midnight local time, even a one hour change due to daylight
savings could result in Anki skipping or doubling up on a day. To
address this, the rollover is now applied to the current time instead
of the creation date.

The new code needs the current time passed into it. This makes it
easier to unit test, and for AnkiWeb to be able to use the user's local
timezone.

The new timezone code is currently disabled, as this code needs to be
ported to all clients before it can be activated.
2019-12-27 21:53:20 +10:00
Damien Elmes
82960b930f fix sidebar background color on windows 10 2019-12-27 21:53:20 +10:00
Damien Elmes
da2a910b39 Merge pull request #390 from zjosua/patch-1
Update README.development
2019-12-27 08:48:02 +10:00
Damien Elmes
c78685a59b time of day hack in tests was off by an hour 2019-12-27 08:43:25 +10:00
Damien Elmes
6dd7c058ed fix 32 bit Linux builds
if you're reusing a venv, run 'make clean' and 'pip uninstall maturin'
before building again.
2019-12-27 08:42:48 +10:00
Damien Elmes
0b0a8e29bf check depends on build 2019-12-27 08:40:46 +10:00
zjosua
f8595c148a Update README.development
Add instruction to build the Python virtual environment with --system-site-packages when using the distro-installed PyQt5.
2019-12-26 14:28:19 +01:00
Damien Elmes
f04e8fb6c2 Merge pull request #386 from agentydragon/ref
Use named groups instead of numbered groups to refer to clozeReg
2019-12-26 10:10:47 +10:00
Michal Pokorný (Rai)
70db8c211e Rename constants 2019-12-26 00:38:54 +01:00
Damien Elmes
733d7c7445 add note about pre-push 2019-12-26 09:30:45 +10:00
Rai
2568a8aaf2 Merge branch 'master' into ref 2019-12-25 23:10:28 +01:00
Damien Elmes
2c14aab073 Merge pull request #387 from agentydragon/classmethods
Use @classmethod on methods that do not depends on instance state
2019-12-26 07:52:51 +10:00
Damien Elmes
95aa961eba Merge pull request #388 from agentydragon/use-setdefault
Use dict.setdefault
2019-12-26 07:43:01 +10:00
Damien Elmes
ef57fd004b isort tests; black/isort should notice changes to tests 2019-12-26 07:36:26 +10:00
Damien Elmes
f0fc30e124 don't write test data in ~ 2019-12-26 07:00:10 +10:00
Damien Elmes
53e9fe775c update ts lock 2019-12-26 06:59:59 +10:00
Michal Pokorný (Rai)
19b833fb8d Use dict.setdefault 2019-12-25 15:34:30 +01:00
Michal Pokorný (Rai)
764ff00dd1 Use @classmethod on methods that do not depends on instance state 2019-12-25 15:12:48 +01:00
Michal Pokorný (Rai)
1f5c039ac9 Use named groups instead of numbered groups to refer to clozeReg 2019-12-25 15:06:00 +01:00
Damien Elmes
222789e1af drop oneshell from makefile
It's preventing @ prefixes on subsequent lines from being honored.
2019-12-25 16:05:01 +10:00
Damien Elmes
a1af6e61ae format tests 2019-12-25 14:18:34 +10:00
Damien Elmes
4264fec1fb more tests fail close to 4am; automatically adjust the time instead 2019-12-25 14:08:04 +10:00
Damien Elmes
cae97c56fc disable test around daily cutoff time 2019-12-25 13:43:08 +10:00
Damien Elmes
84f589bc75 fix handling of typing cards 2019-12-25 13:01:19 +10:00
Damien Elmes
7e1da06b7e Merge pull request #385 from agentydragon/rai-about
Adding myself to contributor list
2019-12-25 12:22:04 +10:00
Damien Elmes
56610a4e9d tweak dev docs 2019-12-25 12:13:28 +10:00
Damien Elmes
c37c1a4763 fix for isort failing to install in CI 2019-12-25 12:13:28 +10:00
Damien Elmes
b111c6108f mypy is required to build the protobuf code 2019-12-25 10:35:31 +10:00
Damien Elmes
f855514dd3 add protoc to github actions 2019-12-25 10:26:16 +10:00
Michal Pokorný (Rai)
c87c34d1a6 Adding myself to contributor list 2019-12-25 01:25:57 +01:00
Damien Elmes
0dce7b0a95 add a few type hints 2019-12-25 09:19:57 +10:00
Damien Elmes
8ef1fa7ed1 bridge->backend 2019-12-25 08:59:33 +10:00
Damien Elmes
45f26ed255 convert nose decorators and helpers to nose2 2019-12-24 21:42:40 +10:00
Damien Elmes
e5da0bf84e if base folder can't be written, defer displaying message until qt is ready 2019-12-24 20:33:39 +10:00
Damien Elmes
3e4f2598d4 fix failure to start on new install - lang init needs to be deferred 2019-12-24 20:24:07 +10:00
Damien Elmes
dda2b9deea factor in user scale factor when calculating height
fixes top bar line not appearing, and possible fix for
https://anki.tenderapp.com/discussions/beta-testing/1685-black-bars
2019-12-24 20:15:47 +10:00
Damien Elmes
02ceab04e7 ignore dot files and generated files when determining rust deps 2019-12-24 19:57:55 +10:00
Damien Elmes
297fdc46d2 exclude generated proto files from isort 2019-12-24 19:57:55 +10:00
Damien Elmes
37791b2d55 comment out updatereqs speed test 2019-12-24 19:57:55 +10:00
Damien Elmes
7b7bf0737e hack around race condition triggered in tests on win32 2019-12-24 19:57:55 +10:00
Damien Elmes
b3b3cb2e08 switch to nose2; nose looks to be on the way out 2019-12-24 19:57:55 +10:00
Damien Elmes
9a239fb9a0 remove unnecessary global from tests 2019-12-24 19:57:55 +10:00
Damien Elmes
a0590d9ed1 fix unit test on Windows 2019-12-24 19:57:54 +10:00
Damien Elmes
9923938925 if db lock fails, explicitly close database
on Windows at least, the database file otherwise remains locked after
an exception is raised on a read only file
2019-12-24 19:57:54 +10:00
Damien Elmes
ce19144920 update dev docs 2019-12-24 19:57:54 +10:00
Damien Elmes
7a91f2be64 generate type stubs for Protobuf; disable pylint on rsbridge 2019-12-24 19:57:54 +10:00
Damien Elmes
65db02ddde switch to Google's (C++) Protobuf implementation
Brings the 100 field test down from 3 secs to 0.15 secs.

"betterproto" indeed!
2019-12-24 19:57:54 +10:00
Damien Elmes
4347f10bcc compute template requirements in Rust
on a 100 field template, what took ~75 seconds now takes ~3 seconds.
2019-12-24 19:57:54 +10:00
Damien Elmes
54f438c999 in single field case, both 'any' and 'all' are equivalent 2019-12-24 19:57:54 +10:00
Damien Elmes
e05b77b083 use protobuf for python/rust bridge
If we go ahead with betterproto on the Python side, it will mean
bumping the minimum Python dependency to 3.7.
2019-12-24 19:57:54 +10:00