Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions OTAnalytics/plugin_datastore/track_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ def input_file(self) -> str:
def __eq__(self, other: Any) -> bool:
if not isinstance(other, PandasDetection):
return False
# Ensure a builtins.bool is returned (pandas .all() may return numpy.bool_)
data_equal: bool = bool((self._data == other._data).all())
return (
self._track_id == other._track_id
and self._occurrence == other._occurrence
and (self._data == other._data).all()
(self._track_id == other._track_id)
and (self._occurrence == other._occurrence)
and data_equal
)

def __hash__(self) -> int:
Expand Down
7 changes: 4 additions & 3 deletions OTAnalytics/plugin_ui/visualization/counts/counts_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,10 @@ def _prepare_dataframe(self, count: Count) -> DataFrame:
dataframe = dataframe.sort_values(LEVEL_START_TIME)

# Build full combination index (flow x start time x classification)
all_flows = dataframe[LEVEL_FLOW].unique()
all_times = dataframe[LEVEL_START_TIME].unique()
all_classes = dataframe[LEVEL_CLASSIFICATION].unique()
# Convert numpy arrays from .unique() to plain Python lists for type checking
all_flows = dataframe[LEVEL_FLOW].unique().tolist()
all_times = dataframe[LEVEL_START_TIME].unique().tolist()
all_classes = dataframe[LEVEL_CLASSIFICATION].unique().tolist()
multi_index = [LEVEL_FLOW, LEVEL_START_TIME, LEVEL_CLASSIFICATION]
full_index = MultiIndex.from_product(
[all_flows, all_times, all_classes],
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dev = [
"interrogate==1.7.0",
"isort==6.0.1",
"mypy==1.16.1",
"pandas-stubs==2.2.3.241126",
"pandas-stubs==2.3.2.250926",
"pre-commit==4.1.0",
"pytest==8.3.4",
"pytest-asyncio==0.24.0",
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.