whitematteranalysis
whitematteranalysis copied to clipboard
Refactor `filter` and `laterality` modules: `joblib` is not optional
The filter
and laterality
modules try to use joblib
modules conditionally if importing it is successful:
https://github.com/SlicerDMRI/whitematteranalysis/blob/ac6040fcf77ac132d0fc4a071af9d80240f7f577/whitematteranalysis/filter.py#L32
https://github.com/SlicerDMRI/whitematteranalysis/blob/ac6040fcf77ac132d0fc4a071af9d80240f7f577/whitematteranalysis/laterality.py#L35
However, joblib
is a required dependency:,
https://github.com/SlicerDMRI/whitematteranalysis/blob/ac6040fcf77ac132d0fc4a071af9d80240f7f577/requirements.txt#L1
so the if/else
blocks in the above modules are not necessary, e.g. (there are multiple hits):
https://github.com/SlicerDMRI/whitematteranalysis/blob/ac6040fcf77ac132d0fc4a071af9d80240f7f577/whitematteranalysis/filter.py#L610
https://github.com/SlicerDMRI/whitematteranalysis/blob/ac6040fcf77ac132d0fc4a071af9d80240f7f577/whitematteranalysis/laterality.py#L167
Removing the conditional blocks may require some work, as the else
blocks seem to contain a more complex/different logic with respect to the counterpart using the parallelization capabilities.