Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

Commit

Permalink
Moved several comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Romansky committed Dec 18, 2014
1 parent 3ba8809 commit 6a3e6e6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
10 changes: 6 additions & 4 deletions src/freeseer/framework/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
# TODO: Fix the ON CONFLICT clause
# TODO: Force the Date to be QDate
# TODO: Figure out what the types should be for StartTime/EndTime e.g. QTime
# TODO: Enforce the default values in the CSV/RSS importer
# TODO: Enforce the default values in Presentation.__init__
# TODO: Enforce the default values in db.insert_presentation()
# TODO: Enforce the default database values in the CSV/RSS importer
# TODO: Enforce the default database values in Presentation.__init__
# TODO: Enforce the default database values in db.insert_presentation()
# TODO: Check what format the csv and rss sample files are in. For instance, do the rss files use 'None' instead of ''
# for missing fields?
# TODO: Update _helper_presentation_exists() and get_presentation_id() to use the new schema such that they no longer
Expand All @@ -93,7 +93,7 @@
Release INTEGER,
UNIQUE (ID) ON CONFLICT REPLACE)'''

# TODO: Ensure that the CSV/RSS to presentation importters are done using the same conventions. For instance, convert a
# TODO: Ensure that the CSV/RSS to presentation importers are done using the same conventions. For instance, convert a
# room with value None to '' in both the csv and rss importer. Instead of the csv parser converting None to 'None'
# and the rss importer doing something else etcetera.

Expand Down Expand Up @@ -461,6 +461,8 @@ def add_talks_from_rss(self, feed_url):

if presentations:
for presentation in presentations:
# TODO: The presentation['Time'] field should never be None. This can be removed after defaults are
# added and the csv/rss impoters are fixed to handle Date, StartTime, and EndTime.
if not presentation["Time"]:
presentation["Time"] = ''
talk = Presentation(title=presentation["Title"],
Expand Down
13 changes: 9 additions & 4 deletions src/freeseer/framework/presentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ class Presentation(object):
This class is responsible for encapsulate data about presentations
and its database related operations
'''

# TODO: Are Default variable necessary if they are all empty-string values?
DEFAULT_ROOM = ''
DEFAULT_DATE = ''
DEFAULT_TIME = ''

def __init__(self, title, speaker="", description="", category="", event="Default", room="Default",
# TODO: Confirm Presentation.date is or is not a QDate object.
# TODO: Confirm Presentation.startTime should store a QDateTime object or a QTime object.
# TODO: Confirm Presentation.endTime should store a QDateTime object or a QTime object.
def __init__(self, title, speaker='', description='', category='', event='', room='',
date='', startTime='', endTime=''):
'''
Initialize a presentation instance
Expand All @@ -50,9 +55,9 @@ def __init__(self, title, speaker="", description="", category="", event="Defaul
self.category = category
self.event = event
self.room = room
self.date = date # TODO: confirm this is a QDate object.
self.startTime = startTime # TODO: Confirm if this shall store a QDateTime object or a QTime
self.endTime = endTime # TODO: Confirm if this shall store a QDateTime object or a QTime
self.date = date
self.startTime = startTime
self.endTime = endTime

if not self.room:
self.room = self.DEFAULT_ROOM
Expand Down

0 comments on commit 6a3e6e6

Please sign in to comment.