-
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
Add section to reports that show system info, tedana call and version #747
Conversation
This PR is pretty much ready for review but I would like to wait until #696 is merged to make some final changes for the sake of coherence. |
@eurunuela this looks good but there's actually one potential downfall: if you call |
I would be pretty happy with just a list/table/dict of parameters, rather than a reconstructed CLI call. Just my personal preference though. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #747 +/- ##
==========================================
+ Coverage 88.86% 89.00% +0.14%
==========================================
Files 27 27
Lines 3368 3411 +43
Branches 618 622 +4
==========================================
+ Hits 2993 3036 +43
Misses 227 227
Partials 148 148
☔ View full report in Codecov by Sentry. |
I'm not entirely sure we want to display it CLI-style instead of printing a dict of parameters, but I'm guessing that it's easier to make pretty if we do it CLI-style and it should still be plenty legible. Plus, people could just copy and paste it to replicate. |
I believe the way I put it it won't be exactly the same as the CLI but it should be pretty close. |
Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
Here's what it currently looks like for the four-echo test: I really like it. I see that there are some issues with unset arguments (e.g., One minor thing I'd love to see is a section title for the methods description, so that it's clear what the boundary is between command/system info and the report boilerplate. |
Hey @tsalo @handwerkerd, you might have missed the notification for this one. This PR is ready for review now. Let me know if you would make any changes. |
Could you copy over the changes to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @eurunuela! I like the formatting of the system info, but I do think the command formatting could be improved. That said, we can always tweak the style in a later PR.
One unfortunate thing is that the "command" shows a test script when one is used. See the "command" for the three-echo test:
tedana --log-cli-level=INFO --cov-append --cov-report term-missing --cov=tedana -k test_integration_three_echo tedana/tests/test_integration.py
I don't think there's a way to get around this easily. It's probably just a limitation we'll have to acknowledge.
Regardless, everything looks really awesome.
How about this new design for the code block @tsalo? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new design looks great! Thanks @eurunuela!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great.
I'm approving, but I suggested one small change that you can revise or ignore.
One additional thing to consider is to add the version numbers of python modules that are most likely to affect results: mapca, nilearn, scipy, numpy, pandas, sklearn
tedana/workflows/tedana.py
Outdated
@@ -495,10 +501,28 @@ def tedana_workflow( | |||
verbose=verbose, | |||
) | |||
|
|||
# Save command into sh file, if the command-line interface was used | |||
# TODO: use io_generator to save command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion. We are currently creating several files outside of the io_generator: report, references, & tedana_.log. Since this is another file being created outside of the io_generator, it would fit better near the creation of these other file names (after line 473) instead of after the creation of the io_generator. (longer-term, we might want all of these to get added to the io_generator, but that's not critical)
Also, if this is merged before #963 then add the prefix
to tedana_call.sh
in #963
I have moved the tedana command creation closer to the report, references and log creation.
I would leave the addition of these module versions for a future PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #650 and #687 .
Changes proposed in this pull request: