[SQLObject] New module sqlobject.util.csvimport for test fix…

Top Page
Author: Ian Bicking
Date:  
To: SQLObject Discuss, turbogears
Subject: [SQLObject] New module sqlobject.util.csvimport for test fixtures
I've added a module in sqlobject.util.csvimport for loading data from
CSV files for test fixtures. It has docstrings which should explain the
functionality.

I've attached a CSV file I'm using in a test, as an example of what they
look like. If anyone wants to make a function for dumping a class (or
classes) to a CSV file, that'd be useful too. Well, I won't need it,
but it seems like it would fit with CatWalk well. These CSV files are
meant to be human-editable, not necessarily capable of expressing every
database setup (they can and should be augmented with a Python setup
routine).

Hmm... it occurs to me that the csvexport and csvimport modules do not
actually work well with each other. This is mostly a name problem --
they aren't intended to work with each other -- but maybe I should do
something about that.

-- 
Ian Bicking  /  ianb@???  /  http://blog.ianbicking.org
CLASS:,EventType,,,,,,,,,,,
[name],name,,,,,,,,,,,
show_type,Show,,,,,,,,,,,
class_type,Class,,,,,,,,,,,
lecture_type,Lecture,,,,,,,,,,,
festival_type,Festival,,,,,,,,,,,
,,,,,,,,,,,,
CLASS:,Location,,,,,,,,,,,
[name],name,address,city,state,zip,phone,map_link,directions,,,,
office,Office,"5121 N. Ravenswood Ave",Chicago,IL,60640,773-275-9144,,"Left at the 7-11",,,,
gallery37,"Gallery 37 Center for the Arts","66 East Randolph Street",Chicago,IL,60601,"312.744.8925, fax 312.744.9249, tty 312.744.2947",,"Gallery 37 is located at 66 East Randolph St.\n between Wabash and Michigan Ave.",,,,
,,,,,,,,,,,,
CLASS:,Event,,,,,,,,,,,
[name],title,date_start:date,date_end:date,time,description,url,fee,contact_name,contact_phone,contact_email,active:bool,location:ref
old_event,"Old Times",NOW-7,,,"An Old-timey fun time",http://the-web-was-not-invented-yet.com,"a mere wheypenny",,,,t,office
future_event,"Future Times",NOW+300,NOW+305,,"An adventure in a gray and dreary distopian future\n\nHave fun in an automated and depersonalized environment!\nRead more at: http://web-5-0.com",,,,,,t,office
hidden_event,"Fun time",NOW+3,,,"Run and jump and fly kites, yeah!",,,,,,f,gallery37
normal_event,"See movie",NOW+5,,7pm,"See a movie with other people",,"$10 ($5 with student ID)","George Brown",773-555-5555,george@???,t,gallery37