0.9 Release

0.9 is done! For this release I have implemented Data Persistence. To do this I made use of the SQL Alchemy framework. This framework is similar to the Hibernate Java framework from the JBoss project. A couple major stumbling blocks were encountered. The main source of frustration this release occured with the Log -> LogLine relation. I thought I had coded everything correctly, but it turns out that I had forgotten to derive my LogLine class from the special SQL Alchmey base class. Once I did this things worked much better.

I have also done some investigation into my SQLite issue and it turns out that it is not possible for SQLite to work properly. The CGI environment is limited to one writable file at a time. SQLite requires that the db file be writable as well as four temporary files. Dave told me about a pragma which can instruct SQLite to use memory for temporary files but it turns out that only 1 of the 4 files obey this request. In order for the SQLite library to use purely memory for temporary files you would need to recompile the SQLite library. This means that you would likely need to recompile PySqlite (the Python -> SQLite3 binding).

I also found that I needed to write another class. The class structure I have was not using 1:1 mappings between domain objects and code objects. Each log has tests. Each failing test has its own log. Right now I am storing this ‘sub-log’ as an array of strings. In order to simplify the logic in my application and the persistence I am going to seperate this into its own class. I can use the __init__ and __repr__ methods in place of special names that I am currently using.

I would have like to get more done in this release but between some really annoying bugs and my white paper I just didn’t have the time. This comming release cycle should have a lot in it because I have nothing other than an iPhone app to write :)

For my 1.0 release I would like to have the insertion and viewing logic completed and I would like to convert my code to CherryPy from CGI. CherryPy is an HTML controller which works on WSGI. I am hoping that this framework will allow SQLite to work as I am finding Postgres to be a little slow for what I am doing.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>