[med-svn] [python-csb] 02/05: New upstream version 1.2.5+dfsg

Andreas Tille tille at debian.org
Mon Nov 13 07:38:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository python-csb.

commit f082535f2854f4a5b36229a0fd98e5db7a02d014
Author: Andreas Tille <tille at debian.org>
Date:   Mon Nov 13 08:22:52 2017 +0100

    New upstream version 1.2.5+dfsg
---
 .gitignore                                | 102 +++++
 .travis.yml                               |  20 +
 INSTALL.rst                               |   3 +
 INSTALL.txt                               | 123 -----
 LICENSE.rst                               |   8 +
 MANIFEST.in                               |   7 +
 PKG-INFO                                  | 182 --------
 README.rst                                | 117 +++++
 README.txt                                | 155 -------
 csb/__init__.py                           | 541 +++++++++++-----------
 csb/bio/io/dssp.py                        |   1 +
 csb/bio/io/wwpdb.py                       |   8 +-
 csb/build.py                              |  63 ++-
 csb/statistics/__init__.py                |   2 +-
 csb/statistics/samplers/mc/multichain.py  |  18 +-
 csb/statistics/samplers/mc/singlechain.py |   2 +-
 csb/test/__init__.py                      |  12 +-
 csb/test/app.py                           |   8 +-
 csb/test/cases/bio/hmm/__init__.py        |   6 +-
 csb/test/cases/bio/io/mrc/__init__.py     |   2 +-
 csb/test/cases/bio/nmr/__init__.py        |   8 +-
 epydoc.css                                | 727 ++++++++++++++++++++++++++++++
 requirements.txt                          |   3 +
 setup.py                                  | 212 +++------
 24 files changed, 1415 insertions(+), 915 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a62cf12
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,102 @@
+# PyCharm
+.idea/
+
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+#  Usually these files are written by a python script from a template
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..4a7f722
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,20 @@
+language: python
+dist: trusty
+python:
+- '2.7'
+- '3.6'
+install:
+- pip install --upgrade pip
+- pip install --editable .[dev]
+script:
+- python csb/build.py -o .
+deploy:
+  provider: releases
+  skip_cleanup: true
+  api_key:
+    secure: QE+OlJEfZm/u2SnFU40uRwRFrQrbevCRn1PyFGvKUze5JmUVBCJpWG5QJRIvCvkW5A34YF9kK802lWAHOnSk5luTh8N84gGEI+/vgX/cEE5DyNf3lCkoXJXCrcVIUcVCWnZ3S17gyWQsdFmUniAyrHGkOsU/HbkwwolCIAahmEKlP3vR2HGzHtnW2Q3XAoDNY/6BhxFlKdcmrstiWyzrh8mVFyF94/hBdGD0FEsUPye4vTN5z1iaLCtjiO2jzBsB3g3wvvPeRu/R/dxMVyBX3CG7hwKIVNH8vL/O8RE0wHHG0M3f77qw7I4GTg9xd6ODI3sjPgeEP3l4l2CK88XEAXamNo8xxfvUOGCTqxxUID3dU1ueut28vC/3iRCOqTJSzClFPfFAkDhZ1ReaTSxRuGpM86dQkQ9AVMWFc8lTzI1DdZlrCyStFySwYRGdZmPeq8o6tJDHel7OWObVh2UXBhQHjORgDskp [...]
+  file_glob: true
+  file: "csb-*.*"
+  on:
+    tags: true
+    python: "2.7"
diff --git a/INSTALL.rst b/INSTALL.rst
new file mode 100644
index 0000000..95970c5
--- /dev/null
+++ b/INSTALL.rst
@@ -0,0 +1,3 @@
+Detailed installation instructions can be found here:
+
+http://csb-toolbox.github.io/Installation
\ No newline at end of file
diff --git a/INSTALL.txt b/INSTALL.txt
deleted file mode 100644
index c10279b..0000000
--- a/INSTALL.txt
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-System Requirements
--------------------
-
-CSB is distributed as a pure python package, which renders it cross-platform.
-Installation is therefore a very trivial task. The source code is also kept
-compatible across python versions, so we guarantee that every official release
-package will work on both python 2 and 3 without any change. We test all nightly
-builds against python versions 2.7 and 3.2, but technically CSB supports python 2.6
-and all subsequent versions except probably 3.0.
-
-
-Quick Installation
-------------------
-
-If your system is equipped with easy_install / pip, download the requirements.txt
-file for python 2.6 or newer versions from here:
-
-    http://csb.codeplex.com/wiki/PageInfo?title=Installation
-    
-and then run::
-
-    $ pip install csb -r requirements.txt
-
-We still recommend the standard method, which is also fairly simple.
-
-
-Standard Installation
----------------------
-
-Dependencies
-
-CSB depends on 2 very well-known and readily available python packages:
-
-    * numpy -- required (numpy.scipy.org)
-    * scipy -- required (scipy.org)
-    * matplotlib and wxPython -- optional, needed only if you want to use csb.io.plots
-
-On python 2.6 you will need these two as well:
-
-    * unittest2
-    * argparse
-
-both of which are standard, simple and available for download from PyPi (pypi.python.org).
-
-To check whether any of the above packages are already installed on your system, try::
-
-    $ python
-    >>> import numpy
-    >>> import scipy
-    >>> import matplotlib
-    >>> from unittest import skip, skipIf
-    >>> import argparse
-
-ImportError means the package is not installed.
-
-Install dependencies on Windows:
-
-    1. download numpy (numpy.scipy.org), scipy (scipy.org) and optionally
-       matplotlib (matplotlib.sourceforge.net)
-    2. run the downloaded exe/msi packages and follow the steps
-    3. on python 2.6 also download unittest2 (pypi.python.org/pypi/unittest2) and
-       argparse (pypi.python.org/pypi/argparse)
-    4. unpack each of those and run::
-
-		> python2.6 setup.py install  
-
-Install dependencies on unix-like systems:
-
-    1. use your package manager to install numpy, scipy and optionally matplotlib;
-       for example on Debian/Ubuntu::
-
-        $ sudo apt-get install python-numpy
-        $ sudo apt-get install python-scipy
-        $ sudo apt-get install python-matplotlib
-
-    2. on python 2.6 also download unittest2 (pypi.python.org/pypi/unittest2) and
-       argparse (pypi.python.org/pypi/argparse)
-    3. unpack each of those and run::
-
-        $ sudo python2.6 setup.py install  
-
-
-Install CSB
-
-We are now ready to install CSB itself:
-
-    1. download and unpack the latest release from pypi.python.org/pypi/csb 
-    2. run with administrator privileges::
-
-        $ python setup.py install    
-
-CSB is now installed at your site-packages.   
-
-
-Testing
--------
-
-Running the CSB test suite may be useful in order to check if your installation works.
-All CSB tests are executed with the csb.test.Console. A typical way to run the console is::
-
-    $ python csb/test/app.py "csb.test.cases.*"
-
-or just::
-
-    $ python csb/test/app.py         
-
-For help try::
-
-    $ python csb/test/app.py -h
-        
-For more details on our test framework, including guidelines for writing
-unit test, please refer to the API documentation, package csb.test.
-
-
-API Documentation
------------------
-
-CSB comes with API docs in HTML format. Simply navigate to the docs/api folder in the
-release package and open index.html with any web browser. Note that the docs are not
-installed, so you need to keep your own copy.
-
diff --git a/LICENSE.rst b/LICENSE.rst
new file mode 100644
index 0000000..97dccea
--- /dev/null
+++ b/LICENSE.rst
@@ -0,0 +1,8 @@
+MIT
+Copyright (c) 2012 Michael Habeck
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..1519d65
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,7 @@
+recursive-include csb/bio/nmr/resources *.*
+recursive-include csb/test/data *.*
+recursive-include docs *.*
+include README.rst INSTALL.rst LICENSE.rst
+include requirements.txt
+
+recursive-exclude csb/test/data *.pickle
\ No newline at end of file
diff --git a/PKG-INFO b/PKG-INFO
deleted file mode 100644
index 074a763..0000000
--- a/PKG-INFO
+++ /dev/null
@@ -1,182 +0,0 @@
-Metadata-Version: 1.1
-Name: csb
-Version: 1.2.3
-Summary: Computational Structural Biology Toolbox
-Home-page: http://csb.codeplex.com
-Author: Michael Habeck et al.
-Author-email: ivan.kalev at gmail.com
-License: MIT
-Description: Computational Structural Biology Toolbox
-        ========================================
-        
-        CSB is a python library and application framework, which can be used
-        to solve problems in the field of structural bioinformatics. If
-        you are a bioinformatician, software engineer or a researcher working
-        in this field, chances are you may find something useful here. Our
-        package consists of a few major components:
-        
-            1. Core class library -- object-oriented, granular, with an emphasis
-               on design and clean interfaces. 
-               
-            2. Application framework -- console applications ("protocols"),
-               which consume objects from the core library in order to build
-               something executable (and hopefully useful).
-               
-            3. Test framework -- ensures that the library *actually* works.
-        
-        
-        Compatibility
-        -------------
-        
-        In short: CSB requires python 2.6 or higher.
-        
-        CSB is being developed on Linux, under python 2.7. However, compatibility
-        is a design goal and the package works on any platform, on any modern python
-        interpreter since version 2.6 (that includes python 3 support out of
-        the box). If you found any issues on a platform/interpreter different from
-        our development environment, please let us know.
-        
-        
-        Installation 
-        ------------
-        
-        Full installation instructions can be found in the INSTALL file packaged with
-        this release, as well as on the project's web site:
-        
-            http://csb.codeplex.com/documentation
-        
-        Here we provide only a brief summary of the installation procedure.
-        First, make sure all required dependencies are installed:
-            
-            1. numpy, scipy -- required
-            2. matplotlib and wxPython -- optional, needed only if you want to use csb.io.plots
-            3. unittest2, argparse -- needed only if you are running python 2.6
-            
-        Next, install CSB::     
-        
-            $ python setup.py install
-            
-        CSB has just been installed at the following location::
-        
-            $ python -c "import csb, os; print(os.path.abspath(os.path.join(csb.__path__[0], '..')))"
-        
-        Let us call this path *$LIB*.
-                    
-        
-        Testing
-        -------
-        
-        Running the CSB test suite may be useful if you made any modifications to
-        the source code, or if you simply want to check if your installation works.
-        
-        All CSB tests are executed with the csb.test.Console. A typical way to run 
-        the console is::
-        
-            $ python $LIB/csb/test/app.py "csb.test.cases.*"
-            
-        or just::
-        
-            $ python $LIB/csb/test/app.py         
-        
-        For help try::
-        
-            $ python $LIB/csb/test/app.py -h    
-        
-        For more details on our test framework, including guidelines for writing
-        unit tests, please refer to the API documentation, package "csb.test".
-        
-        
-        Running CSB Applications
-        ------------------------
-        
-        CSB is bundled with a number of executable console csb.apps. Each app
-        provides a standard command line interface. To run any app, try::
-        
-            $ python $LIB/csb/apps/appname.py --help
-            
-        where *appname* is the name of the application. For more details on
-        our app framework, including guidelines for writing new applications,
-        please refer to the API documentation, package "csb.apps".
-        
-        
-        Documentation
-        -------------
-        
-        The project's web site at `CodePlex <http://csb.codeplex.com>`_ contains
-        online documentation and samples. Be sure to check
-            
-            http://csb.codeplex.com/documentation
-        
-        Detailed API documentation can be found in the "docs/api" directory in the
-        distribution package (docs/api/index.html). Many packages contain
-        introductory module level documentation and samples/tutorials. These are also
-        available in the HTML docs, but a quick way to access them is by using
-        the built-in python help system. For example, for a general introduction
-        see the module documentation of the root package::
-        
-            $ python -c "import csb; help(csb)"
-        
-        If you are interested in a specific package, such as cs.bio.sequence,
-        try::    
-            
-            $ python -c "import csb.bio.sequence; help(csb.bio.sequence)"
-        
-        
-        Contact
-        -------
-        
-        CSB is developed by Michael Habeck's Computational Structural Biology
-        `research group <http://www.eb.tuebingen.mpg.de/research/research-groups/michael-habeck.html>`_.
-            
-        For complete source code, contribution, support or bug reports please visit
-        our web site at CodePlex:
-          
-            `csb.codeplex.com <http://csb.codeplex.com>`_
-            
-        
-        License
-        -------
-        
-        CSB is open source and distributed under OSI-approved MIT license.
-        ::
-        
-            Copyright (c) 2012 Michael Habeck
-            
-            Permission is hereby granted, free of charge, to any person obtaining
-            a copy of this software and associated documentation files (the
-            "Software"), to deal in the Software without restriction, including
-            without limitation the rights to use, copy, modify, merge, publish,
-            distribute, sublicense, and/or sell copies of the Software, and to
-            permit persons to whom the Software is furnished to do so, subject to
-            the following conditions:
-            
-            The above copyright notice and this permission notice shall be
-            included in all copies or substantial portions of the Software.
-            
-            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-            EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-            MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-            IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-            CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-            TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-            SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-        
-        
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: Intended Audience :: Science/Research
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.1
-Classifier: Programming Language :: Python :: 3.2
-Classifier: Topic :: Scientific/Engineering
-Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
-Classifier: Topic :: Scientific/Engineering :: Mathematics
-Classifier: Topic :: Scientific/Engineering :: Physics
-Classifier: Topic :: Software Development :: Libraries
-Requires: numpy
-Requires: scipy
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..d0e5927
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,117 @@
+Computational Structural Biology Toolbox
+========================================
+
+CSB is a python library and application framework, which can be used
+to solve problems in the field of structural bioinformatics. If
+you are a bioinformatician, software engineer or a researcher working
+in this field, chances are you may find something useful here. Our
+package consists of a few major components:
+
+1. Core class library - object-oriented, granular, with an emphasis
+   on design and clean interfaces.
+
+2. Application framework - console applications ("protocols"),
+   which consume objects from the core library in order to build
+   something executable (and hopefully useful).
+
+3. Test framework - ensures that the library *actually* works.
+
+
+Installation 
+------------
+CSB is being developed on Linux with Python 2.7 and 3.6. However, compatibility
+is a design goal and the package works on any platform, on any modern Python
+interpreter since version 2.6 (that includes python 3 support out of
+the box). If you find any issues on a platform/interpreter different from
+our development environment, please let us know.
+
+CSB and all of its dependencies can be installed with pip::
+
+    $ pip install csb
+
+See http://csb-toolbox.github.io/Installation for more details.
+
+
+Running CSB Applications
+------------------------
+
+CSB is bundled with a number of executable console csb.apps. Each app
+provides a standard command line interface. To run any app, try::
+
+    $ csb-app --help
+    
+where *csb-app* is the name of the application, such as ``csb-hhfrag``.
+For more details on our app framework, including guidelines for writing new
+applications, please refer to the API documentation, package "csb.apps".
+
+
+Documentation
+-------------
+
+The project's web site at `GitHub <http://github.com/csb-toolbox>`_ contains
+online documentation and samples. Visit us at:
+    
+http://csb-toolbox.github.io
+
+Detailed API documentation can be found in the "docs/api" directory in the
+distribution package (docs/api/index.html). This documentaiton is also hosted
+on our web site:
+
+https://csb-toolbox.github.io/api-docs/
+
+Many packages contain introductory module level documentation and samples/tutorials.
+These are also available in the HTML docs, but a quick way to access them is by using
+the built-in python help system. For example, for a general introduction
+see the module documentation of the root package::
+
+    $ python -c "import csb; help(csb)"
+
+If you are interested in a specific package, such as cs.bio.sequence,
+try::    
+    
+    $ python -c "import csb.bio.sequence; help(csb.bio.sequence)"
+
+
+Contact
+-------
+
+CSB is developed by Michael Habeck's Computational Structural Biology
+`research group <http://www.stochastik.math.uni-goettingen.de/index.php?id=172>`_.
+    
+For complete source code, contributions, support or bug reports please visit
+us on GitHub:
+  
+http://github.com/csb-toolbox/
+    
+
+License
+-------
+
+CSB is open source and distributed under OSI-approved MIT license.
+::
+
+    Copyright (c) 2012 Michael Habeck
+    
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, sublicense, and/or sell copies of the Software, and to
+    permit persons to whom the Software is furnished to do so, subject to
+    the following conditions:
+    
+    The above copyright notice and this permission notice shall be
+    included in all copies or substantial portions of the Software.
+    
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+    
+
+
+.. image:: https://travis-ci.org/csb-toolbox/CSB.svg?branch=master
+   :target: https://travis-ci.org/csb-toolbox
diff --git a/README.txt b/README.txt
deleted file mode 100644
index 734ed00..0000000
--- a/README.txt
+++ /dev/null
@@ -1,155 +0,0 @@
-Computational Structural Biology Toolbox
-========================================
-
-CSB is a python library and application framework, which can be used
-to solve problems in the field of structural bioinformatics. If
-you are a bioinformatician, software engineer or a researcher working
-in this field, chances are you may find something useful here. Our
-package consists of a few major components:
-
-    1. Core class library -- object-oriented, granular, with an emphasis
-       on design and clean interfaces. 
-       
-    2. Application framework -- console applications ("protocols"),
-       which consume objects from the core library in order to build
-       something executable (and hopefully useful).
-       
-    3. Test framework -- ensures that the library *actually* works.
-
-
-Compatibility
--------------
-
-In short: CSB requires python 2.6 or higher.
-
-CSB is being developed on Linux, under python 2.7. However, compatibility
-is a design goal and the package works on any platform, on any modern python
-interpreter since version 2.6 (that includes python 3 support out of
-the box). If you found any issues on a platform/interpreter different from
-our development environment, please let us know.
-
-
-Installation 
-------------
-
-Full installation instructions can be found in the INSTALL file packaged with
-this release, as well as on the project's web site:
-
-    http://csb.codeplex.com/documentation
-
-Here we provide only a brief summary of the installation procedure.
-First, make sure all required dependencies are installed:
-    
-    1. numpy, scipy -- required
-    2. matplotlib and wxPython -- optional, needed only if you want to use csb.io.plots
-    3. unittest2, argparse -- needed only if you are running python 2.6
-    
-Next, install CSB::     
-
-    $ python setup.py install
-    
-CSB has just been installed at the following location::
-
-    $ python -c "import csb, os; print(os.path.abspath(os.path.join(csb.__path__[0], '..')))"
-
-Let us call this path *$LIB*.
-            
-
-Testing
--------
-
-Running the CSB test suite may be useful if you made any modifications to
-the source code, or if you simply want to check if your installation works.
-
-All CSB tests are executed with the csb.test.Console. A typical way to run 
-the console is::
-
-    $ python $LIB/csb/test/app.py "csb.test.cases.*"
-    
-or just::
-
-    $ python $LIB/csb/test/app.py         
-
-For help try::
-
-    $ python $LIB/csb/test/app.py -h    
-
-For more details on our test framework, including guidelines for writing
-unit tests, please refer to the API documentation, package "csb.test".
-
-
-Running CSB Applications
-------------------------
-
-CSB is bundled with a number of executable console csb.apps. Each app
-provides a standard command line interface. To run any app, try::
-
-    $ python $LIB/csb/apps/appname.py --help
-    
-where *appname* is the name of the application. For more details on
-our app framework, including guidelines for writing new applications,
-please refer to the API documentation, package "csb.apps".
-
-
-Documentation
--------------
-
-The project's web site at `CodePlex <http://csb.codeplex.com>`_ contains
-online documentation and samples. Be sure to check
-    
-    http://csb.codeplex.com/documentation
-
-Detailed API documentation can be found in the "docs/api" directory in the
-distribution package (docs/api/index.html). Many packages contain
-introductory module level documentation and samples/tutorials. These are also
-available in the HTML docs, but a quick way to access them is by using
-the built-in python help system. For example, for a general introduction
-see the module documentation of the root package::
-
-    $ python -c "import csb; help(csb)"
-
-If you are interested in a specific package, such as cs.bio.sequence,
-try::    
-    
-    $ python -c "import csb.bio.sequence; help(csb.bio.sequence)"
-
-
-Contact
--------
-
-CSB is developed by Michael Habeck's Computational Structural Biology
-`research group <http://www.eb.tuebingen.mpg.de/research/research-groups/michael-habeck.html>`_.
-    
-For complete source code, contribution, support or bug reports please visit
-our web site at CodePlex:
-  
-    `csb.codeplex.com <http://csb.codeplex.com>`_
-    
-
-License
--------
-
-CSB is open source and distributed under OSI-approved MIT license.
-::
-
-    Copyright (c) 2012 Michael Habeck
-    
-    Permission is hereby granted, free of charge, to any person obtaining
-    a copy of this software and associated documentation files (the
-    "Software"), to deal in the Software without restriction, including
-    without limitation the rights to use, copy, modify, merge, publish,
-    distribute, sublicense, and/or sell copies of the Software, and to
-    permit persons to whom the Software is furnished to do so, subject to
-    the following conditions:
-    
-    The above copyright notice and this permission notice shall be
-    included in all copies or substantial portions of the Software.
-    
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
diff --git a/csb/__init__.py b/csb/__init__.py
index e29e1aa..da326d3 100644
--- a/csb/__init__.py
+++ b/csb/__init__.py
@@ -1,271 +1,270 @@
-"""
-CSB is a high-level, object-oriented library used to solve problems in the
-field of Computational Structural Biology.
-
-
-Introduction
-============
-
-The library is composed of a set of highly branched python packages
-(namespaces). Some of the packages are meant to be directly used by
-the clients (core library), while others are utility modules and take
-part in the development of the library: 
-
-    1. Core class library -- object-oriented, granular, with an emphasis
-       on design and clean interfaces. A Sequence is not a string, and a
-       Structure is not a dict or list. Naming conventions matter.
-       
-    2. Application framework -- executable console applications
-       ("protocols"), which consume objects from the core library.
-       The framework ensures that each CSB application is also reusable
-       and can be instantiated as a regular python object without any
-       ugly side effects (sys.exit() and friends). See L{csb.apps} for more
-       details. 
-       
-    3. Test framework -- built on top of the standard unittest as a thin
-       wrapping layer. Provides some sugar like transparent management of
-       test data files, and modular test execution. L{csb.test} will give
-       you all the details. 
-
-The core library is roughly composed of:
-
-    - bioinformatics API: L{csb.bio}, which includes stuff like
-      L{csb.bio.io}, L{csb.bio.structure}, L{csb.bio.sequence},
-      L{csb.bio.hmm}
-    
-    - statistics API: L{csb.statistics}, L{csb.numeric}
-    
-    - utilities - L{csb.io}, L{csb.core}
-
-
-Getting started
-===============
-    
-Perhaps one of the most frequently used parts of the library is the
-L{csb.bio.structure} module, which provides the L{Structure}, L{Chain},
-L{Residue} and L{Atom} objects. You could easily build a L{Structure}
-from scratch, but a far more common scenario is parsing a structure from
-a PDB file using one of the L{AbstractStructureParser}s. All bio IO
-objects, including the StructureParser factory, are defined in
-L{csb.bio.io} and sub-packages:
-
-    >>> from csb.bio.io.wwpdb import StructureParser
-    >>> p = StructureParser("/some/file/pdb1x80.ent")
-    >>> s = p.parse_structure()
-    >>> print(s)
-    <Structure: 1x80, 2 chains>
-    
-The last statement will return a L{csb.bio.structure.Structure} instance,
-which is a composite hierarchical object:
-
-    >>> for chain_id in s.chains:
-            chain = s.chains[chain_id]
-            for residue in chain.residues:
-                for atom_id in residue.atoms:
-                    atom = residue.atoms[atom_id]
-                    print(atom.vector)
-
-Some of the inner objects in this hierarchy behave just like dictionaries
-(but are not):
-
-    >>> s.chains['A']        # access chain A by ID
-    <Chain A: Protein>
-    >>> s['A']               # the same
-    <Chain A: Protein>
-    
-Others behave like collections:
-
-    >>> chain.residues[10]               # 1-based access to the residues in the chain
-    <ProteinResidue [10]: PRO 10>
-    >>> chain[10]                        # 0-based, list-like access
-    <ProteinResidue [11]: GLY 11>
-    
-But all entities are iterable because they inherit the C{items} iterator
-from L{AbstractEntity}. The above loop can be shortened:
-
-    >>> for chain in s.items:
-            for residue in chain.items:
-                for atom in residue.items:
-                    print(atom.vector)
-                    
-or even more:
-
-    >>> from csb.bio.structure import Atom
-    >>> for atom in s.components(klass=Atom):
-            print(atom.vector)
-
-You may also be interested in extracting a sub-chain from this structure:
-
-    >>> s.chains['B'].subregion(3, 20)    # from positions 3 to 20, inclusive
-    <Chain B: Protein>
-    
-or modifying it in some way, for example, in order to append a new residue,
-try:
-
-    >>> from csb.bio.structure import ProteinResidue
-    >>> from csb.bio.sequence import ProteinAlphabet
-    >>> residue = ProteinResidue(401, ProteinAlphabet.ALA)
-    >>> s.chains['A'].residues.append(residue)
-    
-Finally, you would probably want to save your structure back to a PDB file:
-
-    >>> s.to_pdb('/some/file/name.pdb')    
-
-
-Where to go from here
-=====================
-
-If you want to dive into statistics, you could peek inside L{csb.statistics}
-and its sub-packages. For example, L{csb.statistics.pdf} contains a collection
-of L{probability density objects<csb.statistics.pdf.AbstractDensity>},
-like L{Gaussian<csb.statistics.pdf.Normal>} or L{Gamma<csb.statistics.pdf.Gamma>}.
-
-But chances are you would first like to try reading some files, so you could
-start exploring L{csb.bio.io} right now. As we have already seen,
-L{csb.bio.io.wwpdb} provides PDB L{Structure<csb.bio.structure.Structure>}
-parsers, for example L{csb.bio.io.wwpdb.RegularStructureParser} and
-L{csb.bio.io.wwpdb.LegacyStructureParser}.
-
-L{csb.bio.io.fasta} is all about reading FASTA
-L{Sequence<csb.bio.sequence.AbstractSequence>}s and
-L{SequenceAlignment<csb.bio.sequence.AbstractAlignment>}s. Be sure to check out 
-L{csb.bio.io.fasta.SequenceParser}, L{csb.bio.io.fasta.SequenceAlignmentReader}
-and L{csb.bio.io.fasta.StructureAlignmentFactory}.
-
-If you are working with HHpred (L{ProfileHMM<csb.bio.hmm.ProfileHMM>}s,
-L{HHpredHit<csb.bio.hmm.HHpredHit>}s), then L{csb.bio.io.hhpred} is for you.
-This package provides L{csb.bio.io.hhpred.HHProfileParser} and
-L{csb.bio.io.hhpred.HHOutputParser}, which are used to read *.hhm and *.hhr
-files.
-
-Finally, if you want to make some nice plots with matplotlib, you may like the
-clean object-oriented interface of our L{Chart<csb.io.plots.Chart>}. See
-L{csb.io.plots} and maybe also L{csb.io.tsv} to get started.
-
-
-Development
-===========
-
-When contributing code to CSB, please take into account the following:
-
-    1. New features or bug fixes should always be accompanied by test cases.
-       Also, always run the complete test suite before committing. For more
-       details on this topic, see L{csb.test}.
-       
-    2. The source code of CSB must be cross-platform and cross-interpreter
-       compatible. L{csb.core} and L{csb.io} will give you all necessary
-       details on how to use the CSB compatibility layer.
-
-
-License
-=======
-
-CSB is open source and distributed under OSI-approved MIT license::
-
-    Copyright (c) 2012 Michael Habeck
-    
-    Permission is hereby granted, free of charge, to any person obtaining
-    a copy of this software and associated documentation files (the
-    "Software"), to deal in the Software without restriction, including
-    without limitation the rights to use, copy, modify, merge, publish,
-    distribute, sublicense, and/or sell copies of the Software, and to
-    permit persons to whom the Software is furnished to do so, subject to
-    the following conditions:
-    
-    The above copyright notice and this permission notice shall be
-    included in all copies or substantial portions of the Software.
-    
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-    
-"""
-
-__version__ = '1.2.3.617'
-
-
-class Version(object):
-    """
-    CSB version number.
-    """
-    
-    def __init__(self):
-        
-        version = __version__.split('.')
-        
-        if not len(version) in (3, 4):
-            raise ValueError(version)
-        
-        self._package = __name__ 
-        
-        self._major = version[0]
-        self._minor = version[1]
-        self._micro = version[2]
-        self._revision = None
-        
-        if len(version) == 4:
-            self._revision = version[3]
-
-    def __str__(self):
-        return self.short
-    
-    def __repr__(self):
-        return '{0.package} {0.full}'.format(self)
-    
-    @property
-    def major(self):
-        """
-        Major version (huge, incompatible changes)
-        @rtype: int
-        """
-        return int(self._major)  
-     
-    @property
-    def minor(self):
-        """
-        Minor version (significant, but compatible changes)
-        @rtype: int
-        """        
-        return int(self._minor)
-    
-    @property
-    def micro(self):
-        """
-        Micro version (bug fixes and small enhancements)
-        @rtype: int
-        """        
-        return int(self._micro)  
-    
-    @property
-    def revision(self):
-        """
-        Build number (exact repository revision number)
-        @rtype: int
-        """          
-        try:
-            return int(self._revision)
-        except:
-            return self._revision
-    
-    @property
-    def short(self):
-        """
-        Canonical three-part version number.
-        """
-        return '{0.major}.{0.minor}.{0.micro}'.format(self)
-    
-    @property
-    def full(self):
-        """
-        Full version, including the repository revision number.
-        """        
-        return '{0.major}.{0.minor}.{0.micro}.{0.revision}'.format(self)
-    
-    @property
-    def package(self):
-        return self._package
-
+"""
+CSB is a high-level, object-oriented library used to solve problems in the
+field of Computational Structural Biology.
+
+
+Introduction
+============
+
+The library is composed of a set of highly branched python packages
+(namespaces). Some of the packages are meant to be directly used by
+the clients (core library), while others are utility modules and take
+part in the development of the library: 
+
+    1. Core class library -- object-oriented, granular, with an emphasis
+       on design and clean interfaces. A Sequence is not a string, and a
+       Structure is not a dict or list. Naming conventions matter.
+       
+    2. Application framework -- executable console applications
+       ("protocols"), which consume objects from the core library.
+       The framework ensures that each CSB application is also reusable
+       and can be instantiated as a regular python object without any
+       ugly side effects (sys.exit() and friends). See L{csb.apps} for more
+       details. 
+       
+    3. Test framework -- built on top of the standard unittest as a thin
+       wrapping layer. Provides some sugar like transparent management of
+       test data files, and modular test execution. L{csb.test} will give
+       you all the details. 
+
+The core library is roughly composed of:
+
+    - bioinformatics API: L{csb.bio}, which includes stuff like
+      L{csb.bio.io}, L{csb.bio.structure}, L{csb.bio.sequence},
+      L{csb.bio.hmm}
+    
+    - statistics API: L{csb.statistics}, L{csb.numeric}
+    
+    - utilities - L{csb.io}, L{csb.core}
+
+
+Getting started
+===============
+    
+Perhaps one of the most frequently used parts of the library is the
+L{csb.bio.structure} module, which provides the L{Structure}, L{Chain},
+L{Residue} and L{Atom} objects. You could easily build a L{Structure}
+from scratch, but a far more common scenario is parsing a structure from
+a PDB file using one of the L{AbstractStructureParser}s. All bio IO
+objects, including the StructureParser factory, are defined in
+L{csb.bio.io} and sub-packages:
+
+    >>> from csb.bio.io.wwpdb import StructureParser
+    >>> p = StructureParser("/some/file/pdb1x80.ent")
+    >>> s = p.parse_structure()
+    >>> print(s)
+    <Structure: 1x80, 2 chains>
+    
+The last statement will return a L{csb.bio.structure.Structure} instance,
+which is a composite hierarchical object:
+
+    >>> for chain_id in s.chains:
+            chain = s.chains[chain_id]
+            for residue in chain.residues:
+                for atom_id in residue.atoms:
+                    atom = residue.atoms[atom_id]
+                    print(atom.vector)
+
+Some of the inner objects in this hierarchy behave just like dictionaries
+(but are not):
+
+    >>> s.chains['A']        # access chain A by ID
+    <Chain A: Protein>
+    >>> s['A']               # the same
+    <Chain A: Protein>
+    
+Others behave like collections:
+
+    >>> chain.residues[10]               # 1-based access to the residues in the chain
+    <ProteinResidue [10]: PRO 10>
+    >>> chain[10]                        # 0-based, list-like access
+    <ProteinResidue [11]: GLY 11>
+    
+But all entities are iterable because they inherit the C{items} iterator
+from L{AbstractEntity}. The above loop can be shortened:
+
+    >>> for chain in s.items:
+            for residue in chain.items:
+                for atom in residue.items:
+                    print(atom.vector)
+                    
+or even more:
+
+    >>> from csb.bio.structure import Atom
+    >>> for atom in s.components(klass=Atom):
+            print(atom.vector)
+
+You may also be interested in extracting a sub-chain from this structure:
+
+    >>> s.chains['B'].subregion(3, 20)    # from positions 3 to 20, inclusive
+    <Chain B: Protein>
+    
+or modifying it in some way, for example, in order to append a new residue,
+try:
+
+    >>> from csb.bio.structure import ProteinResidue
+    >>> from csb.bio.sequence import ProteinAlphabet
+    >>> residue = ProteinResidue(401, ProteinAlphabet.ALA)
+    >>> s.chains['A'].residues.append(residue)
+    
+Finally, you would probably want to save your structure back to a PDB file:
+
+    >>> s.to_pdb('/some/file/name.pdb')    
+
+
+Where to go from here
+=====================
+
+If you want to dive into statistics, you could peek inside L{csb.statistics}
+and its sub-packages. For example, L{csb.statistics.pdf} contains a collection
+of L{probability density objects<csb.statistics.pdf.AbstractDensity>},
+like L{Gaussian<csb.statistics.pdf.Normal>} or L{Gamma<csb.statistics.pdf.Gamma>}.
+
+But chances are you would first like to try reading some files, so you could
+start exploring L{csb.bio.io} right now. As we have already seen,
+L{csb.bio.io.wwpdb} provides PDB L{Structure<csb.bio.structure.Structure>}
+parsers, for example L{csb.bio.io.wwpdb.RegularStructureParser} and
+L{csb.bio.io.wwpdb.LegacyStructureParser}.
+
+L{csb.bio.io.fasta} is all about reading FASTA
+L{Sequence<csb.bio.sequence.AbstractSequence>}s and
+L{SequenceAlignment<csb.bio.sequence.AbstractAlignment>}s. Be sure to check out 
+L{csb.bio.io.fasta.SequenceParser}, L{csb.bio.io.fasta.SequenceAlignmentReader}
+and L{csb.bio.io.fasta.StructureAlignmentFactory}.
+
+If you are working with HHpred (L{ProfileHMM<csb.bio.hmm.ProfileHMM>}s,
+L{HHpredHit<csb.bio.hmm.HHpredHit>}s), then L{csb.bio.io.hhpred} is for you.
+This package provides L{csb.bio.io.hhpred.HHProfileParser} and
+L{csb.bio.io.hhpred.HHOutputParser}, which are used to read *.hhm and *.hhr
+files.
+
+Finally, if you want to make some nice plots with matplotlib, you may like the
+clean object-oriented interface of our L{Chart<csb.io.plots.Chart>}. See
+L{csb.io.plots} and maybe also L{csb.io.tsv} to get started.
+
+
+Development
+===========
+
+When contributing code to CSB, please take into account the following:
+
+    1. New features or bug fixes should always be accompanied by test cases.
+       Also, always run the complete test suite before committing. For more
+       details on this topic, see L{csb.test}.
+       
+    2. The source code of CSB must be cross-platform and cross-interpreter
+       compatible. L{csb.core} and L{csb.io} will give you all necessary
+       details on how to use the CSB compatibility layer.
+
+
+License
+=======
+
+CSB is open source and distributed under OSI-approved MIT license::
+
+    Copyright (c) 2012 Michael Habeck
+    
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, sublicense, and/or sell copies of the Software, and to
+    permit persons to whom the Software is furnished to do so, subject to
+    the following conditions:
+    
+    The above copyright notice and this permission notice shall be
+    included in all copies or substantial portions of the Software.
+    
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+    
+"""
+
+__version__ = '1.2.5.{revision}'
+
+
+class Version(object):
+    """
+    CSB version number.
+    """
+    
+    def __init__(self):
+        
+        version = __version__.split('.')
+        
+        if not len(version) in (3, 4):
+            raise ValueError(version)
+        
+        self._package = __name__ 
+        
+        self._major = version[0]
+        self._minor = version[1]
+        self._micro = version[2]
+        self._revision = None
+        
+        if len(version) == 4:
+            self._revision = version[3]
+
+    def __str__(self):
+        return self.short
+    
+    def __repr__(self):
+        return '{0.package} {0.full}'.format(self)
+    
+    @property
+    def major(self):
+        """
+        Major version (huge, incompatible changes)
+        @rtype: int
+        """
+        return int(self._major)  
+     
+    @property
+    def minor(self):
+        """
+        Minor version (significant, but compatible changes)
+        @rtype: int
+        """        
+        return int(self._minor)
+    
+    @property
+    def micro(self):
+        """
+        Micro version (bug fixes and small enhancements)
+        @rtype: int
+        """        
+        return int(self._micro)  
+    
+    @property
+    def revision(self):
+        """
+        Build number (exact repository revision number)
+        @rtype: int
+        """          
+        try:
+            return int(self._revision)
+        except:
+            return self._revision
+    
+    @property
+    def short(self):
+        """
+        Canonical three-part version number.
+        """
+        return '{0.major}.{0.minor}.{0.micro}'.format(self)
+    
+    @property
+    def full(self):
+        """
+        Full version, including the repository revision number.
+        """        
+        return '{0.major}.{0.minor}.{0.micro}.{0.revision}'.format(self)
+    
+    @property
+    def package(self):
+        return self._package
diff --git a/csb/bio/io/dssp.py b/csb/bio/io/dssp.py
index 2a1f9fc..4d42754 100644
--- a/csb/bio/io/dssp.py
+++ b/csb/bio/io/dssp.py
@@ -40,6 +40,7 @@ class DSSPParser(object):
         data = {}
         start = False
         offset = 0                  # assume old DSSP format
