Modularizing the Framework
Items defined in osaf.app
The osaf.app parcel (along with Application.py and osaf/views/main) defines "Chandler the application". Modules that are meant to be reusable outside of Chandler, should not make any reference to osaf.app. This allows someone to come along and define their own foo.app yet still use "Chandler the platform" (which I really think we should give its own name, for clarity).
Here are items that used to live in osaf.app but have been moved elsewhere:
| Item | Description | Proposed Location | Notes | Status |
| allCollection | a collection based on mine, notmine, non-recurring notes, and trash | osaf.pim | | |
| allEventsCollection | the intersection of allCollection and events | osaf.pim | | |
| collectionColors | CollectionColors? | osaf.pim | I also got rid of the duplicate color hue list from menus.py | |
| currentContact | reference | osaf.pim | | |
| currentMailAccount | reference | osaf.pim | | |
| currentSMTPAccount | reference | osaf.pim | | |
| currentWebDAVAccount | reference | osaf.sharing | | |
| emailAddressCollection | kind collection | osaf.pim | | |
| eventsWithReminders | events collection filtered by those events that have reminders | osaf.pim | | |
| inCollection | inSource minus trash | osaf.pim | | |
| inSource | Filtered collection, source = mail, filter = inbound is True | osaf.pim | | |
| locations | KindCollection? | osaf.pim | | |
| mail | KindCollection? | osaf.pim | Renamed mailCollection due to a conflict | |
| masterEvents | Filtered collections, source = events, filter = 'item.hasTrueAttributeValue('occurrences') and item.hasTrueAttributeValue('rruleset')' | osaf.pim | | |
| mine | non-recurring notes minus notMine | osaf.pim | | |
| nonRecurringNotes | filtered collection, source = notes, filter = (not item.hasLocalAttributeValue('isGenerated') or not getattr(item, 'isGenerated', False)) and not item.hasLocalAttributeValue('modificationFor')') | osaf.pim | | |
| notMine | Union of collections considered not mine | osaf.pim | | |
| notes | KindCollection? | osaf.pim | | |
| outCollection | outSource minus Trash | osaf.pim | | |
| outSource | Filtered collection, source = mail, filter = isOutbound is True | osaf.pim | | |
| TrashCollection? | ListCollection? | osaf.pim | Renamed to trashCollection | |
| untitledCollection | an InclusionExclusionCollection? used as a template to copy whenever the user does "New Collection" | moved into events.py (the only place it's used) | | |
Here are items that will remain in osaf.app, at least for now:
| Item | Description | Proposed Location | Notes | Status |
| Block Inspector | script | osaf.app | | |
| Browse Selected | script | osaf.app | | |
| CleanupAfterTests? | script | osaf.app | | |
| CosmoWebDAVAccount? | out-of-the-box webdav account | osaf.app | | |
| Event Timing | script | osaf.app | | |
| Item Inspector | script | osaf.app | | |
| lobsResource | servlet | osaf.app | | |
| mainServer | webserver | osaf.app | | |
| me | Contact representing the user | osaf.app | Assigns itself as currentContact | |
| meName | me's name | osaf.app | | |
| New Script | script | osaf.app | | |
| OSAFContact | a Contact representing OSAF dev | osaf.app | | |
| OSAFContactName? | OSAFContact's name | osaf.app | | |
| OSAFLocation | OSAFContact's location | osaf.app | | |
| Paste New Item | script | osaf.app | | |
| photoResource | servlet | osaf.app | | |
| PredefinedIMAPAccount? | out of the box account | osaf.app | | |
| PredefinedPOPAccount? | out of the box account | osaf.app | | |
| PredefinedReplyAddress? | out of the box account | osaf.app | | |
| PredefinedSMTPAccount? | out of the box account | osaf.app | | |
| prefResource | servlet | osaf.app | | |
| Reload Parcels | script | osaf.app | | |
| repoResource | servlet | osaf.app | | |
| scripts | KindCollection? | osaf.app | | |
| scriptsCollection | scripts collection minus trash | osaf.app | | |
| sidebarCollection | a ListCollection? | osaf.app | | |
| startServers | Startup item | osaf.app | | |
| TestIMAPAccount? | internally-used account | osaf.app | | |
| TestPOPAccount? | internally-used account | osaf.app | | |
| TestReplyAddress? | internally-used account | osaf.app | | |
| TestSMTPAccount? | internally-used account | osaf.app | | |
| WelcomeEvent? | The welcome note | osaf.app | | |
| xmlrpcResource | servlet | osaf.app | | |
Other Completed Refactoring
- osaf/framework/types/DocumentTypes.py was deemed generic enough to move into osaf.pim.structs
- We had two places in the code where collection colors were defined, and that has been collapsed into osaf.pim. osaf.pim's hsv_to_rgb conversion now uses python colorsys module rather than depending on WX.
Future Refactoring
- Collections
- Get rid of the Collection.setup( ) routine, and try to fold that into __init__( ); However, that means all collections would get a color, which probably isn't what we want.