Skip to content

Commit

Permalink
[TST] Expand parameters tested in integration tests (#502)
Browse files Browse the repository at this point in the history
* Add args to integration tests.

* Fix import error.

* Fix 5-echo test.

* Move rerun into another directory.

* Fix outputs.

* Fix...

* Dummy commit.
  • Loading branch information
tsalo authored Jan 7, 2020
1 parent 4a56876 commit ca177d5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
3 changes: 0 additions & 3 deletions tedana/tests/data/cornell_three_echo_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ figures/comp_032.png
figures/comp_033.png
figures/comp_034.png
figures/comp_035.png
figures/comp_036.png
figures/comp_037.png
figures/comp_038.png
dn_ts_OC.nii.gz
feats_OC2.nii.gz
figures
Expand Down
10 changes: 9 additions & 1 deletion tedana/tests/data/nih_five_echo_outputs_verbose.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
T1gs.nii.gz
adaptive_mask.nii.gz
betas_OC.nii.gz
betas_hik_OC.nii.gz
betas_hik_OC_T1c.nii.gz
dn_ts_OC.nii.gz
dn_ts_OC_T1c.nii.gz
dn_ts_e1.nii.gz
dn_ts_e2.nii.gz
dn_ts_e3.nii.gz
dn_ts_e4.nii.gz
dn_ts_e5.nii.gz
feats_OC2.nii.gz
glsig.1D
hik_ts_OC.nii.gz
hik_ts_OC_T1c.nii.gz
hik_ts_e1.nii.gz
hik_ts_e2.nii.gz
hik_ts_e3.nii.gz
Expand All @@ -27,6 +32,7 @@ meica_R2_pred.nii.gz
meica_S0_pred.nii.gz
meica_betas_catd.nii.gz
meica_metric_weights.nii.gz
meica_mix_T1c.1D
mepca_R2_pred.nii.gz
mepca_S0_pred.nii.gz
mepca_betas_catd.nii.gz
Expand All @@ -37,10 +43,13 @@ pca_mixing.tsv
report.txt
s0v.nii.gz
s0vG.nii.gz
sphis_hik.nii.gz
t2sv.nii.gz
t2svG.nii.gz
ts_OC.nii.gz
ts_OC_whitened.nii.gz
tsoc_nogs.nii.gz
tsoc_orig.nii.gz
figures
figures/Component_Overview.png
figures/Kappa_vs_Rho_Scatter.png
Expand Down Expand Up @@ -108,4 +117,3 @@ figures/comp_059.png
figures/comp_060.png
figures/comp_061.png
figures/comp_062.png
figures/comp_063.png
17 changes: 15 additions & 2 deletions tedana/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def test_integration_five_echo(skip_integration):
tes=[15.4, 29.7, 44.0, 58.3, 72.6],
out_dir=out_dir,
tedpca='mdl',
debug=True, verbose=True)
gscontrol=['gsr', 't1c'],
png_cmap='bone',
debug=True,
verbose=True)

# Just a check on the component table pending a unit test of load_comptable
comptable = os.path.join(out_dir, 'ica_decomposition.json')
Expand Down Expand Up @@ -140,6 +143,7 @@ def test_integration_three_echo(skip_integration):
if skip_integration:
pytest.skip('Skipping three-echo integration test')
out_dir = '/tmp/data/three-echo/TED.three-echo'
out_dir2 = '/tmp/data/three-echo/TED.three-echo-rerun'
if os.path.exists(out_dir):
shutil.rmtree(out_dir)

Expand All @@ -151,7 +155,16 @@ def test_integration_three_echo(skip_integration):
tes=[14.5, 38.5, 62.5],
out_dir=out_dir,
low_mem=True,
tedpca='kundu')
tedpca='kundu-stabilize')

# test rerunning the workflow
tedana_workflow(
data='/tmp/data/three-echo/three_echo_Cornell_zcat.nii.gz',
tes=[14.5, 38.5, 62.5],
out_dir=out_dir2,
mixm=os.path.join(out_dir, 'ica_mixing.tsv'),
ctab=os.path.join(out_dir, 'ica_decomposition.json'),
no_png=True)

# compare the generated output files
fn = resource_filename('tedana',
Expand Down

0 comments on commit ca177d5

Please sign in to comment.