+        accession = None
         
         for line in open(dssp_file):
             
diff --git a/csb/bio/io/wwpdb.py b/csb/bio/io/wwpdb.py
index 3070714..35750fe 100644
--- a/csb/bio/io/wwpdb.py
+++ b/csb/bio/io/wwpdb.py
@@ -2040,7 +2040,7 @@ class RemoteStructureProvider(StructureProvider):
     @type suffix: str
     """
     
-    def __init__(self, prefix='http://www.rcsb.org/pdb/files/pdb', suffix='.ent'):
+    def __init__(self, prefix='https://files.rcsb.org/download/', suffix='.pdb'):
         
         self._prefix = None
         self._suffix = None
@@ -2074,8 +2074,8 @@ class RemoteStructureProvider(StructureProvider):
         
         try:
             return csb.io.urllib.urlopen(self.prefix + id + self.suffix)
-        except:
-            raise StructureNotFoundError(id)
+        except Exception as e:
+            raise StructureNotFoundError(id + ": " + str(e))
         
     def find(self, id):
         
@@ -2172,7 +2172,7 @@ class CustomStructureProvider(StructureProvider):
         else:
             return None
     
-def get(accession, model=None, prefix='http://www.rcsb.org/pdb/files/pdb'):
+def get(accession, model=None, prefix='https://files.rcsb.org/download/'):
     """
     Download and parse a PDB entry.
 
