[Biopython-dev] PEP8 lower case module names?
Peter Cock
p.j.a.cock at googlemail.com
Wed Sep 5 20:57:19 EDT 2012
On Thu, Sep 6, 2012 at 1:37 AM, Brad Chapman <chapmanb at 50mail.com> wrote:
>
> Hi all;
> I don't know if there's going to be a clean way around mucking up the
> API for older scripts if we make this change.
>
> If we want to do this my thoughts would be:
>
> - Use the 'bio' module since that's the cleanest.
> - Hack together something that will remove old 'Bio' modules on install
> of the new version.
> - Write a Biopython1to2 script that will fix the imports on older
> scripts to the new module structure.
I really don't like using "bio" since (due to Python's use of
folders for package names) you couldn't in general also have
the old code available under "Bio". i.e. This forces a hard
switch on our users which is a very bad idea I think.
Thus my suggestion of something else like "biopy" (although
the Mac's autocorrection keeps turning it into biopsy which
would be annoying - grin), or if not already taken "bp".
To expand on my earlier email, the transition structure I
had in mind was that we'd have something like this:
biopy/seq/__init__.py - real code for Seq object etc
Bio/Seq/__init__.py - just "from biopy.seq import Seq"
and a deprecation warning.
> However, my vote would be to stick with everything as is. I know we
> aren't PEP8 compliant but things aren't that awful that we need an
> upheaval. I wish Python library installs weren't so messy that we could
> do this more cleanly,
> Brad
That does seem safer, and we can still do the less invasive
restructuring discussed, e.g.
Bio/Seq.py -> Bio/Seq/__init__.py allowing us to (gradually)
move Bio.Seq* things under Bio.Seq, while preserving the
legacy imports under a deprecation warning.
Also if we're considering moving Bio.SeqIO to Bio.Seq, as
Bow points out, we'd want to do Bio/AlignIO.py -> Bio.Align
(perhaps pushing the core objects into Bio/Align/_objects.py
or similar but exposing them in the current namespace
location).
Regards,
Peter
More information about the Biopython-dev
mailing list