SCCAF / sccaf

Single-Cell Clustering Assessment Framework
MIT License
85 stars 18 forks source link

many SCCAF methods can only be used from inside iPython/Jupyter notebooks #3

Closed pcm32 closed 4 years ago

pcm32 commented 5 years ago

This clearly reduces the usability of the tool. Executing something like from SCCAF import * on a pure python environment produces:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/pmoreno/venvs/sccaf.sccaf/lib/python3.6/site-packages/SCCAF/__init__.py", line 1549, in <module>
    plotly.offline.init_notebook_mode(connected=True)
  File "/Users/pmoreno/venvs/sccaf.sccaf/lib/python3.6/site-packages/plotly/offline/offline.py", line 272, in init_notebook_mode
    raise ImportError('`iplot` can only run inside an IPython Notebook.')
ImportError: `iplot` can only run inside an IPython Notebook.

there should be some conditionality that detects whether this is being run inside iPython notebooks or not to make use of iplot or else an alternative plotting device.

chichaumiau commented 4 years ago

we do not need to plot in command line!

pcm32 commented 4 years ago

Yes, I have fixed this now by moving around some imports into methods that require them.