[Biopython-dev] SearchIO, was: PEP8 lower case module names?

Peter Cock p.j.a.cock at googlemail.com
Mon Dec 3 11:36:16 UTC 2012


On Mon, Dec 3, 2012 at 11:22 AM, Wibowo Arindrarto
<w.arindrarto at gmail.com> wrote:
> Hi Peter,
>
>> I've just refactored the code in order to avoid most of the
>> index duplication (including SQLite backend) between the
>> SeqIO and new SearchIO index and index_db functions.
>
> Thanks :). I remember I did change some of the variable names.

Basically I moved the core SeqIO indexing code into Bio.File,
generalised it enough to work for SearchIO as well, then removed
the SearchIO indexing code.

> Other than this, the biggest change is probably related to the
> Indexer classes lazy loading in SearchIO. But it seems to have
> been handled as well :).

Yes, the SearchIO indexing is still calling your lazy loading
function to get the parser objects.

>> In the short term at least, the common code is now part
>> of Bio/File.py (but remains as private classes). That
>> seemed neater than introducing a new private module.
>
> Looks like a good place for now, Bio.File as the location for
> common file-handling code.

That was my thinking too.

>> Fingers crossed everything is fine on the buildslaves,
>> TravisCI seems happy. Bow, if you find I've broken
>> anything then we need more unit tests ;)
>
> Will keep that in mind :).

*Grin*

I've just done a base class for the random access proxy
classes, potentially a little more refactoring to follow here
(or renaming):
https://github.com/biopython/biopython/commit/9721cd00b5662309456c3dc573642cbb88e4e0a1

Peter



More information about the Biopython-dev mailing list