Package mvpa :: Package base :: Module externals
[hide private]
[frames] | no frames]

Module externals

source code

Helper to verify presence of external libraries and modules

Functions [hide private]
 
__check_pywt(features=None)
Check for available functionality within pywt
source code
 
__check_libsvm_verbosity_control()
Check for available verbose control functionality
source code
 
__check_shogun(bottom_version, custom_versions=[])
Check if version of shogun is high enough (or custom known) to be enabled in the testsuite
source code
 
__check_weave()
Apparently presence of scipy is not sufficient since some versions experience problems.
source code
 
__check_atlas_family(family) source code
 
__check_stablerdist() source code
 
__check_in_ipython() source code
 
__check_matplotlib()
Check for presence of matplotlib and set backend if requested.
source code
 
__check_pylab()
Check if matplotlib is there and then pylab
source code
 
__check_pylab_plottable()
Simple check either we can plot anything using pylab.
source code
 
exists(dep, force=False, raiseException=False, issueWarning=None)
Test whether a known dependency is installed on the system.
source code
 
testAllDependencies(force=False)
Test for all known dependencies.
source code
Variables [hide private]
  _KNOWN = {'libsvm': 'import mvpa.clfs.libsvmc._svm as __; x=__...
Function Details [hide private]

__check_pywt(features=None)

source code 
Check for available functionality within pywt
Parameters:
  • features (list of basestring) - List of known features to check such as 'wp reconstruct', 'wp reconstruct fixed'

__check_shogun(bottom_version, custom_versions=[])

source code 
Check if version of shogun is high enough (or custom known) to be enabled in the testsuite
Parameters:
  • bottom_version (int) - Bottom version which must be satisfied
  • custom_versions (list of int) - Arbitrary list of versions which could got patched for a specific issue

__check_weave()

source code 

Apparently presence of scipy is not sufficient since some versions experience problems. E.g. in Sep,Oct 2008 lenny's weave failed to work. May be some other converter could work (? See http://lists.debian.org/debian-devel/2008/08/msg00730.html for a similar report.

Following simple snippet checks compilation of the basic code using weave

__check_pylab_plottable()

source code 

Simple check either we can plot anything using pylab.

Primary use in unittests

exists(dep, force=False, raiseException=False, issueWarning=None)

source code 

Test whether a known dependency is installed on the system.

This method allows us to test for individual dependencies without testing all known dependencies. It also ensures that we only test for a dependency once.

Parameters:
  • dep (string or list of string) - The dependency key(s) to test.
  • force (boolean) - Whether to force the test even if it has already been performed.
  • raiseException (boolean) - Whether to raise RuntimeError if dependency is missing.
  • issueWarning (string or None or True) - If string, warning with given message would be thrown. If True, standard message would be used for the warning text.

testAllDependencies(force=False)

source code 
Test for all known dependencies.
Parameters:
  • force (boolean) - Whether to force the test even if it has already been performed.

Variables Details [hide private]

_KNOWN

Value:
{'libsvm': 'import mvpa.clfs.libsvmc._svm as __; x=__.convert2SVMNode'\
, 'libsvm verbosity control': '__check_libsvm_verbosity_control();', '\
nifti': 'from nifti import NiftiImage as __', 'nifti >= 0.20090205.1':\
 'from nifti.clib import detachDataFromImage as __', 'ctypes': 'import\
 ctypes as __', 'shogun': 'import shogun as __', 'shogun.mpd': 'import\
 shogun.Classifier as __; x=__.MPDSVM', 'shogun.lightsvm': 'import sho\
gun.Classifier as __; x=__.SVMLight', 'shogun.svrlight': 'from shogun.\
Regression import SVRLight as __', 'scipy': "import scipy as __", 'goo\
...