[bip] Bioinformatics software design
Kevin Teague
kteague at bcgsc.ca
Tue Feb 19 09:49:07 PST 2008
>
> 1. What would you consider to be a good "API"?
> well-documented, intuitive, best guess works, pythonic,
> do people have any examples of what they consider a good API/project?
If you are going with a Python API, then the zope.interface and
zope.schema packages provides a good way of formally describing a
Python API:
- http://pypi.python.org/pypi/zope.interface
- http://pypi.python.org/pypi/zope.schema
If you have a formally described data schema for your applications
input/ouptut objects used by your API (e.g. input = "Integer named
'foo' whose value is > 0 and < 10", output = "Float name 'result'"),
then it's not too hard to automatically map those to a web service
API or set of HTML views. It's also a convention with these packages
that those interfaces that are stable are put into a file named
'interfaces.py', e.g. the new plone4bio interfaces:
http://www.plone4bio.org/trac/browser/plone4bio.base/trunk/plone4bio/
base/interfaces.py
Also, if doing the Python API route and using more than just plain
Python, it's invaluable to have a build tool that can be used to
compile and configure all of the moving parts of your application.
You can use this to make it much easier for end users to install the
software on whatever platform they happen to be running, as well as
to bring new developers on your team quickly up to speed. As a
sysadmin it sucks to have a bioinformatician ask for some software to
be made available on our servers and realize that the project only
has an error-filled 12 page INSTALL.txt file (even if the INSTALL.txt
continually re-assures the frustrated sysadmin that "CPAN is great")!
For example, the PrimaGIS guys depend upon *a lot* of stuff, so they
maintain a "buildout" project that will compile and configure all of
the parts required to run their system:
http://trac.gispython.org/projects/PrimaGIS/wiki/PrimaGISBuildout
I've used both BuildIt and zc.buildout, both are good products - the
PrimaGIS project is a good example of complex buildout using BuildIt.
zc.buildout is a fairly new project, but it's being used by the Zope/
Plone folks so there are already a lot of "recipes" that can be used
to install assorted parts that your app might depend upon:
- http://agendaless.com/Members/chrism/software/buildit/
- http://pypi.python.org/pypi/zc.buildout
- zc.buildout recipes: http://pypi.python.org/
pypi?:action=browse&c=512
- zc.buildout "configure; make; make install" recipe: http://
pypi.python.org/pypi/zc.recipe.cmmi/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.idyll.org/pipermail/biology-in-python/attachments/20080219/160774fe/attachment.htm
More information about the biology-in-python
mailing list