-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding tests. simplifying getfbounds #1
Conversation
@katielamar I think everything is being tested now and all tests are passing. Happy to discuss here or by voice. |
Thanks! I’ll review the changes made tonight and let you know if I have any questions. We can probably just discuss on here if that’s easier. |
@handwerkerd this looks great. I think I've got a better idea on how to write the tests now. I think I was focused more on making sure the output fstats matched a ground truth rather than doing some sanity checks such as making sure fstat values using an echo_dof < # of good echoes is smaller than when using # of good echoes as the degree of freedom. My only suggestion is regarding the comment lines on the fstat test. I think they could be a bit clearer if we changed it to: line 231: Let me know what you think and I can merge/make the changes. |
I just fixed the comments (keeping them <100 characters to comply with the style guide). The one thing I can't do is run this on actual EPTI data so, once you know this works on your data, you can merge & then I'll review & approve. FWIW, I prefer tests that specify precise outputs and I try to include such tests in everything new I add to tedana, but the project was started using more smoke tests that just make sure things ran as expected without crashing and other tests that verify errors happen when expected. If you look at https://github.com/ME-ICA/tedana/blob/main/tedana/tests/test_external_metrics.py, which I wrote from scratch when we added the external metrics options, I'm explicitly testing the outputs of key functions. I'd love to see more of this going forward, but it's a lot of thankless work to retroactively add specifications to pre-existing tests. I try to improve older tests when I have reasons to interact with them. The test for |
Sounds good. I'll go ahead and run a few tests with my data to verify everything looks okay. It will take about a day to run everything. I'll merge after that. |
@handwerkerd , I just realized that some tests aren't passing anymore due to the assert in the fstat maps test requiring that
instead of:
I updated the code and Im rerunning the tests locally. Once they are passing Ill push. |
@katielamar I'm still working on this, so don't merge yet, but I figured I'd share.
Once nice thing about writing tests is that I notice other issues. In trying to create the test, I realized that
getfbounds
and a few functions that just called that were being passedn_echos
andecho_dof
, & using only one for the exact same thing. Writing a test for how to handlen_echos
vsecho_dof
didn't make any sense. Since this is a statistical function and the parameter for the statistic is the DOF, i decided to replacen_echoes
withecho_dof
in all those functions. In the functions that call it,echo_dof=n_echoes
whenecho_dof==None
.I still have at least one more test to add so I'm setting this as a draft PR.