Skip to content

Commit

Permalink
refactor: address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
abraemer committed Jan 28, 2025
1 parent 903032c commit 165d134
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/opossum_lib/spdx/convert_to_opossum.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

import logging
from pathlib import PurePath
import sys
import uuid
from typing import Any
Expand Down Expand Up @@ -74,9 +75,7 @@ def convert_spdx_to_opossum_information(filename: str) -> OpossumFileContent:

def convert_tree_to_opossum(tree: DiGraph) -> Opossum:
metadata = create_metadata(tree)
resources = [] # Resource(type=ResourceType.TOP_LEVEL)
# resources_to_attributions: dict[str, list[str]] = dict()
# external_attributions: dict[str, OpossumPackage] = dict()
resources = []
attribution_to_id: dict[OpossumPackage, str] = {}
attribution_breakpoints = []
external_attribution_sources = {
Expand All @@ -98,7 +97,7 @@ def convert_tree_to_opossum(tree: DiGraph) -> Opossum:
"A tree should always have a node without incoming edge."
)
source_file_path = _get_file_path(connected_subgraph, source, source)
rootnode = Resource(path=source_file_path)
rootnode = Resource(path=PurePath(source_file_path))
resources.append(rootnode)
for node_label in connected_subgraph.nodes():
node = connected_subgraph.nodes[node_label]
Expand Down

0 comments on commit 165d134

Please sign in to comment.