Wrote this up for Design, and then realized it was mostly implementation details. Stored here until we get to design.
Currently, data is being imported from files in the TAO5 CSV-like format. There are four header lines (with the second line being the column names), following by data in CSV like format. However, other formats, such as the data logger “Array” format, which has no column headers, may also be imported. An import module will implement an interface while can be used to obtain data from the data format it has been designed to read and process.
Data importer classes will inherit from PhotizoDataImporter. The parent class will define exceptions, as well as things like a “universal file opener” which will enable a class to open just about any URL (file, http, ftp, etc) by default.
__init__()
load_readings(URL, expectedColumns, lastDate)
getReadings()
Exceptions a Data Importer can raise.
Raised when a module is passed a URL it doesn’t know how to handle.
Raised when the module cannot connect to the host from which it is trying to collect data.
Raised when the desired data source cannot be accessed: file not found, invalid database or table.
Raised when the data source does not have all the columns in the expectedColumns list.
Raised when the data source has columns that are not in the expectedColumns list. (:notoc:)
