gregorbj / Archive-VisionEval

VisionEval Model System and Framework (formerly RSPM Framework)
Apache License 2.0
28 stars 19 forks source link

Travis tests fail with module code which supports 'soft' references for module calls and data #235

Closed gregorbj closed 5 years ago

gregorbj commented 5 years ago

Background: I changed the visioneval framework code to enable Call spec to refer to only module name instead of package::module and likewise to enable a module to access a dataset from another VE package by referring only to the dataset name. This is an important feature for allowing alternate packages to be used in a model (Issue #191). To implement this, the run_parameter.json, file must have a RequiredVEPackages parameter which identifies all the VE packages used by a model in order for the code to find the package from which to load a called module or data.

Problem: The code checks that all the required packages are installed. This is a problem for the Travis test script because each package is tested separately so the checking for installed packages fails.

gregorbj commented 5 years ago

Solved. The problem was that the 'testModule' function used the 'RequiredVEPackages' parameter in the 'run_parameters.json' file to build the correspondence tables (data frames) identifying the source packages of modules and datasets. The code checks that all the required packages are installed. In the Travis module tests they will not be and so the error.

Solved this by adding an argument to 'testModule' called 'RequiredPackages' which is used instead of the 'RequiredVEPackages' parameter to identify the packages that the module needs access to to run. Since these are also identified in the Travis script and are installed before the module is tested, the tests run without problems.

I modified all the test code to use the 'RequiredPackages' argument where needed. The code in the 've_rspm_state' branch passes all the Travis tests now.