Skip to content

Commit

Permalink
Auto-import plotly integration (#96)
Browse files Browse the repository at this point in the history
* Update __init__.py

- note that plotly is an integration we support

* Update __init__.py

- plotly integration import test in main` __init__.py`
  • Loading branch information
MMathisLab authored Oct 29, 2023
1 parent 0378db0 commit 3e0cd5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 9 additions & 0 deletions cebra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@
# silently fail for now
pass

is_plotly_available = False
try:
from cebra.integrations.plotly import *

is_plotly_available = True
except ImportError as e:
# silently fail for now
pass

from cebra.data.load import load as load_data

is_load_deeplabcut_available = False
Expand Down
6 changes: 2 additions & 4 deletions cebra/integrations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@
# Please see LICENSE.md for the full license document:
# https://github.com/AdaptiveMotorControlLab/CEBRA/LICENSE.md
#
"""Integration of CEBRA into common machine learning libraries.
"""Integration of CEBRA with common machine learning and visualization libraries.
This package contains a growing collection of interfaces to other Python packages.
There is no clear limit (yet) of what can go into it. The current examples include
interfaces (implemented or planned) to `scikit-learn <https://scikit-learn.org/stable/>`_,
`streamlit <https://streamlit.io/>`_, `deeplabcut <http://www.mackenziemathislab.org/deeplabcut>`_,
`matplotlib <https://matplotlib.org/>`_ and `threejs <https://threejs.org/>`_.
`matplotlib <https://matplotlib.org/>`_ and `threejs <https://threejs.org/>`_ and `plotly <https://plotly.com/>`_.
Integrations can be used for data visualization, for providing easier interfaces to using CEBRA
for a particular userbase, or any other helpful function that requires a dependency to a larger
third-party package.
See our CEBRA `live demo <https://stes.io/c>`_.
"""

0 comments on commit 3e0cd5c

Please sign in to comment.