Skip to content

Commit

Permalink
Add __init__files for histogram and scatter viewers and add __all__ l…
Browse files Browse the repository at this point in the history
…ists.
  • Loading branch information
Carifio24 committed Apr 10, 2024
1 parent bbbe9d4 commit ea37a4f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions glue_plotly/viewers/histogram/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .layer_artist import * # noqa
from .viewer import * # noqa

Check warning on line 2 in glue_plotly/viewers/histogram/__init__.py

View check run for this annotation

Codecov / codecov/patch

glue_plotly/viewers/histogram/__init__.py#L1-L2

Added lines #L1 - L2 were not covered by tests
2 changes: 2 additions & 0 deletions glue_plotly/viewers/histogram/layer_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

from glue_plotly.common.histogram import traces_for_layer

__all__ = ["PlotlyHistogramLayerArtist"]

Check warning on line 10 in glue_plotly/viewers/histogram/layer_artist.py

View check run for this annotation

Codecov / codecov/patch

glue_plotly/viewers/histogram/layer_artist.py#L10

Added line #L10 was not covered by tests

SCALE_PROPERTIES = {'y_log', 'normalize', 'cumulative'}
HISTOGRAM_PROPERTIES = SCALE_PROPERTIES | {'layer', 'x_att', 'hist_x_min',
'hist_x_max', 'hist_n_bin', 'x_log'}
Expand Down
4 changes: 3 additions & 1 deletion glue_plotly/viewers/histogram/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Check warning on line 12 in glue_plotly/viewers/histogram/viewer.py

View check run for this annotation

Codecov / codecov/patch

glue_plotly/viewers/histogram/viewer.py#L12

Added line #L12 was not covered by tests


@viewer_registry("plotly_histogram")
class PlotlyHistogramView(PlotlyBaseView):

Expand Down
2 changes: 2 additions & 0 deletions glue_plotly/viewers/scatter/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .layer_artist import * # noqa
from .viewer import * # noqa

Check warning on line 2 in glue_plotly/viewers/scatter/__init__.py

View check run for this annotation

Codecov / codecov/patch

glue_plotly/viewers/scatter/__init__.py#L1-L2

Added lines #L1 - L2 were not covered by tests
3 changes: 3 additions & 0 deletions glue_plotly/viewers/scatter/layer_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from plotly.graph_objs import Scatter, Scatterpolar


__all__ = ["PlotlyScatterLayerArtist"]

Check warning on line 16 in glue_plotly/viewers/scatter/layer_artist.py

View check run for this annotation

Codecov / codecov/patch

glue_plotly/viewers/scatter/layer_artist.py#L16

Added line #L16 was not covered by tests


CMAP_PROPERTIES = {"cmap_mode", "cmap_att", "cmap_vmin", "cmap_vmax", "cmap"}
MARKER_PROPERTIES = {
"size_mode",
Expand Down
3 changes: 3 additions & 0 deletions glue_plotly/viewers/scatter/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from glue_plotly.viewers import PlotlyBaseView


__all__ = ["PlotlyScatterView"]

Check warning on line 16 in glue_plotly/viewers/scatter/viewer.py

View check run for this annotation

Codecov / codecov/patch

glue_plotly/viewers/scatter/viewer.py#L16

Added line #L16 was not covered by tests


@viewer_registry("plotly_scatter")
class PlotlyScatterView(PlotlyBaseView):

Expand Down

0 comments on commit ea37a4f

Please sign in to comment.