Skip to content

Commit

Permalink
pytest support
Browse files Browse the repository at this point in the history
Signed-off-by: ISP akm <[email protected]>
  • Loading branch information
xygyo77 committed Dec 25, 2023
1 parent e0cd852 commit 54764af
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/caret_analyze/plot/stacked_bar/latency_stacked_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ def to_dataframe(
Latency dataframe.
"""
converter: ClockConverter | None = None
if xaxis_type == 'sim_time':
converter = get_clock_converter([self._target_objects])
# NOTE: returned columns aren't used because they don't include 'start time'
# TODO: delete 1e-6
stacked_bar_dict, _ = self.to_stacked_bar_data(xaxis_type)
Expand Down
4 changes: 1 addition & 3 deletions src/caret_analyze/plot/visualize_lib/bokeh/stacked_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

from .util import (apply_x_axis_offset, ColorSelectorFactory,
HoverKeysFactory, init_figure)
from ...util import get_clock_converter
from ....common import ClockConverter


class BokehStackedBar:
Expand Down Expand Up @@ -75,7 +73,7 @@ def create_figure(self) -> Figure:
x_label = 'start time'
if self._xaxis_type == 'system_time' or self._xaxis_type == 'sim_time':
apply_x_axis_offset(fig, frame_min, frame_max)
else: # index
else: # index
x_label = 'index'

color_selector = ColorSelectorFactory.create_instance(coloring_rule='unique')
Expand Down
2 changes: 1 addition & 1 deletion src/caret_analyze/record/records_service/stacked_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(
stacked_bar_records = self._to_stacked_bar_records(renamed_records, columns)
series_seq: Sequence[int | None] = x_axis_values.get_column_series(xlabel)
if converter:
series_seq = [round(converter.convert(t)) for t in series_seq]
series_seq = [round(converter.convert(float(t))) for t in series_seq if t is not None]
series_list: list[int] = self._convert_sequence_to_list(series_seq)
stacked_bar_records = \
self._merge_column_series(
Expand Down

0 comments on commit 54764af

Please sign in to comment.