diff --git a/csb/build.py b/csb/build.py
index e533ee3..95b9893 100644
--- a/csb/build.py
+++ b/csb/build.py
@@ -174,9 +174,10 @@ Options:
         
         if self._success:
             self.log('\n# Done ({0}).\n'.format(vn.full))
-        else:
-            self.log('\n# Build failed.\n')
-                 
+            return True
+
+        self.log('\n# Build failed.\n')
+        return False
 
     def log(self, message, level=1, ending='\n'):
 
@@ -190,7 +191,7 @@ Options:
         Collect all required stuff in the output folder.
         """
         self.log('# Preparing the file system...')
-                
+
         if not os.path.exists(self._output):
             self.log('Creating output directory {0}'.format(self._output), level=2)
             os.mkdir(self._output)
@@ -219,7 +220,7 @@ Options:
         root = os.path.join(self._root, '__init__.py')
         
         self.log('Retrieving revision number from {0}'.format(root), level=2)               
-        rh = MercurialHandler(root)        
+        rh = GitHandler(root)        
         revision = rh.read().revision
         
         self.log('Writing back revision number {0}'.format(revision), level=2)        
@@ -242,8 +243,9 @@ Options:
                         
         newdata = os.path.join(self._temp, ROOT, 'test', 'data')
         csb.test.Config.setDefaultDataRoot(newdata)
+        csb.test.Config.setDefaultGeneratedDataRoot(newdata)
 
-        self.log('\n# Updating all test pickles in {0} if necessary...'.format(newdata), level=2)        
+        self.log('\n# Updating all test pickles in {0} if necessary...'.format(newdata), level=2)
         csb.test.Config().ensureDataConsistency()
 
         self.log('\n# Running the Test Console...')
@@ -256,7 +258,8 @@ Options:
         if result.wasSuccessful():
             self.log('\n  Passed all unit tests')
         else:
-            self.log('\n  DID NOT PASS: The build might be broken')                             
+            self.log('\n  DID NOT PASS: This build might be broken')
+            self._success = False
         
     def _doc(self, version):
         """
