Anki/anki
Damien Elmes 855de47ffe remove the stats table
The stats table was how the early non-SQL versions of Anki kept track of
statistics, before there was a revision log. It is being removed because:

- it's not possible to show the statistics for a subset of the deck
- it can't meaningfully be copied on import/export
- it makes it harder to implement sync merging

Implications:

- graphs and deck stats roughly 1.5-3x longer than before, but we'll have the
  ability to generate stats for subsections of the deck, and it's not time
  critical code
- people who've been using anki since the very early days may notice a drop in
  statistics, as early repetitions were recorded in the stats table but the
  revlog didn't exist at that point.
- due bugs in old syncs and imports/exports, the stats and revlog may not
  match numbers exactly

To remove it, the following changes have been made:

- the graphs and deck stats now generate their data entirely from the revlog
- there are no stats to keep track of how many cards we've answered, so we
  pull that information from the revlog in reset()
- we remove _globalStats and _dailyStats from the deck
- we check if a day rollover has occurred using failedCutoff instead
- we remove the getStats() routine
- the ETA code is currently disabled
- timeboxing routines use repsToday instead of stats
- remove stats delete from export
- remove stats table and index in upgrade
- remove stats syncing and globalStats refresh pre-sync
- remove stats count check in fullSync check, which was redundant anyway
- update unit tests

Also:

- newCountToday -> newCount, to bring it in line with revCount&failedCount
  which also reflect the currently due count
- newCount -> newAvail
- timeboxing routines renamed since the old names were confusingly similar to
  refreshSession() which does something different

Todo:

- update newSeenToday & repsToday when answering a card
- reimplement eta
2011-04-28 09:21:07 +09:00
..
importing remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
template disable callable replacement which isn't supported on older pythons 2011-01-20 05:32:30 +09:00
__init__.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
cards.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
db.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
deck.py remove the stats table 2011-04-28 09:21:07 +09:00
errors.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
exporting.py remove the stats table 2011-04-28 09:21:07 +09:00
facts.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
fonts.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
graphs.py remove the stats table 2011-04-28 09:21:07 +09:00
history.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
hooks.py new syncName handling 2010-11-23 23:12:34 +09:00
lang.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
latex.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
media.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
models.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
sound.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
stats.py remove the stats table 2011-04-28 09:21:07 +09:00
stdmodels.py place cards with corrupt/missing facts into new fact instead of deleting 2010-12-13 06:46:20 +09:00
sync.py remove the stats table 2011-04-28 09:21:07 +09:00
tags.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00
upgrade.py remove the stats table 2011-04-28 09:21:07 +09:00
utils.py remove self explanatory module docstrings; strip trailing whitespace 2011-04-28 09:21:07 +09:00