[Biopython-dev] [Bug 2866] SQLite support for BioSQL

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sun Jul 5 11:10:02 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2866


biopython-bugzilla at maubp.freeserve.co.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
         OS/Version|FreeBSD                     |All




------- Comment #4 from biopython-bugzilla at maubp.freeserve.co.uk  2009-07-05 07:10 EST -------
Three points...

Which existing schema did you start from to generate this one,
and how did you do it? This may be interesting for Hilmar if
there are any subtle differences between the existing schemas.

---------------------------------------------------------------

This new line in BioSeq.py isn't valid on Python 2.4,

    val = [(str(x) if isinstance(x, unicode) else x) for x in val]

See http://www.python.org/dev/peps/pep-0308/

As a quick hack, I used:

    val = [_make_unicode_into_string(x) for x in val]

where I had defined:

    def _make_unicode_into_string(text) :
        if isinstance(text, unicode):
            return str(text)
        else :
            return text

Not very elegant, but with that the BioSQL tests pass on my old
desktop using Python 2.4 and MySQL. This machine doesn't have
the SQLite bindings installed.

---------------------------------------------------------------

In the long term, Tests/setup_BioSQL.py could automatically try
to use SQLite (if available) when the user hasn't overriden it
with their own local settings.

Peter

P.S. I filed BioSQL enhancement Bug 2870 for adding an SQLite
schema to BioSQL itself. And I marked this bug as an enhancement
too.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list