Skip to content

Commit

Permalink
Merge pull request #69 from gnestor/no-running-ipython
Browse files Browse the repository at this point in the history
 Don't load ipython magics unless running ipython is available
  • Loading branch information
gnestor authored Jul 3, 2019
2 parents 8df7469 + 8db4815 commit 9c9f7ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions jupyterlab_omnisci/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@

__all__ = ["OmniSciVegaRenderer", "OmniSciSQLEditorRenderer"]

from IPython import get_ipython
from IPython.core.magic import register_cell_magic
from IPython.display import display

# Allow this module to be imported outside of an IPython context
# by making `register_cell_magic a no-op in that case.
try:
get_ipython() # noqa
except:
register_cell_magic = lambda x: x

class OmniSciVegaRenderer:
"""
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
url="https://github.com/Quansight/jupyterlab-omnisci", # Optional
packages=find_packages(),
install_requires=[
"jupyterlab>=1.0.0rc0",
"ibis-framework>=1.0.0",
"altair>=3.0.1",
"ipywidgets",
"vdom",
"pyyaml",
"altair==3.0.1",
"ipywidgets",
"ibis-framework==1.0.0",
"vega_datasets",
"jupyterlab==1.0.0a8"
"vega_datasets"
]
)

0 comments on commit 9c9f7ed

Please sign in to comment.