Skip to content

Commit 5f8afb9

Browse files
mattseddondberenbaum
authored andcommitted
Remove VegaConverter TODO and update misleading comment
1 parent ef226a9 commit 5f8afb9

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

dvc/render/converter/vega.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,6 @@ def __init__(
114114
self.plot_id = plot_id
115115
self.inferred_properties: Dict = {}
116116

117-
# TODO we should be handling that in `convert`,
118-
# to avoid stateful `self.inferred_properties`
119-
self._infer_x_y()
120-
121117
def _infer_y_from_data(self):
122118
if self.plot_id in self.data:
123119
for lst in _lists(self.data[self.plot_id]):
@@ -296,16 +292,11 @@ def convert(
296292
):
297293
"""
298294
Convert the data. Fill necessary fields ('x', 'y') and return both
299-
generated datapoints and updated properties. If `x` is not provided,
300-
leave it as None, fronteds should handle it.
301-
302-
NOTE: Studio uses this method.
303-
The only thing studio FE handles is filling `x` and `y`.
304-
`x/y_label` should be filled here.
305-
306-
Datapoints are not stripped according to config, because users
307-
might be utilizing other fields in their custom plots.
295+
generated datapoints and updated properties. `x`, `y` values and labels
296+
are inferred and always provided.
308297
"""
298+
self._infer_x_y()
299+
309300
datapoints = self._find_datapoints()
310301
properties = {**self.properties, **self.inferred_properties}
311302

tests/unit/render/test_vega_converter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def test_finding_lists(dictionary, expected_result):
2424
assert list(result) == expected_result
2525

2626

27+
@pytest.mark.studio
2728
@pytest.mark.parametrize(
2829
"input_data,properties,expected_datapoints,expected_properties",
2930
[

0 commit comments

Comments
 (0)