From dfcabac217141390331725fff3f0296b81e33491 Mon Sep 17 00:00:00 2001 From: Huyen Nguyen <48179958+huyenngn@users.noreply.github.com> Date: Mon, 30 Sep 2024 13:01:12 +0200 Subject: [PATCH] fix: Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernst Würger --- capellambse_context_diagrams/collectors/cable_tree.py | 1 + docs/cable_tree.md | 4 +++- tests/test_cable_tree_views.py | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/capellambse_context_diagrams/collectors/cable_tree.py b/capellambse_context_diagrams/collectors/cable_tree.py index ec7af65..716f74d 100644 --- a/capellambse_context_diagrams/collectors/cable_tree.py +++ b/capellambse_context_diagrams/collectors/cable_tree.py @@ -20,6 +20,7 @@ class CableTreeCollector: + """Collect the context for ``PhysicalLink`` trees.""" def __init__( self, diagram: context.ContextDiagram, diff --git a/docs/cable_tree.md b/docs/cable_tree.md index e26eec0..c826805 100644 --- a/docs/cable_tree.md +++ b/docs/cable_tree.md @@ -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" diff --git a/tests/test_cable_tree_views.py b/tests/test_cable_tree_views.py index f8f907d..d6c73aa 100644 --- a/tests/test_cable_tree_views.py +++ b/tests/test_cable_tree_views.py @@ -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)