xraypy/feff85exafs — pull request #14 by bruceravel (2014-09-03 17:58:18+00:00)
Title: implement unit testing, json file interchange

This is a big pull request that implements two things:

1. A unit testing framework
2. Use of json as the intermediate i/o format

The unit testing framework is designed to work as automated testing via [Nose](https://nose.readthedocs.org/en/latest/) 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](https://github.com/bruceravel/feff85exafs/blob/master/t/materials/README.md).

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](https://github.com/jacobwilliams/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.