Re: Ideas for Biopython 2.0
Wibowo Arindrarto <[email protected]> Thu, 22 Jun 2017 11:49:13 +0000
| Newsgroups | gmane.comp.python.bio.devel |
|---|---|
| Message-ID | <CADEGkF5TfOAzbT4mWq96+27jA_M-wvxiyTvk1tDB_yXSkSjXdg@mail.gmail.com> |
Dear everyone, It seems that before we even start discussing the new package structure, we need to agree on which Python versions Biopython 2.0 should support. I agree with dropping Python 2.x dependency altogether and supporting the latest Python (which is 3.6 now; 3.5 still seems acceptable to support). I like to think that it is easier nowadays to use your preferred Python version regardless of what is available on the host system. Many tools now provide various levels of isolation to achieve this. Virtualenv (and in a similar vein, Conda), for example, makes it easy to set up user-level Python independent from the system Python. Containers like Singularity which does not require root privileges are also available. And if all else fails, there is still Biopython 1.x as Tiago mentioned. Aside from future maintainability reasons and simply being up to date, there are many Python 3.x-only features & standard library components that I feel can improve our code. To name a few from the top of my head: 1. Comparisons are more strict in Python 3 (now we get TypeErrors when comparing ints and non-ints, for example). 2. Laziness-by-default for some commonly used container operations like range(), dict.keys(), or dict.values(). 3. New standard library modules like pathlib (for filesystem paths), enum (proper enumeration), and concurrent.futures (for launching parallel tasks) that are joys to work with. 4. New literal string interpolation (f-strings) which makes the code even easier to read. 5. Type hinting, which can be helpful as the codebase gets large. And of course there is also the bytes-versus-string issue, but I would argue that is actually also an improvement over Python 2.x. P.S. +1 for the GitHub page ~ it is a nice place to track this. Also, as Joao mentioned, it is probably useful to look what similar other libraries are available now while we do the upgrade. Cheers, Bow On Thu, Jun 22, 2017 at 5:10 AM Tiago Antão <[email protected]> wrote: > On 21 June 2017 at 11:44, João Rodrigues <[email protected]> > wrote: > >> +5 for a wiki page, thanks Tiago. >> > <https://github.com/tiagoantao/> > Dear all, > > I just put a very modest page up > http://biopython.org/wiki/Biopython2 > Just with the major points I collected. > Feel free to change this. Also, I did write very little about package > restructuring. I don't feel I have the maturity to properly summarize the > discussion. > > I will try to update the page as long as the discussion goes on. In order > for us to have a consolidated list of topics. But, again, feel free to do > it yourself. > > Tiago > _______________________________________________ > Biopython-dev mailing list > [email protected] > http://mailman.open-bio.org/mailman/listinfo/biopython-dev _______________________________________________ Biopython-dev mailing list [email protected] http://mailman.open-bio.org/mailman/listinfo/biopython-dev