straw-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Straw-commits] 0.25--mainline: patch-4


From: Mike Alonzo
Subject: [Straw-commits] 0.25--mainline: patch-4
Date: Wed, 14 Jul 2004 12:52:36 +1000 (EST)

Revision: straw--mainline--0.25--patch-4
Archive: address@hidden
Creator: Jan Alonzo <address@hidden>
Date: Wed Jul 14 12:52:29 EST 2004
Standard-date: 2004-07-14 02:52:29 GMT
Modified-files: src/lib/Config.py src/lib/Feed.py
    src/lib/FeedDataRouter.py src/lib/FeedItems.py
    src/lib/FeedList.py src/lib/ImageCache.py
    src/lib/ItemStore.py src/lib/LookupManager.py
    src/lib/Main.py src/lib/__init__.py
New-patches: address@hidden/straw--mainline--0.25--patch-4
    address@hidden/straw--mainline--0.25--patch-3
Summary: 
Keywords: 

Summary: feeds config conversion; start cleaning straw namespace
Keywords: 


* Instead of importing 'straw', we now import the module directly since
  they are in the same package anyway. This makes it easier to run tests.

  - Affected modules:       

       src/lib/Config.py
       src/lib/FeedDataRouter.py
       src/lib/FeedItems.py
       src/lib/FeedList.py
       src/lib/Feed.py
       src/lib/ImageCache.py
       src/lib/__init__.py
       src/lib/ItemStore.py
       src/lib/LookupManager.py
       src/lib/Main.py

* Added feeds table conversion, and a '_n_items_unread' Feed attribute.

 - The conversion gets the the number of unread items based on 'number of items 
stored'
   preference. Since straw stores the most recent items down the list,
   we only count the unread items from the most recent N items, where N =
   cutoff.

   This works. After the conversion, the number of items unread will always
   be stored in the Feed attribute _n_items_stored. Comments are welcome.

   A get_number_of_unread function which accepts two arguments, feed_id and
   cutoff, was also created in ItemStore for the conversion.

 - Affected Modules:
 
        src/lib/Config.py
        src/lib/Feed.py
        src/lib/ItemStore.py

* Implemented __del__ method in FeedList which just saves the feedlist.

* Made ItemStore a singleton, refactor get_item_* functions.

  - Made ItemStore a singleton. Caution: there should only be one call to
    start() though. 

  - Added get_item_ids_for_id functions which accepts a feed ID as an argument
    rather than a Feed (which is what get_item_ids does). This enables us to
    have more separation in the future. As a consequence, added a
    __get_item_ids function.

  - Added get_item_for_id which accepts a Feed ID and an item_id rather than a
    Feed Object (and item_id). Again, more separation between domain and
    logic. Added __get_item as a consequence.

  - Exceptions in some functions in MyDB are now in try/catch/else block,
    which just aborts/commit on catch/else. Also, we log those exceptions
    instead of raising them.

* Main.py: Load items on feed selection instead of loading them all in Main's
  constructor. (Yes, I will implement a cache later on. I'm still poking at
  the source where the ideal place would be, I'm trying to avoid adding
  another module/layer.)

Enjoy!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]