-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from bernardosabatinilab/dev
adding importing tests
- Loading branch information
Showing
2 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import logging | ||
import importlib | ||
|
||
def test_import(): | ||
|
||
repo_packs = [ | ||
'pandas', | ||
'numpy', | ||
'scipy', | ||
'sklearn', | ||
'matplotlib', | ||
'seaborn', | ||
'datajoint', | ||
'tensorflow', | ||
'pymatreader', | ||
'tomli', | ||
'yaml', | ||
'tdt', | ||
'deeplabcut', | ||
] | ||
|
||
for pack in repo_packs: | ||
try: | ||
importlib.import_module(pack) | ||
except ImportError: | ||
logging.warning(f'Could not import {pack}.') | ||
continue | ||
|
||
|
||
def test_workflow_packages(): | ||
try: | ||
importlib.import_module('workflow.utils.demodulation') | ||
except ImportError: | ||
logging.warning('Could not import demod from photometry pipeline.') | ||
pass | ||
|
||
def test_elements_pack(): | ||
element_list = [ | ||
'element_array_ephys', | ||
'element_deeplabcut', | ||
'element_interface', | ||
'element_calcium_imaging', | ||
'element_animal', | ||
'element_lab', | ||
'element_session', | ||
'element_event', | ||
] | ||
|
||
for element in element_list: | ||
try: | ||
importlib.import_module(element) | ||
except ImportError: | ||
logging.warning('Could not import {element}.') | ||
pass | ||
|