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

Module externals

source code

Helper to verify presence of external libraries and modules
Classes [hide private]
  _VersionsChecker
Helper class to check the versions of the available externals
Functions [hide private]
 
__check_scipy()
Check if scipy is present an if it is -- store its version
source code
 
__check_numpy()
Check if numpy is present (it must be) an if it is -- store its version
source code
 
__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. 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.
source code
 
__check_atlas_family(family) source code
 
__check_stablerdist() source code
 
__check_rv_discrete_ppf()
Unfortunately 0.6.0-12 of scipy pukes on simple ppf
source code
 
__check_in_ipython() source code
 
__check_openopt() 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
 
__check_griddata()
griddata might be independent module or part of mlab
source code
 
__check_reportlab() source code
 
__check_rpy()
Check either rpy is available and also set it for the sane execution
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]
  versions = _VersionsChecker()
Versions of available externals, as tuples
  _KNOWN = {'libsvm': 'import mvpa.clfs.libsvmc._svm as __; x=__...

Imports: os, warning, cfg, SmartVersion, debug


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 or 'always') - Whether to raise RuntimeError if dependency is missing. If True, it is still conditioned on the global setting MVPA_EXTERNALS_RAISE_EXCEPTION, while would raise exception if missing despite the configuration if 'always'.
  • 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 ge 0.20090205.1':\
 'from nifti.clib import detachDataFromImage as __', 'ctypes': 'import\
 ctypes as __', 'shogun': 'import shogun as __', 'shogun.krr': 'import\
 shogun.Regression as __; x=__.KRR', 'shogun.mpd': 'import shogun.Clas\
sifier as __; x=__.MPDSVM', 'shogun.lightsvm': 'import shogun.Classifi\
er as __; x=__.SVMLight', 'shogun.svrlight': 'from shogun.Regression i\
...