Skip to content

Commit

Permalink
fix: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ernst Würger <[email protected]>
  • Loading branch information
huyenngn and ewuerger authored Sep 30, 2024
1 parent 660d712 commit dfcabac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions capellambse_context_diagrams/collectors/cable_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@


class CableTreeCollector:
"""Collect the context for ``PhysicalLink`` trees."""
def __init__(
self,
diagram: context.ContextDiagram,
Expand Down
4 changes: 3 additions & 1 deletion docs/cable_tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

# Cable Tree View Diagram

The `Cable Tree View` diagram visualizes the cable connections between ports. You can access `.cable_tree` on any `pa.PhysicalLink` element.
The `Cable Tree View` diagram visualizes the cable connections between ports.
You can access `.cable_tree` on any
[`pa.PhysicalLink`][capellambse.metamodel.pa.PhysicalFunction] element.

??? example "Cable Tree View of Control Signal"

Expand Down
3 changes: 1 addition & 2 deletions tests/test_cable_tree_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@

@pytest.mark.parametrize("uuid", ["5c55b11b-4911-40fb-9c4c-f1363dad846e"])
@pytest.mark.parametrize("fmt", ["svgdiagram", "svg", None])
def test_exchange_item_relation_views(
def test_cable_tree_views(
model: capellambse.MelodyModel, uuid: str, fmt: str
) -> None:
obj = model.by_uuid(uuid)

diag = obj.cable_tree
diag.render("svgdiagram").save(pretty=True)

assert diag.render(fmt)

0 comments on commit dfcabac

Please sign in to comment.