Skip to content

Commit

Permalink
Add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
daavoo committed Sep 30, 2022
1 parent d7545f8 commit 677b725
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dvc_render/plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@


class PlotlyRenderer(Renderer):
"""Renderer using plotly.js mimicking VegaRenderer"""

TYPE = "plotly"

DIV = """
Expand All @@ -23,10 +25,12 @@ class PlotlyRenderer(Renderer):
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
"""

# pylint: disable=W0231
def __init__(self, datapoints: List, name: str, **properties):
super().__init__(datapoints, name, **properties)

def convert_datapoints(self, datapoints):
"""Convert from dvc-render format to plotly json format"""
traces = {}
for datapoint in datapoints:
revision = datapoint["rev"]
Expand Down
2 changes: 2 additions & 0 deletions tests/test_plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from dvc_render.plotly import PlotlyRenderer

# pylint: disable=missing-function-docstring,


def test_plotly_partial_html():
props = {"x": "first_val", "y": "second_val", "template": "scatter"}
Expand Down

0 comments on commit 677b725

Please sign in to comment.