@@ -278,8 +281,8 @@ Options:
                     '--fail-on-error', '--fail-on-warning', '--fail-on-docstring-warning',
                     self._root]
         
-        if self._verbosity > 0:                
-            sys.argv.append('-v')
+        if self._verbosity <= 1:
+            sys.argv.append('-q')
         
         try:
             epydoc.cli.cli()
@@ -289,7 +292,8 @@ Options:
                 self.log('\n  Passed all doc tests')
             else:
                 if ex.code == 2:
-                    self.log('\n  DID NOT PASS: The docs might be broken')                    
+                    self.log('\n  DID NOT PASS: Generated docs might be broken')
+                    self._success = False
                 else:
                     self.log('\n  FAIL: Epydoc returned "#{0.code}: {0}"'.format(ex))
                     self._success = False
@@ -326,6 +330,8 @@ Options:
         sys.argv = ['setup.py', verbosity, self._dist, '-d', self._output]        
             
         self.log('\n# Building {0} distribution...'.format(self._type))
+        version = package = None
+
         try:       
             setup = imp.load_source('setupcsb', 'setup.py')
             d = setup.build()
@@ -434,7 +440,8 @@ Options:
             Console.exit(code=1, usage=True)
         else:
             try:
-                Console(output, verbosity=verb, buildtype=buildtype).build()
+                ok = Console(output, verbosity=verb, buildtype=buildtype).build()
+                Console.exit(code=0 if ok else 66, usage=False)
             except Exception as ex:
                 msg = 'Unexpected Error: {0}\n\n{1}'.format(ex, traceback.format_exc())
                 Console.exit(message=msg, code=99, usage=False)
