Skip to content

Commit

Permalink
check version of umap
Browse files Browse the repository at this point in the history
  • Loading branch information
Koncopd committed May 8, 2019
1 parent 5b1208d commit 9eec853
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scanpy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def check_versions():
'Currently, Python 3.5 leads to a bug in `tl.marker_gene_overlap` '
'and we might stop supporting it in the future.')

import anndata
import anndata, umap
# NOTE: pytest does not correctly retrieve anndata's version? why?
# use the following hack...
if anndata.__version__ != '0+unknown':
Expand All @@ -40,6 +40,10 @@ def check_versions():
'Run `pip install anndata -U --no-deps`.'
.format(__version__, anndata.__version__))

if umap.__version__ < LooseVersion('0.3.0'):
from . import __version__
raise ImportError('Scanpy {} needs umap version >=0.3.0, not {}.'
.format(__version__, umap.__version__))

def getdoc(c_or_f: Union[Callable, type]) -> Optional[str]:
if getattr(c_or_f, '__doc__', None) is None:
Expand Down

0 comments on commit 9eec853

Please sign in to comment.