-
Notifications
You must be signed in to change notification settings - Fork 26
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
BUG: Fix DWI shell extraction module import sorting #202
BUG: Fix DWI shell extraction module import sorting #202
Conversation
Fix DWI shell extraction module import sorting: sort the imported packages following the class hierarchy and library dependencies. Fixes: ``` loading: SlicerDMRI/SlicerDMRI/Testdata/3x3x3_13_b1000_b3000.nrrd Traceback (most recent call last): File "SlicerDMRI-build/inner-build/lib/Slicer-5.5/cli-modules/ExtractDWIShells.py", line 207, in <module> main() File "SlicerDMRI-build/inner-build/lib/Slicer-5.5/cli-modules/ExtractDWIShells.py", line 127, in main sn.ReadData(node_in) TypeError: ReadData argument 1: method requires a VTK object ``` raised for example at: https://github.com/SlicerDMRI/SlicerDMRI/actions/runs/6722459285/job/18270424711?pr=191#step:8:2631 Related discussion: Slicer/Slicer#6484
bf9450c
to
3742fb5
Compare
Rebase on |
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.
Instead of fixing the ordering on a few files, the complete code base should be updated using tooling like Ruff
.
To help with this, you may look at this pull request where I introduced the use of Ruff:
Additionally, a GitHub workflow for running pre-commit
should be added.
@jcfr this PR does not aim at fixing the style of imports; it aims at fixing the test. The fix was applied after reading Slicer/Slicer#6484 (comment), and Steve had also mentioned the import sorting in https://discourse.slicer.org/t/fixing-extension-testing-failures/32584/2 Applying I ignore how So, please, @jcfr consider the scope of the PR and re-consider the review. |
Thanks for clarifying. Since adjusting the order of the import is prone to error, I addressed the issue in Slicer itself. This change is superseded by: |
👍 hats off to the PR in 3D Slicer. Thank you. |
The Closing. Thanks @jcfr. |
Fix DWI shell extraction module import sorting: sort the imported packages following the class hierarchy and library dependencies.
Fixes:
raised for example at:
https://github.com/SlicerDMRI/SlicerDMRI/actions/runs/6722459285/job/18270424711?pr=191#step:8:2631
Related discussion:
Slicer/Slicer#6484