Hi all, I've done about 40% of a first pass review of seqdb.py. This pass was focused on PEP-8 cleanup and increased test coverage; only a teensy bit of new functionality was changed, because I thought it was an error (see below, keyword 'BlastDB').
--- I changed only seqdb.py and seqdb_test.py. The branch is publicly accessible: http://github.com/ctb/pygr/tree/seqdb-review You can see the 'new' seqdb.py here: http://github.com/ctb/pygr/blob/f3d7d397b066b7617f4f2e0ed7ad0883fbc2bbf7/pygr/seqdb.py and the diff of seqdb_test.py here: http://github.com/ctb/pygr/commit/3d911df2a07f849e1c354bc1b5255f5fa78f7db3 --- What to look at overall: - the new tests, if you care; - down to line 454 of seqdb.py I'd appreciate general comments on the documentation and formatting. I did my best to make it PEP-8 compliant, which is somewhat at odds with the original code; please point out discrepancies if you see 'em. --- First, let me say that I found a bug! Hooray! There was some untested code in 'store_seqlen_dict', surrounding the custom file reader functionality; as soon as I tried running it, it broke. Score one for code coverage ;) Second, I changed the default value of dbClass in the constructor arguments to PrefixUnionDict from 'BlastDB' to 'SequenceFileDB'. Chris, is this correct? I only noticed it because I moved the order of class definitions around. Other than that, I placed a few cryptic comments at the top of the file to remind myself of things to discuss after the first reformatting & review pass. People who are interested can scan through the file for '@CTB' markers and try to decipher them, or just ask me. --- My current plan is to finish up the PrefixUnionDict stuff as soon as possible, and then work up a list of issues and proposed refactorings to discuss on the list. Let me say, paranthetically, that I now feel like I really understand the core of seqdb.py... Code review is good for the brain, especially when tightly coupled to tests! cheers, --titus -- C. Titus Brown, c...@msu.edu --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pygr-dev" group. To post to this group, send email to pygr-dev@googlegroups.com To unsubscribe from this group, send email to pygr-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pygr-dev?hl=en -~----------~----~----~----~------~----~------~--~---