Skip to content
Mayeul d'Avezac edited this page Jun 14, 2013 · 22 revisions

The following is in features/python branch for now

  • The bindings are generated by SWIG
  • Testing is done by behave

SWIG was chosen because it is a fairly popular wrapper language for C/C++. It less verbose than bare-metal C API, and less painful to install than boost::python. Furthermore, it could be used to generate bindings to other languages as well (R, for instance). The interface files will reside in likelihood/python/. It seems CMake has difficulty generating dependency graphs for this tool, so it might mean we must stick to a single file.

behave provides a Behavior Driven Development interface for python. Since python is likely to provide the glue between mechanisms, likelihood, and optimizers, it makes sense to use this " Given A, When B happens, Then C results " testing framework. Currently, features are located in likelihood/python/features, and feature implementations in likelihood/python/features/steps. It is not yet in the cmake testing framework. It needs to be run from the commandline after installation.

> behave /path/to/dcprogs/likelihood/python/features/ 
Clone this wiki locally