From 0df937623bf64ad91444e345cecd99678175b5ff Mon Sep 17 00:00:00 2001 From: huyenngn Date: Tue, 19 Nov 2024 15:57:41 +0100 Subject: [PATCH] docs: Add PhysicalPort to docs --- capellambse_context_diagrams/context.py | 2 +- docs/custom_diagram.md | 1 + docs/gen_images.py | 1 + docs/index.md | 14 ++++++++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/capellambse_context_diagrams/context.py b/capellambse_context_diagrams/context.py index 67407bfa..ad37fabf 100644 --- a/capellambse_context_diagrams/context.py +++ b/capellambse_context_diagrams/context.py @@ -960,7 +960,7 @@ def __init__( }, }, "display_parent_relation": True, - "unify_edge_direction": "TREE", + "unify_edge_direction": "UNIFORM", "display_port_labels": True, "port_label_position": _elkjs.PORT_LABEL_POSITION.OUTSIDE.name, } | default_render_parameters diff --git a/docs/custom_diagram.md b/docs/custom_diagram.md index 4e2cd2d0..834c3610 100644 --- a/docs/custom_diagram.md +++ b/docs/custom_diagram.md @@ -78,6 +78,7 @@ my_element.custom_diagram(collect=yaml.safe_load(my_yaml)).render("svgdiagram"). - [`la.LogicalFunction`][capellambse.metamodel.la.LogicalFunction] - [`pa.PhysicalFunction`][capellambse.metamodel.pa.PhysicalFunction] - [`fa.ComponentExchange`][capellambse.metamodel.fa.ComponentExchange] +- [`cs.PhysicalPort`][capellambse.metamodel.cs.PhysicalPort] ## Check out the code diff --git a/docs/gen_images.py b/docs/gen_images.py index 580203e4..335a0416 100644 --- a/docs/gen_images.py +++ b/docs/gen_images.py @@ -30,6 +30,7 @@ "Physical Node": "fdb34c92-7c49-491d-bf11-dd139930786e", "Physical Behavior": "313f48f4-fb7e-47a8-b28a-76440932fcb9", "Maintain": "ee745644-07d7-40b9-ad7a-910dc8cbb805", + "Physical Port": "c403d4f4-9633-42a2-a5d6-9e1df2655146", } interface_context_diagram_uuids: dict[str, str] = { "Left to right": "3ef23099-ce9a-4f7d-812f-935f47e7938d", diff --git a/docs/index.md b/docs/index.md index ec46073c..8f6f3a27 100644 --- a/docs/index.md +++ b/docs/index.md @@ -192,6 +192,20 @@ Available via `.context_diagram` on a [`ModelObject`][capellambse.model.ModelObj
Context of Maintain Switch Firmware [PDFB]
+- ??? example "[`pa.PhysicalPort`][capellambse.metamodel.pa.PhysicalPort] (PAB)" + + ``` py + import capellambse + + model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") + diag = model.by_uuid("c403d4f4-9633-42a2-a5d6-9e1df2655146").context_diagram + diag.render("svgdiagram").save(pretty=True) + ``` +
+ +
Context of PP 1 [PAB]
+
+ #### Hierarchy in diagrams Hierarchical diagrams are diagrams where boxes have child boxes and edges