This is a big pull request that implements two things:
A unit testing framework
Use of json as the intermediate i/o format
The unit testing framework is designed to work as automated testing via Nose or interactively at the Larch command line. A suite of test materials is provided. All the tests involve comparing a test run of Feff against a baseline calculation made using Feff as it was prior to cac0f8c90749ce52581a658c5a6c8ae144cc2211. The concept is that changes made to Feff should leave the output unchanged. The tests involve things comparisons between the columns of the feffNNNN.dat files or between various numbers calculated by Feff.
Details about the use of the unit tests, either via Nose or from the Larch command line, can be found here.
Because I needed a real use case for the test suite, I wanted to make a change to Feff that was substantial enough that it could genuinely break thinigs, but no so big that it would be a challenge all by itself to implement. What I chose was to replace all the intermediate files (modN.inp, global.dat, geom.dat, and so on) with json files. To do this, I figured out how to compile Feff against json-fortran. This is not without problems, specifically, json-fortran is written using Fortran 2003, uses Fortran objects/structures, and only compiles with specific versions of specific Fortran compilers. In the end, it may not be a great choice, but for the moment it works and it served the purpose of testing the testing framework.
I also cleaned up some additional intermediate files that are for use with Feff features not included in feff85exafs.
This is a big pull request that implements two things:
The unit testing framework is designed to work as automated testing via Nose or interactively at the Larch command line. A suite of test materials is provided. All the tests involve comparing a test run of Feff against a baseline calculation made using Feff as it was prior to cac0f8c90749ce52581a658c5a6c8ae144cc2211. The concept is that changes made to Feff should leave the output unchanged. The tests involve things comparisons between the columns of the
feffNNNN.dat
files or between various numbers calculated by Feff.Details about the use of the unit tests, either via Nose or from the Larch command line, can be found here.
Because I needed a real use case for the test suite, I wanted to make a change to Feff that was substantial enough that it could genuinely break thinigs, but no so big that it would be a challenge all by itself to implement. What I chose was to replace all the intermediate files (
modN.inp
,global.dat
,geom.dat
, and so on) with json files. To do this, I figured out how to compile Feff against json-fortran. This is not without problems, specifically, json-fortran is written using Fortran 2003, uses Fortran objects/structures, and only compiles with specific versions of specific Fortran compilers. In the end, it may not be a great choice, but for the moment it works and it served the purpose of testing the testing framework.I also cleaned up some additional intermediate files that are for use with Feff features not included in feff85exafs.