@@ -586,7 +593,39 @@ class MercurialHandler(RevisionHandler):
         
         finally:
             os.chdir(wd)
-                    
+
+
+class GitHandler(RevisionHandler):  
+
+    def __init__(self, path, sc='git'):
+        
+        if os.path.isfile(path):
+            path = os.path.dirname(path)
+                         
+        super(GitHandler, self).__init__(path, sc)
+        
+    def read(self):
+        
+        wd = os.getcwd()
+        os.chdir(self.path)
+        
+        try:
+            cmd = '{0.sc} rev-parse --short HEAD'.format(self)
+            revision = None
+            
+            for line in self._run(cmd):
+                if line.strip():
+                    revision = line.strip()
+                    break
+    
+            if revision is None:
+                raise RevisionError('No revision number found', code=0, cmd=cmd)
+            
+            return RevisionInfo(self.path, revision, revision)  
+        
+        finally:
+            os.chdir(wd)
+
 class RevisionInfo(object):
     
     def __init__(self, item, revision, id=None):
diff --git a/csb/statistics/__init__.py b/csb/statistics/__init__.py
index 8e20b03..54cfec1 100644
--- a/csb/statistics/__init__.py
+++ b/csb/statistics/__init__.py
@@ -26,7 +26,7 @@ class Cumulative(object):
             total_size = len(x) * len(self.data)
             nchunks = total_size / self.total_mem + int(total_size % self.total_mem != 0)
             
-        size = len(x) / nchunks + int(len(x) % nchunks != 0)
+        size = int(len(x) / nchunks + int(len(x) % nchunks != 0))
         
         while len(x):
 
diff --git a/csb/statistics/samplers/mc/multichain.py b/csb/statistics/samplers/mc/multichain.py
index 8e7f5fb..0a92ec0 100644
--- a/csb/statistics/samplers/mc/multichain.py
+++ b/csb/statistics/samplers/mc/multichain.py
@@ -534,14 +534,13 @@ class AbstractRENS(AbstractExchangeMC):
         init_temperature = self._get_init_temperature(traj_info)
         
         init_state = traj_info.init_state.clone()
-
+        
         if init_state.momentum is None:
             init_state = augment_state(init_state,
                                        init_temperature,
                                        traj_info.param_info.mass_matrix)
             
         gen = self._propagator_factory(traj_info)
-
         traj = gen.generate(init_state, int(traj_info.param_info.traj_length))
         
         return traj
@@ -669,6 +668,7 @@ class MDRENS(AbstractRENS):
         heat12 = swapcom.traj12.heat
         heat21 = swapcom.traj21.heat
         
+        
         proposal1 = swapcom.traj21.final
         proposal2 = swapcom.traj12.final
         
@@ -688,7 +688,7 @@ class MDRENS(AbstractRENS):
               (K(state1.momentum) + E1(state1.position)) / T1 - heat12 
         w21 = (K(proposal1.momentum) + E1(proposal1.position)) / T1 - \
               (K(state2.momentum) + E2(state2.position)) / T2 - heat21
-
+              
         return w12, w21
 
 
@@ -1034,7 +1034,7 @@ class AbstractStepRENS(AbstractRENS):
         init_temperature = self._get_init_temperature(traj_info)
 
         gen = self._propagator_factory(traj_info)
