Skip to content

Commit 3e0cd5c

Browse files
authored
Auto-import plotly integration (#96)
* Update __init__.py - note that plotly is an integration we support * Update __init__.py - plotly integration import test in main` __init__.py`
1 parent 0378db0 commit 3e0cd5c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

cebra/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@
3636
# silently fail for now
3737
pass
3838

39+
is_plotly_available = False
40+
try:
41+
from cebra.integrations.plotly import *
42+
43+
is_plotly_available = True
44+
except ImportError as e:
45+
# silently fail for now
46+
pass
47+
3948
from cebra.data.load import load as load_data
4049

4150
is_load_deeplabcut_available = False

cebra/integrations/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@
99
# Please see LICENSE.md for the full license document:
1010
# https://github.com/AdaptiveMotorControlLab/CEBRA/LICENSE.md
1111
#
12-
"""Integration of CEBRA into common machine learning libraries.
12+
"""Integration of CEBRA with common machine learning and visualization libraries.
1313
1414
This package contains a growing collection of interfaces to other Python packages.
1515
There is no clear limit (yet) of what can go into it. The current examples include
1616
interfaces (implemented or planned) to `scikit-learn <https://scikit-learn.org/stable/>`_,
1717
`streamlit <https://streamlit.io/>`_, `deeplabcut <http://www.mackenziemathislab.org/deeplabcut>`_,
18-
`matplotlib <https://matplotlib.org/>`_ and `threejs <https://threejs.org/>`_.
18+
`matplotlib <https://matplotlib.org/>`_ and `threejs <https://threejs.org/>`_ and `plotly <https://plotly.com/>`_.
1919
2020
Integrations can be used for data visualization, for providing easier interfaces to using CEBRA
2121
for a particular userbase, or any other helpful function that requires a dependency to a larger
2222
third-party package.
23-
24-
See our CEBRA `live demo <https://stes.io/c>`_.
2523
"""

0 commit comments

Comments
 (0)