-
Notifications
You must be signed in to change notification settings - Fork 265
Closed
Description
In refactoring imageclasses.py
to distribute info into individual image classes (#323), I want to implement a simple function to check if scipy exists. I see that scipy checking is a bit varied across the code:
- Different files define their own function / decorators (
imageclasses.py
,tests/test_spm99analyze.py
,tests/test_image_load_save.py
,tests/test_image_api.py
, etc), using different methods to check (ImportError
,optional_package
, etc) - Some tests pass if scipy doesn't exist (even if required); other tests are skipped if scipy doesn't exist.
I suggest the following cleanup:
- Create a file
utils.py
, and addhave_scipy()
as a function. - Use this function everywhere (in image classes where scipy status determines if they're makeable, in tests to determine if they're skippable, and other conditional logic)
Posting here just to double-check before doing the work.
Metadata
Metadata
Assignees
Labels
No labels