Ticket #10348 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

upgrade optional biopython package to 1.57

Reported by: mhampton Owned by: tbd
Priority: major Milestone: sage-4.7
Component: packages: optional Keywords: biopython
Cc: mvngu Work issues:
Report Upstream: N/A Reviewers: Martin Albrecht, David Kirkby, Marshall Hampton
Authors: Adam Webb Merged in:
Dependencies: Stopgaps:

Description (last modified by mhampton) (diff)

Biopython 1.57 was released on April 2nd, 2011. This ticket was originally created for biopython-1.56, so we are now two versions behind.

Announcement at:  http://news.open-bio.org/news/2011/04/biopython-1-57-released/

New package at  http://sage.math.washington.edu/home/awebb/biopython-1.57.spkg

Change History

comment:1 Changed 2 years ago by mhampton

  • Status changed from new to needs_review

comment:2 Changed 2 years ago by kcrisman

  • Authors changed from mhampton to Marshall Hampton

Any hints on what someone who doesn't actually use biopython might do to review this (that is, pitfalls or something)?

comment:3 Changed 2 years ago by mhampton

You could try to do some examples from the Biopython tutorial:  http://www.biopython.org/DIST/docs/tutorial/Tutorial.html

or look at previous reviews such as:  http://trac.sagemath.org/sage_trac/ticket/9857

But biopython has good internal testing and is pretty stable, so there shouldn't be any problems. Its more double-checking the packaging.

comment:4 Changed 2 years ago by malb

  • Status changed from needs_review to needs_work

Hi,

  • the changes to SPKG.txt are not checked in
  • I think the order of the changelog is the wrong way around, the newest entry should be at the top

On the plus side:

  • src is indeed the same as upstram
  • spkg installs cleanly on sage.math
  • I ran one example from the tutorial and it worked
>>> from Bio.Seq import Seq
>>> from Bio.Alphabet import IUPAC
>>> my_seq = Seq("AGTACACTGGT", IUPAC.unambiguous_dna)
>>> my_seq
Seq('AGTACACTGGT', IUPACUnambiguousDNA())
>>> my_seq.alphabet

comment:5 follow-up: ↓ 6 Changed 2 years ago by drkirkby

  • Reviewers set to Martin Albrecht, David Kirkby

It's never a good idea to test on an empty string, though I know you can get away with it in at least recent versions of bash.

if [ "x$SAGE_LOCAL" = x ]; then

is preferable to

if [ "$SAGE_LOCAL" = "" ]; then

Also, the line

   echo "SAGE_LOCAL undefined ... exiting";

in spkg-install does not need that semi-colon on the end. It seems someone wrote this some time with a semi-colon, then it's been cut/pasted around. The same comments apply to spkg-check

IMHO it would be better to check if this builds, before trying to install. i.e. add

if [ $? -ne 0 ]; then
   echo "Error building biopython"
   exit 1
fi

in the right place.

Also, in SPKG.txt, there is no list of Dependencies or any Special Update/Build Instructions Yet the Sage developers guide says these should both exist, with the Special Update/Build Instructions having a list of what the patches do. For Dependencies I would just wrote "none".

== Dependencies ==

List the dependencies here

== Special Update/Build Instructions ==

List patches that need to be applied and what they do

I don't have a clue how to use this, but I installed it ok on OpenSolaris and run the same code as Martin Albrecht and got some sensible looking results.

comment:6 in reply to: ↑ 5 ; follow-up: ↓ 7 Changed 2 years ago by jdemeyer

Replying to drkirkby:

It's never a good idea to test on an empty string, though I know you can get away with it in at least recent versions of bash.

if [ "x$SAGE_LOCAL" = x ]; then

is preferable to

if [ "$SAGE_LOCAL" = "" ]; then

Really? I have yet to see a shell where the latter won't work properly...

comment:7 in reply to: ↑ 6 Changed 2 years ago by drkirkby

Replying to jdemeyer:

Replying to drkirkby:

It's never a good idea to test on an empty string, though I know you can get away with it in at least recent versions of bash.

if [ "x$SAGE_LOCAL" = x ]; then

is preferable to

if [ "$SAGE_LOCAL" = "" ]; then

Really? I have yet to see a shell where the latter won't work properly...

The original Bourne shell, and many of its derivatives will fail under some circumstances with the syntax. They are "corner cases", and will not be met much in practice, but if one gets into the habit of doing it properly, then one will never get caught out. You might notice the configure script generated by autoconf never tests on "".

Solaris 10 /bin/sh breaks with [ "$var" != "" ] for some (very corner-case) values of $var:

  $ /bin/sh -c 'var="("; [ "$var" != "" ]'; echo st = $?
  /bin/sh: test: argument expected
  st = 1
  $ /bin/sh -c 'var="!"; [ "$var" != "" ]'; echo st? = $?
  /bin/sh: test: argument expected
  st = 1

With [ "$var" = "" ], it doesn't really break, but misbehaves by printing spurious diagnostic:

  $ /bin/sh -c 'var="!"; [ "$var" = "" ]'; echo st = $?
  /bin/sh: test: argument expected
  st = 1
  $ bin/sh -c 'var="("; [ "$var" != "" ]'; echo st = $?
  /bin/sh: test: argument expected
  st = 1

The exit status is correct in this cases, though.

I personally try to write my scripts so they don't fail for corner cases. It also saves you one character, as there is no need to quote the "x". So you add an "x" but remove "". So one byte is saved!

Dave

comment:8 Changed 2 years ago by awebb

Hi,

I noticed that 1.57 has been released so I threw together a new package. I kept in mind a few of the comments here. I didn't switch around the order of the change log. This can be changed if this is thought to be important.

I have one test failure in the internal test suite. However, I am running Ubuntu 11.04 beta 2 (AMD64) and this might be a system specific problem. I am also running a Sage built using 10.10 because of a building problem with 11.04. This is being discussed on the sage-devel list.

 http://news.open-bio.org/news/2011/04/biopython-1-57-released/

New package at  http://sage.math.washington.edu/home/awebb/biopython-1.57.spkg.

Cheers,

Adam

comment:9 Changed 2 years ago by mhampton

  • Status changed from needs_work to needs_review
  • Summary changed from upgrade optional biopython package to 1.56 to upgrade optional biopython package to 1.57
  • Description modified (diff)
  • Authors changed from Marshall Hampton to Marshall Hampton, Adam Webb

comment:10 Changed 2 years ago by mhampton

Fantastic, I will review this very soon. There are some really nice improvements in 1.57.

comment:11 follow-up: ↓ 12 Changed 2 years ago by mhampton

  • Cc mvngu added
  • Reviewers changed from Martin Albrecht, David Kirkby to Martin Albrecht, David Kirkby, Marshall Hampton
  • Status changed from needs_review to positive_review
  • Authors changed from Marshall Hampton, Adam Webb to Adam Webb

I've been using this for the last four or five days on a variety of computers. (The new sqlite indexed databases are great, this is a significant and important improvement in functionality.) No problems in use or installation.

Whoever updates the spkg should also remove the previous biopython-1.55.p0.spkg; there is no reason to keep older ones around.

comment:12 in reply to: ↑ 11 Changed 2 years ago by mvngu

Replying to mhampton:

Whoever updates the spkg should also remove the previous biopython-1.55.p0.spkg; there is no reason to keep older ones around.

New package biopython-1.57.spkg updated at http://www.sagemath.org/packages/optional/ .

comment:13 Changed 2 years ago by jdemeyer

  • Status changed from positive_review to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.