asoroosh/DVARS

Backwards compatibility tests.

JoeZiminski opened this issue · 0 comments

Before starting linting it will be nice to have some backward compatibility tests. Many methods work with the .nii files and so the easiest thing to do is to store these on a free GIN repository or somewhere else convenient and download them at runtime during tests.

Then dvars can be run on these NIFTI's, the output stored somewhere as 'canonical' and then all future tests can be check the results against this output. We could also run this in MATLAB and then matlab / octave / python can be tested against each other.

It will be necessary to check all paths through the code are tested. ATM I have seen the below (let me know if I've missed anything). Basically we just write a script to DL the NIFTI then run these functions with different arguments, storing all the outputs somewhere. Do you have some NIFTI files we can use for the tests?

CleanNIFTI()

  • test matrix vs. .nii input

  • check orig scl and norm is not changed when copy=True and input is matrix

  • different scland norm values

  • demean on / off

  • SaveMe2txt()

SaveMe2Nifti()

  • different Dict2Save dimensions

DSE_Calc

  • slc, norm, demean are passed straight to CleanNIFTI() so could skip test here
  • Writing the DSE image with SaveMe2Nifti()
  • verbose tag

DVARS_Calc

  • We can try switching all arguments once just to check changes propagated