SlicerDMRI / whitematteranalysis

White matter tractography clustering and more...
https://dmri.slicer.org/whitematteranalysis/
Other
65 stars 32 forks source link

ENH: Improve importing optional packages and modules #194

Closed jhlegarreta closed 8 months ago

jhlegarreta commented 8 months ago

Improve importing optional packages and modules:

Prefer using all lowercases for the flags that contain the package/module import success value.

jhlegarreta commented 8 months ago

matplotlib is in reality a required package: https://github.com/SlicerDMRI/whitematteranalysis/blob/master/requirements.txt#L2, so these conditional imports may be made non-optional.

Maybe this was done for cases where there is no display system, but this can be achieved otherwise.

Anyways, maybe we can keep the logic in this PR and remove the optional package import attempt and make it non-optional in a future PR as other aspects get improved.

jhlegarreta commented 8 months ago

Closed inadvertently. Opened PR #195.