1. 29 Apr, 2016 2 commits
  2. 28 Apr, 2016 1 commit
    • Bram Schoenmakers's avatar
      Fix crash when completing/deleting items after an edit. · c3ef22af
      Bram Schoenmakers authored
      The crash occurs when using text-based identifiers and performing an edit on
      selected items (instead of the whole todo.txt file).
      
      If you edit the text of a child item (having a p tag), then the item is deleted
      using the TodoListBase.delete() instead of TodoList.delete(). But
      this messes up the dependency administration, still thinking that the removed
      todo item is still in the list. When you call the children of any todo item
      (part of the deletion/completion step), it will return a stale Todo item, whose
      number() can not be found anymore in the TodoListBase. That makes it crash.
      c3ef22af
  3. 25 Apr, 2016 2 commits
  4. 13 Apr, 2016 2 commits
  5. 12 Apr, 2016 3 commits
  6. 23 Feb, 2016 1 commit
  7. 21 Feb, 2016 2 commits
  8. 20 Feb, 2016 2 commits
  9. 15 Feb, 2016 1 commit
  10. 11 Feb, 2016 3 commits
  11. 04 Feb, 2016 1 commit
  12. 29 Jan, 2016 4 commits
    • Bram Schoenmakers's avatar
    • Bram Schoenmakers's avatar
      Import directed graph module on demand · 26309f6e
      Bram Schoenmakers authored
      26309f6e
    • Bram Schoenmakers's avatar
      Load dependency information on demand · 61253864
      Bram Schoenmakers authored
      Not all commands always need dependencies (pri, depri, ls -x), but all
      administration is still built up every time a TodoList is instantiated.
      Now, as soon as something dependency related is requested from the
      TodoList, the dependency graph and caches are initialized.
      
      A decorator is used to mark methods in TodoList that require an
      initialized graph.
      
      This change impacts the calculation of the average importance (based on
      the todo's ancestors). Importance doesn't have a notion of TodoList (and
      I would like to keep it that way), so the calculation needs access to
      the parents somehow. This was done with a parents attribute stored with
      each Todo item, carefully kept up to date by the TodoList. This is
      cumbersome, instead, now a Todo item gets a parents() method that
      obtains the parents from the TodoList that keeps the todo item.
      61253864
    • Bram Schoenmakers's avatar
      Look up parent todo items more efficiently · 2365e99d
      Bram Schoenmakers authored
      todo_by_dep_id was quite inefficient due to the linear search, calling
      Todo.tag_value() many times to fetch the dependency ID.
      
      Instead, maintain a dictionary that maps a parent ID to a todo item so
      it can be looked up more easily.
      2365e99d
  13. 28 Jan, 2016 1 commit
  14. 27 Jan, 2016 4 commits
    • Bram Schoenmakers's avatar
      Use if instead of try-except in tag methods · 014a0e22
      Bram Schoenmakers authored
      The except path is relatively often chosen, making these functions
      (still) quite slow.
      
      (Exceptions are slow in Python and they are what they are called:
      exceptions, not common cases).
      014a0e22
    • Bram Schoenmakers's avatar
      Fix typo in docstring · 5be5f5ee
      Bram Schoenmakers authored
      5be5f5ee
    • Bram Schoenmakers's avatar
      Rename variable · 10905d5d
      Bram Schoenmakers authored
      10905d5d
    • Bram Schoenmakers's avatar
      Store tags as a dictionary · ad854716
      Bram Schoenmakers authored
      Store tags in a dictionary where the key is the tag name and the value
      is a list of values for that tag.
      
      This makes tag operations much quicker (especially TodoBase::has_tag()
      and TodoBase::tag_values()). They made quite a dent in execution time
      with heavy todo.txt files with many tags, due to the numerous list
      comprehensions that took place.
      ad854716
  15. 25 Jan, 2016 2 commits
  16. 22 Jan, 2016 1 commit
  17. 11 Jan, 2016 2 commits
  18. 08 Jan, 2016 1 commit
  19. 06 Jan, 2016 1 commit
  20. 05 Jan, 2016 1 commit
    • Bram Schoenmakers's avatar
      Use raise ... from syntax to link exceptions · 75ee98ac
      Bram Schoenmakers authored
      Python handles one exception at a time (per thread), raising a new
      exception while still handling another one will result in run-time
      errors. By linking the second exception to the original one, Python will
      handle it correctly.
      
      This was encountered while developing the alternative column UI, which
      bailed out on completing a todo item with (invalid) child todo items.
      75ee98ac
  21. 04 Jan, 2016 1 commit
  22. 30 Dec, 2015 1 commit
  23. 29 Dec, 2015 1 commit