-
Notifications
You must be signed in to change notification settings - Fork 429
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
NF: add SH basis conversion between dipy and mrtrix3 #3008
NF: add SH basis conversion between dipy and mrtrix3 #3008
Conversation
Hello @ebrahimebrahim, Thank you for updating ! Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated at 2024-01-11 19:18:39 UTC |
(these are URLs so it will have to violate pep8) |
Hi @ebrahimebrahim, Thank you doing this! concerning the violating pep8, just add concerning the workflow, you need
|
I tried out the CLI workflow on an example case. It seems to be all set. Thanks for explaining workflows! |
Thanks for doing this @ebrahimebrahim. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3008 +/- ##
==========================================
+ Coverage 82.11% 82.12% +0.01%
==========================================
Files 146 146
Lines 20495 20513 +18
Branches 3268 3270 +2
==========================================
+ Hits 16829 16846 +17
- Misses 2855 2856 +1
Partials 811 811
|
Hmm the code coverage thing is not happy with me because of "patch" percent coverage. Maybe it does not count mock objects? |
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.
Hi @ebrahimebrahim,
No worries for codecov. you are ok following this: https://app.codecov.io/gh/dipy/dipy/pull/3008/commits
see below my comment.
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.
Thank you for the update @ebrahimebrahim.
See below for my comment.
is there any additional comment concerning this PR? @arokem?
Any idea why the windows tests are failing after using FAILED workflows/tests/test_io.py::test_convert_sh_flow - NotADirectoryError: [WinError 267] The directory name is invalid: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp4f8uynzy\\sh_coeff_img_converted.nii' |
Interesting.... no idea, I need to connect to Windows machine and see what's going on. Unfortunately, I can do it only next week... |
Thanks, and no rush at all! I appreciate the testing effort as I don't have easy access to a windows workstation for a while. There may be something I've misunderstood about workflows and |
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.
Hi @ebrahimebrahim,
Happy New Year ! sorry for the late feedback see below my comment. this should fix your issue for now.
Also, Can you update this line in the documentation: https://github.com/dipy/dipy/blob/master/doc/recipes.rst?plain=1#L35-L36 Thank you |
0c44261
to
a2fbd4b
Compare
This should be ready for another look. It is rebased to master. If I understand the output correctly from the two failing checks, I think in both cases it's not something related to this 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.
Hi @ebrahimebrahim,
Thank you again for this. it looks good to me.
I will wait until Friday to see if we have a feedback from @jhlegarreta or @arokem or someone else. If not, I will go ahead and merge it.
Thank you for this work.
ps: during this time, if you could fix the small docstring issue, it would be great. Thanks!
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.
I have a style comment. Not a show-stopper, but would be nice to address as Serge has also requested a change.
Thanks for doing this @ebrahimebrahim.
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.
IMO, all commits in this PR should be squashed and all meaningful changes be explained in that single commit as this is a new feature: e.g. without commits 035858f and 58d6cba we would be introducing commits that do not work/do not pass tests in the history.
Would reduce the number of commits in the history, and thus make it less complex and save time when reading through it.
Concerning the squash, I agree with @jhlegarreta, but it is a bonus, I think it is fine if you can not do it. |
616a781
to
f610ced
Compare
Comments addressed and commits squashed |
Great, thanks! waiting for the CI's, then we can merge |
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.
I am not going to oppose to merging this, but the commit message is not faithful to the change or NF: it has simply used the previous commit message subjects. Thus, e.g. saying that .gz
was added to the .nii
extensions, that long line or URL PEP8 is bypassed, that the function naming is improved or that os.path
was used instead of pathlib
is now meaningless. This is now a single commit, and readers are interested in the final result or added feature; the intermediate steps or process does not add meaningful information to the commit history; it is only relevant to the GitHub conversation.
So a self-contained commit message could be along the following lines:
NF: Add DIPY to MRtrix3 SH basis conversion capabilities
Add legacy descoteaux07 (DIPY) and tournier07 (MRtrix3) SH basis conversion capabilities.
Add the corresponding tests.
Add and test the corresponding workflow.
Document the feature in the DIPY how-to recipes file.
Hope this makes sense.
Add legacy descoteaux07 (DIPY) and tournier07 (MRtrix3) SH basis conversion capabilities. Add the corresponding tests. Add and test the corresponding workflow. Document the feature in the DIPY how-to recipes file.
f610ced
to
64cdb0d
Compare
Thanks, I agree with your reasoning and like your rephrasing. I copied your message :) |
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 doing this and for addressing the comments @ebrahimebrahim 💯.
macOS VIZ failure is unrelated. Merging. |
Close #2993
This adds a function
convert_sh_descoteaux_tournier
to convert SH representations between DIPY and MRtrix3.(There was also a plan to add something to add an associated workflow to
dipy.workflows.io
, but I don't feel I understand the workflow concept well enough to add that. Not doing it now.)