-
+        
         traj = gen.generate(traj_info.init_state)
         
         return NonequilibriumTrajectory([traj_info.init_state, traj.final], jacobian=1.0,
@@ -1068,7 +1068,8 @@ class HMCStepRENS(AbstractStepRENS):
 
         super(HMCStepRENS, self).__init__(samplers, param_infos)
 
-    def _add_gradients(self, im_sys_infos, param_info, t_prot):
+    @staticmethod
+    def _add_gradients(im_sys_infos, param_info, t_prot):
 
         im_gradients = [lambda x, t, i=i: param_info.gradient(x, t_prot(i))
                         for i in range(param_info.intermediate_steps + 1)]
@@ -1077,8 +1078,9 @@ class HMCStepRENS(AbstractStepRENS):
             s.hamiltonian.gradient = im_gradients[i]
 
         return im_sys_infos
-            
-    def _setup_propagations(self, im_sys_infos, param_info):
+
+    @staticmethod
+    def _setup_propagations(im_sys_infos, param_info):
                         
         propagation_params = [HMCPropagationParam(param_info.timestep,
                                                   param_info.hmc_traj_length,
@@ -1090,7 +1092,7 @@ class HMCStepRENS(AbstractStepRENS):
 
         propagations = [HMCPropagation(im_sys_infos[i+1], propagation_params[i], evaluate_heat=False)
                         for i in range(param_info.intermediate_steps)]
-
+        
         return propagations        
 
     def _calc_works(self, swapcom):
diff --git a/csb/statistics/samplers/mc/singlechain.py b/csb/statistics/samplers/mc/singlechain.py
index 8f60791..1bb669a 100644
--- a/csb/statistics/samplers/mc/singlechain.py
+++ b/csb/statistics/samplers/mc/singlechain.py
@@ -391,7 +391,7 @@ class RWMCSampler(AbstractSingleChainMC):
         current_state = self.state.clone()
         proposal_state = self.state.clone()
         proposal_state.position = self._proposal_density(current_state, self.stepsize)
-        
+
         return SimpleProposalCommunicator(current_state, proposal_state)
 
     def _calc_pacc(self, proposal_communicator):
diff --git a/csb/test/__init__.py b/csb/test/__init__.py
index a822aa4..96503a9 100644
--- a/csb/test/__init__.py
+++ b/csb/test/__init__.py
@@ -155,9 +155,7 @@ decorators you would need in order to write tests for CSB.
 
 @warning: for compatibility reasons do NOT import and use the unittest module
           directly. Always import unittest from csb.test, which is guaranteed
-          to be python 2.7+ compatible. The standard unittest under python 2.6
-          is missing some features, that's why csb.test will take care of
-          replacing it with unittest2 instead. 
+          to be python 2.7+ compatible.
 """
 import os
 import sys
@@ -244,7 +242,7 @@ class Config(object):
         return Config.DATA
 
     @property
-    def generated_data(self):
+    def generatedData(self):
         """
         Test data directory for generated files
         @rtype: str
@@ -274,7 +272,7 @@ class Config(object):
         
         @raise IOError: if no such file is found
         """
-        for data in [self.data, self.generated_data]:
+        for data in [self.data, self.generatedData]:
             file = os.path.join(data, subDir, fileName)
             
             if os.path.isfile(file):
@@ -354,13 +352,13 @@ class Config(object):
         ensemble = Ensemble()
         ensemble.models.append(model1)
         ensemble.models.append(model2)
-        Pickle.dump(ensemble, open(os.path.join(self.generated_data, '1nz9.full.pickle'), 'wb'))
+        Pickle.dump(ensemble, open(os.path.join(self.generatedData, '1nz9.full.pickle'), 'wb'))
         
         mse = model1.chains['A'].find(164)
         mse.label = 'MSE'
         mse.atoms['SD']._element = ChemElements.Se
         mse.atoms['SD']._full_name = 'SE  '
-        Pickle.dump(model1, open(os.path.join(self.generated_data, '1nz9.model1.pickle'), 'wb'))    
+        Pickle.dump(model1, open(os.path.join(self.generatedData, '1nz9.model1.pickle'), 'wb'))
 
 class Case(unittest.TestCase):
     """
diff --git a/csb/test/app.py b/csb/test/app.py
index 821e312..75cf905 100644
--- a/csb/test/app.py
+++ b/csb/test/app.py
@@ -4,8 +4,10 @@ CSB Test Runner app. Run with -h to see the app's documentation.
 
 from csb.test import Console
 
-main = Console
+
+def main():
+    return Console('csb.test.cases.*')
+
 
 if __name__ == '__main__':
-    
-    main('csb.test.cases.*')
\ No newline at end of file
+    main()
diff --git a/csb/test/cases/bio/hmm/__init__.py b/csb/test/cases/bio/hmm/__init__.py
index 514dc71..48bb503 100644
--- a/csb/test/cases/bio/hmm/__init__.py
+++ b/csb/test/cases/bio/hmm/__init__.py
@@ -285,7 +285,7 @@ class TestState(test.Case):
         self.assertEqual(self.m.emission.length, 3)
         self.assertEqual(set(self.m.emission), set([ProteinAlphabet.ALA, ProteinAlphabet.CYS, ProteinAlphabet.GLU]))
         self.assertEqual(self.m.emission[ProteinAlphabet.CYS], 0.5)
-        self.assertRaises(lambda: self.m.emission[ProteinAlphabet.GAP])
+        self.assertRaises(KeyError, lambda: self.m.emission[ProteinAlphabet.GAP])
         self.assertRaises(UnobservableStateError, lambda: self.d.emission)
         
         self.m.emission.append(ProteinAlphabet.ILE, 0.5)
@@ -303,13 +303,13 @@ class TestState(test.Case):
         self.assertEqual(self.m.background.length, 3)
         self.assertEqual(set(self.m.background), set([ProteinAlphabet.ALA, ProteinAlphabet.CYS, ProteinAlphabet.GLU]))
         self.assertEqual(self.m.background[ProteinAlphabet.CYS], 0.00325358)
-        self.assertRaises(lambda: self.m.background[ProteinAlphabet.GAP])
+        self.assertRaises(KeyError, lambda: self.m.background[ProteinAlphabet.GAP])
         
         self.m.background.append(ProteinAlphabet.ILE, 0.5)
         self.assertEqual(self.m.background[ProteinAlphabet.ILE], 0.5)
         self.m.background.append('L', 0)
         self.assertRaises(EmissionExistsError, lambda:self.m.background.append('I', 0))
-        self.assertRaises(KeyError, lambda:self.m.background.append('BUG', 0))
+        self.assertRaises(KeyError, lambda: self.m.background.append('BUG', 0))
 
 
 @test.unit
diff --git a/csb/test/cases/bio/io/mrc/__init__.py b/csb/test/cases/bio/io/mrc/__init__.py
index c4a6d3f..24bda3c 100644
--- a/csb/test/cases/bio/io/mrc/__init__.py
+++ b/csb/test/cases/bio/io/mrc/__init__.py
@@ -35,7 +35,7 @@ class TestDensityMapReader(test.Case):
         
         density = self.reader.read()
 
-        self.assertNotEqual(density.data, None)
+        self.assertIsNotNone(density.data)
         self.assertEqual(density.header, self.rawheader)
         self.assertEqual(density.origin, [-36.0, -36.0, -36.0])
         self.assertEqual(density.shape, (72, 72, 72))
diff --git a/csb/test/cases/bio/nmr/__init__.py b/csb/test/cases/bio/nmr/__init__.py
index 7c5b4ea..5a13802 100644
--- a/csb/test/cases/bio/nmr/__init__.py
+++ b/csb/test/cases/bio/nmr/__init__.py
@@ -97,9 +97,11 @@ class TestAtomConnectivity(test.Case):
 @test.unit
 class TestContactMap(test.Case):
 
-    CHAIN = get_chain()
-    MAP = ContactMap(CHAIN, cutoff=1.75, filter=Filters.HYDROGENS)
-    MAP.build()
+    @classmethod
+    def setUpClass(cls):
+        cls.CHAIN = get_chain()
+        cls.MAP = ContactMap(cls.CHAIN, cutoff=1.75, filter=Filters.HYDROGENS)
+        cls.MAP.build()
 
     def setUp(self):
         super(TestContactMap, self).setUp()
diff --git a/epydoc.css b/epydoc.css
new file mode 100644
index 0000000..09cc60c
--- /dev/null
+++ b/epydoc.css
@@ -0,0 +1,727 @@
+/* Epydoc CSS Stylesheet
+*
+*  This is a massivley hacked stylesheet for epydoc, the very nice Python API
+*  Documentation generator. The general look and feel is based on sphinx.
+*
+*  Feel free to tweak this some more to make the theme even more pleasing 
+*  if you have the time to spare for such things. The typography in particular
+*  could do with sorting out. Unless you like writing masocistic CSS however,
+*  I'd recommend looking to refactor the markup generated by epydoc.
+*
+*/
+
+/* Yahoo! Reset Styles
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.1
+*/
+html {
+    color: #000;
+    background: #FFF;
+}
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td {
+    margin: 0;
+    padding: 0;
+}
+table {
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+fieldset,img {
+    border: 0;
+}
+address,caption,cite,code,dfn,em,strong,th,var {
+    font-style: normal;
+    font-weight: normal;
+}
+
+caption,th {
+    text-align: left;
+}
+h1,h2,h3,h4,h5,h6 {
+    font-size: 100%;
+    font-weight: normal;
+}
+q:before,q:after {
+    content: '';
+}
+abbr,acronym {
+    border: 0;
+    font-variant: normal;
+}
+sup {
+    vertical-align: text-top;
+}
+sub {
+    vertical-align: text-bottom;
+}
+input,textarea,select {
+    font-family: inherit;
+    font-size: inherit;
+    font-weight: inherit;
+}
+input,textarea,select {*font-size:100%;
+}
+legend {
+    color: #000;
+}
+body {
+    font: 13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;
+}
+table {
+    font-size: inherit;
+    font: 100%;
+}
+pre,code,kbd,samp,tt {
+    font-family: monospace;*font-size:108%;
+    line-height: 100%;
+}
+
+
+
+/* Default Colors & Styles
+* - Set the default foreground & background color with 'body'; and
+* link colors with 'a:link' and 'a:visited'.
+* - Use bold for decision list terms.
+* - The heading styles defined here are used for headings *within*
+* docstring descriptions. All headings used by epydoc itself use
+* either class='epydoc' or class='toc' (CSS styles for both
+* defined below).
+*/
+body {
+    background: #ffffff;
+    color: #000000;
+}
+p {
+    margin-top: 0.5em;
+    margin-bottom: 0.5em;
+}
+a {
+    color: #355f7c;
+    text-decoration: none;
+}
+
+a:hover {
+    text-decoration: underline;
+}
+
+dt {
+    font-weight: bold;
+}
+h1, h2 {
+    color: #20435C;
+    background: #F2F2F2;
+    border-bottom: 1px solid #CCC;
+    padding: 10px;
+}
+center {
+    display: none;
+}
+code {
+    font-size: 100%;
+}
+/* N.B.: class, not pseudoclass */
+
+link {
+    font-family: monospace;
+}
+
+/* Page Header & Footer
+* - The standard page header consists of a navigation bar (with
+* pointers to standard pages such as 'home' and 'trees'); a
+* breadcrumbs list, which can be used to navigate to containing
+* classes or modules; options links, to show/hide private
+* variables and to show/hide frames; and a page title (using
+* <h1>). The page title may be followed by a link to the
+* corresponding source code (using 'span.codelink').
+* - The footer consists of a navigation bar, a timestamp, and a
+* pointer to epydoc's homepage.
+*/
+h1.epydoc {
+    margin: -14px 0 0;
+    font-size: +140%;
+    color: #20435C;
+}
+h2.epydoc {
+    font-size: +130%;
+}
+h3.epydoc {
+    font-size: +115%;
+    margin-top: 0.2em;
+    margin-left: 25px;
+}
+td h3.epydoc {
+    font-size: +115%;
+    font-weight: bold;
+    margin-bottom: 0;
+}
+table.navbar {
+    background: #133F52;
+    color: #355f7c;
+    border: 0;
+}
+table.navbar table {
+    color: #355f7c;
+}
+th.navbar-select {
+    background: #1C4E63;
+    color: #FFF;
+}
+table.navbar table th {
+    padding-left: 15px;
+}
+table.navbar a {
+    text-decoration: none;
+    color: #FFF;
+    padding: 0 10px;
+    display: block;
+}
+table td.footer {
+    padding: 10px;
+    color: #666;
+    font-size: 90%;
+}
+/* Table Headers
+* - Each summary table and details section begins with a 'header'
+* row. This row contains a section title (marked by
+* 'span.table-header') as well as a show/hide private link
+* (marked by 'span.options', defined above).
+* - Summary tables that contain user-defined groups mark those
+* groups using 'group header' rows.
+*/
+td.table-header {
+    background: #F2F2F2;
+    color: #20435C;
+    border: 1px solid #CCC;
+    padding: 5px 10px;
+}
+td.table-header table a:visited {
+    color: #204080;
+}
+span.table-header {
+    font-size: 120%;
+}
+th.group-header {
+    background: #c0e0f8;
+    color: #000000;
+    text-align: left;
+    font-size: 115%;
+    border: 1px solid #608090;
+}
+
+/* Summary Tables (functions, variables, etc)
+* - Each object is described by a single row of the table with
+* two cells. The left cell gives the object's type, and is
+* marked with 'code.summary-type'. The right cell gives the
+* object's name and a summary description.
+* - CSS styles for the table's header and group headers are
+* defined above, under 'Table Headers'
+*/
+table.summary {
+    border-collapse: collapse;
+    background: #FFF;
+    color: #000000;
+    border: 1px solid #CCC;
+    margin: 0 0 20px;
+}
+td.summary {
+    border: 1px solid #CCC;
+    padding: 5px 10px;
+}
+code.summary-type {
+    font-size: 85%;
+}
+
+/* Details Tables (functions, variables, etc)
+* - Each object is described in its own div.
+* - A single-row summary table w/ table-header is used as
+* a header for each details section (CSS style for table-header
+* is defined above, under 'Table Headers').
+*/
+table.details {
+    border-collapse: collapse;
+    background: #FFF;
+    color: #000000;
+    border: solid 1px #CCC;
+    margin: .2em 0 0 0;
+}
+
+table.details table {
+    color: #000000;
+}
+
+/* Fields */
+dl.fields {
+    margin-left: 2em;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+dl.fields dd ul {
+    margin-left: 3em;
+    padding-left: 0em;
+}
+dl.fields dd ul li ul {
+    margin-left: 2em;
+    padding-left: 0em;
+}
+
+}
+div.fields {
+    margin-left: 4em;
+}
+div.fields p {
+    margin-bottom: 0.5em;
+}
+
+/* Index tables (identifier index, term index, etc)
+* - link-index is used for indices containing lists of links
+* (namely, the identifier index & term index).
+* - index-where is used in link indices for the text indicating
+* the container/source for each link.
+* - metadata-index is used for indices containing metadata
+* extracted from fields (namely, the bug index & todo index).
+*/
+table.link-index {
+    border-collapse: collapse;
+    background: #F2F2F2;
+    color: #000000;
+    border: 1px solid #CCC;
+}
+td.link-index {
+    border-width: 0px;
+    padding: 3px;
+}
+span.index-where {
+    font-size: 70%;
+}
+table.metadata-index {
+    border-collapse: collapse;
+    background: #e8f0f8;
+    color: #000000;
+    border: 1px solid #608090;
+    margin: .2em 0 0 0;
+}
+td.metadata-index {
+    border-width: 1px;
+    border-style: solid;
+}
+table.link-index h2.epydoc {
+    border-width: 1px 0;
+}
+
+/* Function signatures
+* - sig* is used for the signature in the details section.
+* - .summary-sig* is used for the signature in the summary
+* table, and when listing property accessor functions.
+* */
+.sig-name {
+    color: #006080;
+}
+.sig-arg {
+    color: #008060;
+}
+.sig-default {
+    color: #602000;
+}
+.summary-sig {
+    font-family: monospace;
+}
+.summary-sig-name {
+    color: #006080;
+    font-weight: bold;
+}
+table.summary a.summary-sig-name:link {
+    color: #006080;
+    font-weight: bold;
+}
+table.summary a.summary-sig-name:visited {
+    color: #006080;
+    font-weight: bold;
+}
+.summary-sig-arg {
+    color: #006040;
+}
+.summary-sig-default {
+    color: #501800;
+}
+
+/* Subclass list
+*/
+ul.subclass-list {
+    display: inline;
+}
+ul.subclass-list li {
+    display: inline;
+}
+
+/* To render variables, classes etc. like functions */
+table.summary .summary-name {
+    color: #006080;
+    font-weight: bold;
+    font-family: monospace;
+}
+table.summary
+a.summary-name:link {
+    color: #006080;
+    font-weight: bold;
+    font-family: monospace;
+}
+table.summary
+a.summary-name:visited {
+    color: #006080;
+    font-weight: bold;
+    font-family: monospace;
+}
+
+/* Variable values
+* - In the 'variable details' sections, each varaible's value is
+* listed in a 'pre.variable' box. The width of this box is
+* restricted to 80 chars; if the value's repr is longer than
+* this it will be wrapped, using a backslash marked with
+* class 'variable-linewrap'. If the value's repr is longer
+* than 3 lines, the rest will be ellided; and an ellipsis
+* marker ('...' marked with 'variable-ellipsis') will be used.
+* - If the value is a string, its quote marks will be marked
+* with 'variable-quote'.
+* - If the variable is a regexp, it is syntax-highlighted using
+* the re* CSS classes.
+*/
+pre.variable {
+    padding: .5em;
+    margin: 0;
+    background: #F2F2F2;
+    color: #000000;
+    border: 1px solid #CCC;
+}
+.variable-linewrap {
+    color: #604000;
+    font-weight: bold;
+}
+.variable-ellipsis {
+    color: #604000;
+    font-weight: bold;
+}
+.variable-quote {
+    color: #604000;
+    font-weight: bold;
+}
+.variable-group {
+    color: #008000;
+    font-weight: bold;
+}
+.variable-op {
+    color: #604000;
+    font-weight: bold;
+}
+.variable-string {
+    color: #006030;
+}
+.variable-unknown {
+    color: #a00000;
+    font-weight: bold;
+}
+.re {
+    color: #000000;
+}
+.re-char {
+    color: #006030;
+}
+.re-op {
+    color: #600000;
+}
+.re-group {
+    color: #003060;
+}
+.re-ref {
+    color: #404040;
+}
+
+/* Base tree
+* - Used by class pages to display the base class hierarchy.
+*/
+pre.base-tree {
+    font-size: 80%;
+    margin: 0;
+    margin-left: 3em;
+    padding: 0.5em;
+    
+}
+
+
+/* Syntax Highlighting for Source Code
+* - doctest examples are displayed in a 'pre.py-doctest' block.
+* If the example is in a details table entry, then it will use
+* the colors specified by the 'table pre.py-doctest' line.
+* - Source code listings are displayed in a 'pre.py-src' block.
+* Each line is marked with 'span.py-line' (used to draw a line
+* down the left margin, separating the code from the line
+* numbers). Line numbers are displayed with 'span.py-lineno'.
+* The expand/collapse block toggle button is displayed with
+* 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
+* modify the font size of the text.)
+* - If a source code page is opened with an anchor, then the
+* corresponding code block will be highlighted. The code
+* block's header is highlighted with 'py-highlight-hdr'; and
+* the code block's body is highlighted with 'py-highlight'.
+* - The remaining py-* classes are used to perform syntax
+* highlighting (py-string for string literals, py-name for names,
+* etc.)
+*/
+pre.literalblock {
+    padding: 1em;
+    margin: 1em;    
+    border: solid 1px #f0f0f0;
+}
+pre.py-doctest {
+    padding: .5em;
+    margin: 1em;
+    background: #F2F2F2;
+    color: #000000;
+    border: 1px solid #CCC;
+}
+table pre.py-doctest {
+    background: #F2F2F2;
+    color: #000000;
+}
+pre.py-src {
+    border: 1px solid #CCC;
+    background: #FFF;
+    color: #000000;
+    margin: 20px 0;
+}
+.py-line {
+    border-left: 1px solid #CCC;
+    margin-left: .2em;
+    padding-left: .4em;
+}
+.py-lineno {
+    font-style: italic;
+    font-size: 90%;
+    padding-left: .5em;
+}
+a.py-toggle {
+    text-decoration: none;
+}
+div.py-highlight-hdr {
+    border-top: 1px solid #CCC;
+    border-bottom: 1px solid #CCC;
+    background: #F2F2F2;
+}
+div.py-highlight {
+    border-bottom: 1px solid #CCC;
+    background: #F2F2F2;
+}
+.py-prompt {
+    color: #005050;
+    font-weight: bold;
+}
+.py-more {
+    color: #005050;
+    font-weight: bold;
+}
+.py-string {
+    color: #006030;
+}
+.py-comment {
+    color: #003060;
+}
+.py-keyword {
+    color: #600000;
+}
+.py-output {
+    color: #404040;
+}
+.py-name {
+    color: #000050;
+}
+.py-name:link {
+    color: #000050 !important;
+}
+.py-name:visited {
+    color: #000050 !important;
+}
+.py-number {
+    color: #005000;
+}
+.py-defname {
+    color: #000060;
+    font-weight: bold;
+}
+.py-def-name {
+    color: #000060;
+    font-weight: bold;
+}
+.py-base-class {
+    color: #000060;
+}
+.py-param {
+    color: #000060;
+}
+.py-docstring {
+    color: #006030;
+}
+.py-decorator {
+    color: #804020;
+}
+
+/* Graphs & Diagrams
+* - These CSS styles are used for graphs & diagrams generated using
+* Graphviz dot. 'img.graph-without-title' is used for bare
+* diagrams (to remove the border created by making the image
+* clickable).
+*/
+img.graph-without-title {
+    border: none;
+}
+img.graph-with-title {
+    border: 1px solid #000000;
+}
+span.graph-title {
+    font-weight: bold;
+}
+
+/* General-purpose classes
+* - 'p.indent-wrapped-lines' defines a paragraph whose first line
+* is not indented, but whose subsequent lines are.
+* - The 'nomargin-top' class is used to remove the top margin (e.g.
+* from lists). The 'nomargin' class is used to remove both the
+* top and bottom margin (but not the left or right margin --
+* for lists, that would cause the bullets to disappear.)
+*/
+p.indent-wrapped-lines {
+    padding: 0 0 0 7em;
+    text-indent: -7em;
+    margin: 0;
+}
+.nomargin-top {
+    margin: 20px;
+}
+.nomargin {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+/* HTML Log */
+div.log-block {
+    padding: 0;
+    margin: .5em 0 .5em 0;
+    background: #e8f0f8;
+    color: #000000;
+    border: 1px solid #000000;
+}
+div.log-error {
+    padding: .1em .3em .1em .3em;
+    margin: 4px;
+    background: #ffb0b0;
+    color: #000000;
+    border: 1px solid #000000;
+}
+div.log-warning {
+    padding: .1em .3em .1em .3em;
+    margin: 4px;
+    background: #ffffb0;
+    color: #000000;
+    border: 1px solid #000000;
+}
+div.log-info {
+    padding: .1em .3em .1em .3em;
+    margin: 4px;
+    background: #b0ffb0;
+    color: #000000;
+    border: 1px solid #000000;
+}
+h2.log-hdr {
+    background: #70b0ff;
+    color: #000000;
+    margin: 0;
+    padding: 0em 0.5em 0em 0.5em;
+    border-bottom: 1px solid #000000;
+    font-size: 110%;
+}
+p.log {
+    font-weight: bold;
+    margin: .5em 0 .5em 0;
+}
+tr.opt-changed {
+    color: #000000;
+    font-weight: bold;
+}
+tr.opt-default {
+    color: #606060;
+}
+pre.log {
+    margin: 0;
+    padding: 0;
+    padding-left: 1em;
+}
+
+/* Hacks
+*  This section is reseerved for the really horrible bits. In reality the
+*  markup generated by epydoc wants a good kickings but a CSS patch is 
+*  better than nothing. Some of this does remove useful links or output
+*  because finding somewhere to put them on the page wasn't easy. If your
+*  favourite link has disappeared this is probably the reason.
+*/
+
+ol {
+    margin-left: 3em;	
+}
+
+ul {
+    margin-left: 3em;
+}
+
+ul ul {
+    margin-left: 1em;
+}
+ul ul ul {
+    margin-left: 2em;
+}
+ul ul ul ul {
+    margin-left: 3em;
+}
+
+ul.nomargin-top {
+    margin-left: 40px; padding-left: 40px;
+}
+
+a[target=mainFrame], a[target=moduleFrame] {
+    margin: 0 10px;
+    display: block;
+}
+h2.toc {
+    margin-bottom: 10px;
+}
+h1.toc {
+    display: none;
+}
+.options {
+    display: none;
+}
+hr, br {
+    display: none;
+}
+a[href="toc-everything.html"] {
+    display: none;
+}
+.breadcrumbs {
+    visibility: hidden;
+}
+.details p {
+    margin-left: 25px;
+}
+body > p {
+    margin: 20px;
+}
+
+
+.heading {
+    margin-top: 1em;
+}
+
+div.fields {
+    margin: 2em;
+}
+
+
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..f23634b
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,3 @@
+numpy
+scipy
+matplotlib
diff --git a/setup.py b/setup.py
index 939f94e..f55a5ee 100644
--- a/setup.py
+++ b/setup.py
@@ -1,159 +1,89 @@
-import os
-import imp
+import sys
 
-from distutils.core import setup
+from setuptools import setup, find_packages
 from csb.build import ROOT 
 
+
 try:
-    __doc__ = open('README.txt').read()
+    __doc__ = open('README.rst').read()
 except IOError:
-    pass
-
-
-LOCATION        = os.path.abspath(os.path.dirname(__file__))
-JUNK            = ['.svn', '.hg', '.hgtags']
-
-NAME            = ROOT
-VERSION         = imp.load_source('____csb', os.path.join(LOCATION, ROOT, '__init__.py')).Version()
-AUTHOR          = "Michael Habeck et al."
-EMAIL           = "ivan.kalev at gmail.com"
-URL             = "http://csb.codeplex.com"
-SUMMARY         = "Computational Structural Biology Toolbox"
-DESCRIPTION     = __doc__
-LICENSE         = 'MIT'
-REQUIRES        = ['numpy', 'scipy']
-
-
-def sourcetree(root='csb', junk=JUNK):
-    """
-    Since distutils requires to HARD CODE the entire package hierarchy here,
-    we need this function to load the source tree structure dynamically.
-    
-    @param root: name of the root package; this is 'csb'. Must be relative!
-    @type root: str
-    @param junk: skip those directories
-    @type junk: tuple
-    
-    @return: a list of "package" names
-    @rtype: list  
-    """
-    junk = set(junk)
-    items = []
+    __doc__ = ""
 
-    curdir = os.path.abspath(os.curdir)
-    cwd = os.path.dirname(__file__) or '.'
-    os.chdir(cwd)
-    
-    if root.startswith(os.path.sep):
-        raise ValueError('root must be a relative path')
-    elif not os.path.isdir(os.path.join('.', root)):
-        raise ValueError('root package "{0}" not found in {1}.'.format(root, cwd))        
-    
-    for entry in os.walk(root):
-            
-        directory = entry[0]
-        parts = set(directory.split(os.path.sep))
-            
-        init = os.path.join(directory, '__init__.py')
-        # take all packages: directories with __init__, except if a junk 
-        # directory is found at any level in the tree
-        if os.path.isfile(init) and junk.isdisjoint(parts):
-            items.append(directory)
 
-    os.chdir(curdir)
-        
-    return items
+NAME = ROOT
+AUTHOR = "Michael Habeck et al."
+EMAIL = "ivan.kalev at gmail.com"
+URL = "http://github.com/csb-toolbox"
+SUMMARY = "Computational Structural Biology Toolbox"
+DESCRIPTION = __doc__
+LICENSE = 'MIT'
 
+REQUIREMENTS = open("requirements.txt").readlines()
+DEV_REQUIREMENTS = []
 
-def datatree(package, dataroot, junk=JUNK, mask='*.*'):
-    """
-    Since distutils will crash if the data root folder contains any subfolders,
-    we need this function to retrieve the data tree.
+if sys.version_info[0] == 2:
+    DEV_REQUIREMENTS.append("epydoc")
 
-    @param package: root "package", containing a data folder. This is a 
-                    relative path, e.g. "csb/test"
-    @type package: str
-    @param dataroot: name of the data root directory for C{package},
-                     relative to C{package}
-    @type dataroot: str
-    @param junk: skip those directories
-    @type junk: tuple
-    
-    @return: a list of all glob patterns with all subdirectories of the data
-             root, including the root itself. The paths  returned are relative
-             to C{package}  
-    @rtype: list      
-    """
-    junk = set(junk)
-    items = []
-
-    curdir = os.path.abspath(os.curdir)
-    cwd = os.path.dirname(__file__) or '.'
-    os.chdir(cwd)
-    
-    if package.startswith(os.path.sep):
-        raise ValueError('package must be a relative path')
-    elif not os.path.isdir(os.path.join('.', package)):
-        raise ValueError('package "{0}" not found in {1}.'.format(package, cwd))        
-
-    os.chdir(package)
-        
-    for entry in os.walk(dataroot):
-        
-        directory = entry[0]
-        parts = set(directory.split(os.path.sep))
-        
-        # take all directories, except if a junk dir is found at any level in the tree
-        if junk.isdisjoint(parts):
-            item = os.path.join(directory, mask)
-            items.append(item)
-
-    os.chdir(curdir)
-        
-    return items
+v = {}
+exec(open(ROOT + "/__init__.py").read(), v)
+VERSION = v["Version"]()
 
 
 def build():
-    
-    test = os.path.join('csb', 'test')
-    nmr = os.path.join('csb', 'bio', 'nmr')
-    
+
     return setup(
-              name=NAME,
-              packages=sourcetree(NAME, JUNK),
-              package_data={
-                                test: datatree(test, 'data',      JUNK, '*.*'),
-                                nmr:  datatree(nmr,  'resources', JUNK, '*.*')
-                            },
-              version=VERSION.short,
-              author=AUTHOR,
-              author_email=EMAIL,
-              url=URL,
-              description=SUMMARY,
-              long_description=DESCRIPTION,
-              license=LICENSE,
-              requires=REQUIRES,
-              classifiers=(
-                    'Development Status :: 5 - Production/Stable',
-                    'Intended Audience :: Developers',
-                    'Intended Audience :: Science/Research',
-                    'License :: OSI Approved :: MIT License',
-                    'Operating System :: OS Independent',
-                    'Programming Language :: Python',
-                    'Programming Language :: Python :: 2.6',
-                    'Programming Language :: Python :: 2.7',
-                    'Programming Language :: Python :: 3.1',
-                    'Programming Language :: Python :: 3.2',                    
-                    'Topic :: Scientific/Engineering',
-                    'Topic :: Scientific/Engineering :: Bio-Informatics',
-                    'Topic :: Scientific/Engineering :: Mathematics',
-                    'Topic :: Scientific/Engineering :: Physics',
-                    'Topic :: Software Development :: Libraries'
-              )              
+        name=NAME,
+        packages=find_packages(),
+        include_package_data=True,
+        version=VERSION.short,
+        author=AUTHOR,
+        author_email=EMAIL,
+        url=URL,
+        description=SUMMARY,
+        long_description=DESCRIPTION,
+        license=LICENSE,
+        install_requires=REQUIREMENTS,
+        tests_require=DEV_REQUIREMENTS,
+        extras_require={
+            'dev': DEV_REQUIREMENTS
+        },
+        test_suite="csb.test.cases",
+        entry_points={
+            'console_scripts': [
+                'csb-test = csb.test.app:main',
+                'csb-bfit = csb.apps.bfit:main',
+                'csb-bfite = csb.apps.bfite:main',
+                'csb-csfrag = csb.apps.csfrag:main',
+                'csb-hhfrag = csb.apps.hhfrag:main',
+                'csb-buildhmm = csb.apps.buildhmm:main',
+                'csb-hhsearch = csb.apps.hhsearch:main',
+                'csb-precision = csb.apps.precision:main',
+                'csb-promix = csb.apps.promix:main',
+                'csb-embd = csb.apps.embd:main'
+            ]
+        },
+        classifiers=(
+            'Development Status :: 5 - Production/Stable',
+            'Intended Audience :: Developers',
+            'Intended Audience :: Science/Research',
+            'License :: OSI Approved :: MIT License',
+            'Operating System :: OS Independent',
+            'Programming Language :: Python',
+            'Programming Language :: Python :: 2.7',
+            'Programming Language :: Python :: 3.1',
+            'Programming Language :: Python :: 3.2',
+            'Programming Language :: Python :: 3.3',
+            'Programming Language :: Python :: 3.4',
+            'Programming Language :: Python :: 3.5',
+            'Programming Language :: Python :: 3.6',
+            'Topic :: Scientific/Engineering',
+            'Topic :: Scientific/Engineering :: Bio-Informatics',
+            'Topic :: Scientific/Engineering :: Mathematics',
+            'Topic :: Scientific/Engineering :: Physics',
+            'Topic :: Software Development :: Libraries'
+        )
     )
 
 
-
 if __name__ == '__main__':
-    
-    build()
\ No newline at end of file
+    build()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-csb.git



More information about the debian-med-commit mailing list