SlicerDMRI / whitematteranalysis

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

ENH: Improve importing optional packages and modules #194

Closed jhlegarreta closed 1 year ago

jhlegarreta commented 1 year ago

Improve importing optional packages and modules:

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

jhlegarreta commented 1 year 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 1 year ago

Closed inadvertently. Opened PR #195.