-
Notifications
You must be signed in to change notification settings - Fork 95
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
Implement checksums for CircleCI integration tests #59
Comments
Eeeeeexcellent - I’m glad that’s helpful! I’m tagging @Islast because she did all that work so she could potentially pass on any advice etc ✨ |
I'm thrilled that you like our method @rmarkello 😄 |
This point is well met, @Islast! Thank you so much for raising it (and thanks for pinging her in, @KirstieJane!). While I'm hopeful that with testing occurring inside a Docker container, things will be more-or-less consistent from run-to-run—enough so to at least give this a shot. Indeed, in some respects being made aware of dependency changes or alterations to output formats may be a feature of using the hashing approach, not a bug! |
Very cool. We have a similar testing strategy in NIAK and this idea will help a lot. BTW in our case, with proper seeding and a container we exactly replicate outputs. |
This is a great idea, @rmarkello ! I think I'd like to wait on implementing it until we resolve #14 (which is yielding issues in #18), since the ideal workflow will allow developers to test locally by just downloading a json of the hash values, rather than the current 2GB of dropbox data. This is definitely something for our |
Lately we've been making a bunch of breaking changes, so we've been fine with just checking for the existence of specific output files. However, once the final breaking PRs (#164 and #152) are merged in, I want to work on refactoring a lot of the more confusing code (e.g., |
@tsalo @KirstieJane is this formally going to be part of the GSoC student's work if accepted? |
If they're able to do it, then definitely. It will have to come after unit tests though (since they're the low-hanging fruit). |
Oh, no, totally, unit testing is higher priority. I'm just trying to make sure that there's a path forward for this issue. It seems like we should just see if the student can get to it this summer, and if not then we'll have to revisit it ourselves. Seem okay? |
Just a quick note that recent nibabel now has a |
Added to the sprint agenda. |
Is this still being considered @rmarkello ? I didn't see it in #418 ? |
Still being considered, for sure! We're going to need to add regression tests to actually compare the outputs of the integration tests to pre-generated data, but it doesn't (didn't) make sense to do that when so many PRs were going to totally mess with the actual data generation! All our tests would consistently be failing 😢 Once #435, #436, and @handwerkerd's eventual PR to overhaul the decision tree are integrated we can do this. In the interim I can open a PR with an example of what this would look like, though? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to tedana:tada: ! |
@rmarkello do you still think this is workable? |
I do, especially if we use |
Forgive me if this is incorrect, but doesn't nib-diff require that both files be in memory? In other words, don't you still have to download or upload a large amount of data to use it? |
You're totally right, they would both have to be in memory. I think checksums are just gonna be a real pain with floating point data, though, so I think we need to do something that's a bit more As stands, we are (or used tobe? at one point we definitely were) downloading the comparison output data on CircleCI every time (and, if I remember correctly, just not using it)! |
We're definitely uploading comparison output to CircleCI every time, and not using it. I thought the point of the checksums was to reduce the download/upload need, but I forgot about the upload of artifacts to CI rather than just checksums. |
At this point I'm definitely not recommending checksums! The benefit of Finally, it's worth noting we don't have to call |
I'm following this now. I think we'd discussed it briefly at the hackathon, but unfortunately my memory is trash and I didn't write it down so unfortunately we're having this conversation a second time. 🤦♂️ |
It seems like we've converged on |
The current mechanism for integration testing with CircleCI is to run the full
tedana
pipeline and then compare the content of the output files to previously generated files usingnp.allclose
. This procedure ensures that the results of thetedana
pipeline haven't changed in any appreciable way, which is critical as refactoring and updating occurs.I was recently inspired by @WhitakerLab's BrainNetworksInPython repository, however, which uses Python's
hashlib
library to implement checksum comparisons of their generated outputs. I think this procedure could be applied with great success to thetedana
repository!Rather than having CircleCI re-download the previously generated outputs from Dropbox each time, they could be hashed once and kept in a JSON file in the
tests/data
folder. The outputs generated during testing could then be hashed and compared against this reference. This would also make testing locally a lot easier (no need to download the 1.9GB output directory!).The text was updated successfully, but these errors were encountered: