From ea37a4fc6ce74615460d9abbf655bd2b74ecf9dd Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Wed, 10 Apr 2024 15:51:03 -0400 Subject: [PATCH] Add __init__files for histogram and scatter viewers and add __all__ lists. --- glue_plotly/viewers/histogram/__init__.py | 2 ++ glue_plotly/viewers/histogram/layer_artist.py | 2 ++ glue_plotly/viewers/histogram/viewer.py | 4 +++- glue_plotly/viewers/scatter/__init__.py | 2 ++ glue_plotly/viewers/scatter/layer_artist.py | 3 +++ glue_plotly/viewers/scatter/viewer.py | 3 +++ 6 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 glue_plotly/viewers/histogram/__init__.py create mode 100644 glue_plotly/viewers/scatter/__init__.py diff --git a/glue_plotly/viewers/histogram/__init__.py b/glue_plotly/viewers/histogram/__init__.py new file mode 100644 index 0000000..f2efc8a --- /dev/null +++ b/glue_plotly/viewers/histogram/__init__.py @@ -0,0 +1,2 @@ +from .layer_artist import * # noqa +from .viewer import * # noqa diff --git a/glue_plotly/viewers/histogram/layer_artist.py b/glue_plotly/viewers/histogram/layer_artist.py index d36db34..1fcd345 100644 --- a/glue_plotly/viewers/histogram/layer_artist.py +++ b/glue_plotly/viewers/histogram/layer_artist.py @@ -7,6 +7,8 @@ from glue_plotly.common.histogram import traces_for_layer +__all__ = ["PlotlyHistogramLayerArtist"] + SCALE_PROPERTIES = {'y_log', 'normalize', 'cumulative'} HISTOGRAM_PROPERTIES = SCALE_PROPERTIES | {'layer', 'x_att', 'hist_x_min', 'hist_x_max', 'hist_n_bin', 'x_log'} diff --git a/glue_plotly/viewers/histogram/viewer.py b/glue_plotly/viewers/histogram/viewer.py index db86a50..1d617e7 100644 --- a/glue_plotly/viewers/histogram/viewer.py +++ b/glue_plotly/viewers/histogram/viewer.py @@ -4,12 +4,14 @@ from glue_plotly.viewers import PlotlyBaseView from glue_plotly.viewers.histogram.layer_artist import PlotlyHistogramLayerArtist - from glue_jupyter.registries import viewer_registry from glue_jupyter.common.state_widgets.layer_histogram import HistogramLayerStateWidget from glue_jupyter.common.state_widgets.viewer_histogram import HistogramViewerStateWidget +__all__ = ["PlotlyHistogramView"] + + @viewer_registry("plotly_histogram") class PlotlyHistogramView(PlotlyBaseView): diff --git a/glue_plotly/viewers/scatter/__init__.py b/glue_plotly/viewers/scatter/__init__.py new file mode 100644 index 0000000..f2efc8a --- /dev/null +++ b/glue_plotly/viewers/scatter/__init__.py @@ -0,0 +1,2 @@ +from .layer_artist import * # noqa +from .viewer import * # noqa diff --git a/glue_plotly/viewers/scatter/layer_artist.py b/glue_plotly/viewers/scatter/layer_artist.py index 793f633..753c080 100644 --- a/glue_plotly/viewers/scatter/layer_artist.py +++ b/glue_plotly/viewers/scatter/layer_artist.py @@ -13,6 +13,9 @@ from plotly.graph_objs import Scatter, Scatterpolar +__all__ = ["PlotlyScatterLayerArtist"] + + CMAP_PROPERTIES = {"cmap_mode", "cmap_att", "cmap_vmin", "cmap_vmax", "cmap"} MARKER_PROPERTIES = { "size_mode", diff --git a/glue_plotly/viewers/scatter/viewer.py b/glue_plotly/viewers/scatter/viewer.py index 527cc38..b1e0da7 100644 --- a/glue_plotly/viewers/scatter/viewer.py +++ b/glue_plotly/viewers/scatter/viewer.py @@ -13,6 +13,9 @@ from glue_plotly.viewers import PlotlyBaseView +__all__ = ["PlotlyScatterView"] + + @viewer_registry("plotly_scatter") class PlotlyScatterView(PlotlyBaseView):