Skip to content

Commit

Permalink
Fixed bug in flow network util
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders2303 committed Nov 26, 2024
1 parent fd04a45 commit a0db1ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import logging


from enum import StrEnum

from primary.services.sumo_access.group_tree_types import DataType, EdgeOrNode, TreeType
from ._group_tree_dataframe_model import GroupTreeDataframeModel

Expand Down Expand Up @@ -112,7 +110,7 @@ def compute_all_group_vectors(group_tree_model: GroupTreeDataframeModel) -> set[

res = set()
for data_type in all_data_types:
res |= compute_tree_well_vectors(group_tree_model, data_type)
res |= compute_tree_group_vectors(group_tree_model, data_type)

return res

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _verify_that_sumvecs_exists(self, check_sumvecs: set[str]) -> None:
missing_sumvecs = check_sumvecs - self._all_vectors
if len(missing_sumvecs) > 0:
str_missing_sumvecs = ", ".join(missing_sumvecs)
raise ValueError("Missing summary vectors for the GroupTree plugin: " f"{str_missing_sumvecs}.")
raise ValueError("Missing summary vectors for the GroupTree plugin: ", f"{str_missing_sumvecs}.")

async def _initialize_all_vectors_list_async(self) -> None:
vector_info_arr = await self._summary_access.get_available_vectors_async()
Expand Down Expand Up @@ -467,7 +467,9 @@ def _create_flow_network_summary_vectors_info(

for datatype in datatypes:
sumvec_name = _utils.create_sumvec_from_datatype_nodename_and_keyword(datatype, nodename, keyword)

edge_or_node = _utils.get_tree_element_for_data_type(datatype)

all_sumvecs.add(sumvec_name)
if edge_or_node == EdgeOrNode.EDGE:
edge_sumvecs.add(sumvec_name)
Expand Down

0 comments on commit a0db1ca

Please sign in to comment.