diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 34a39238..949e32f9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -143,14 +143,14 @@ Example: > > Documentation can look like this `docs/index.md`: > ```markdown -> - ??? example "🔥Brand-new🔥 [`ctx.Mission`][capellambse.model.layers.ctx.Mission] (MCB) 🔥Brand-new🔥" +> - ??? example "[`ctx.Mission`][capellambse.model.layers.ctx.Mission] (MCB)" > > ``` py > import capellambse > > model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") > diag = model.by_uuid("5bf3f1e3-0f5e-4fec-81d5-c113d3a1b3a6").context_diagram -> diag.render("svgdiagram").save_drawing(pretty=True) +> diag.render("svgdiagram").save(pretty=True) > ``` >
> diff --git a/docs/extras/filters.md b/docs/extras/filters.md index 718fdd54..f7c4cb66 100644 --- a/docs/extras/filters.md +++ b/docs/extras/filters.md @@ -26,7 +26,7 @@ Currently the supported filters are: diag = obj.context_diagram assert filters.EX_ITEMS == "show.exchange.items.filter" diag.filters.add(filters.EX_ITEMS) - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
@@ -43,7 +43,7 @@ Currently the supported filters are: diag = obj.context_diagram assert filters.FEX_EX_ITEMS == "show.functional.exchanges.exchange.items.filter" filters.filters = {filters.FEX_EX_ITEMS} - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
@@ -62,7 +62,7 @@ Currently the supported filters are: diag = obj.context_diagram assert filters.FEX_OR_EX_ITEMS == "capellambse_context_diagrams-show.functional.exchanges.or.exchange.items.filter" filters.filters.add(filters.FEX_OR_EX_ITEMS) - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
diff --git a/docs/extras/styling.md b/docs/extras/styling.md index 2d6ca7c7..8f336d7e 100644 --- a/docs/extras/styling.md +++ b/docs/extras/styling.md @@ -22,7 +22,7 @@ Capella. These appear to be blue. model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("957c5799-1d4a-4ac0-b5de-33a65bf1519c").context_diagram - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ``` produces
@@ -46,8 +46,8 @@ icon beside the box-label. Per default this attribute is set to `True`. from capellambse import aird diag = model.by_uuid("da08ddb6-92ba-4c3b-956a-017424dbfe85").context_diagram - diag.display_symbols_as_boxes = True - diag.render("svgdiagram").save_drawing(pretty=True) + diag.display_symbols_as_boxes = True # per default + diag.render("svgdiagram").save(pretty=True) ``` produces
@@ -61,8 +61,8 @@ icon beside the box-label. Per default this attribute is set to `True`. from capellambse import aird diag = model.by_uuid("9390b7d5-598a-42db-bef8-23677e45ba06").context_diagram - diag.display_symbols_as_boxes = True - diag.render("svgdiagram").save_drawing(pretty=True) + diag.display_symbols_as_boxes = True # per default + diag.render("svgdiagram").save(pretty=True) ``` produces
@@ -81,7 +81,7 @@ The `no_edgelabels` render parameter prevents edge labels from being displayed. model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("957c5799-1d4a-4ac0-b5de-33a65bf1519c").context_diagram - diag.render("svgdiagram", no_edgelabels=True).save_drawing(pretty=True) + diag.render("svgdiagram", no_edgelabels=True).save(pretty=True) ```
@@ -101,7 +101,7 @@ You can switch to py-capellambse default styling by overriding the diag = model.by_uuid("957c5799-1d4a-4ac0-b5de-33a65bf1519c").context_diagram diag.render_styles = {} - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ``` produces
@@ -126,7 +126,7 @@ Style your diagram elements ([ElkChildType][capellambse_context_diagrams.seriali styling.BLUE_ACTOR_FNCS, junction=lambda obj, serializer: {"stroke": aird.RGB(220, 20, 60)}, ) - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ``` produces
diff --git a/docs/index.md b/docs/index.md index 9344ada1..93ab4d46 100644 --- a/docs/index.md +++ b/docs/index.md @@ -41,7 +41,7 @@ Available via `.context_diagram` on a [`ModelObject`][capellambse.model.common.e model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("e37510b9-3166-4f80-a919-dfaac9b696c7").context_diagram - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
@@ -55,7 +55,7 @@ Available via `.context_diagram` on a [`ModelObject`][capellambse.model.common.e model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("8bcb11e6-443b-4b92-bec2-ff1d87a224e7").context_diagram - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
@@ -69,7 +69,7 @@ Available via `.context_diagram` on a [`ModelObject`][capellambse.model.common.e model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("da08ddb6-92ba-4c3b-956a-017424dbfe85").context_diagram - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
@@ -83,7 +83,7 @@ Available via `.context_diagram` on a [`ModelObject`][capellambse.model.common.e model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("5bf3f1e3-0f5e-4fec-81d5-c113d3a1b3a6").context_diagram - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
@@ -97,7 +97,7 @@ Available via `.context_diagram` on a [`ModelObject`][capellambse.model.common.e model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("9390b7d5-598a-42db-bef8-23677e45ba06").context_diagram - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
@@ -113,7 +113,7 @@ Available via `.context_diagram` on a [`ModelObject`][capellambse.model.common.e model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("a5642060-c9cc-4d49-af09-defaa3024bae").context_diagram - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
@@ -127,7 +127,7 @@ Available via `.context_diagram` on a [`ModelObject`][capellambse.model.common.e model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("f632888e-51bc-4c9f-8e81-73e9404de784").context_diagram - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
@@ -141,7 +141,7 @@ Available via `.context_diagram` on a [`ModelObject`][capellambse.model.common.e model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("957c5799-1d4a-4ac0-b5de-33a65bf1519c").context_diagram - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
@@ -167,7 +167,7 @@ Hierarchy is identified and supported: model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") obj = model.by_uuid("16b4fcc5-548d-4721-b62a-d3d5b1c1d2eb") diagram = obj.context_diagram.render("svgdiagram", include_inner_objects=True) - diagram.save_drawing(pretty=True) + diagram.save(pretty=True) ```
@@ -185,7 +185,7 @@ The data is collected by [get_elkdata_for_exchanges][capellambse_context_diagram model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("3ef23099-ce9a-4f7d-812f-935f47e7938d").context_diagram - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
diff --git a/docs/realization_view.md b/docs/realization_view.md index e84bc733..50ae7bcf 100644 --- a/docs/realization_view.md +++ b/docs/realization_view.md @@ -28,7 +28,7 @@ implement currently. The diagram elements are collected from the search_direction="ALL", # BELOW; ABOVE and ALL show_owners=True, layer_sizing="UNION", # UNION; WIDTH and HEIGHT - ).save_drawing(pretty=True) + ).save(pretty=True) ```
@@ -48,7 +48,7 @@ implement currently. The diagram elements are collected from the search_direction="ALL", show_owners=True, layer_sizing="UNION", - ).save_drawing(pretty=True) + ).save(pretty=True) ```
diff --git a/docs/tree_view.md b/docs/tree_view.md index ea47a84d..e054a0f6 100644 --- a/docs/tree_view.md +++ b/docs/tree_view.md @@ -17,7 +17,7 @@ parent class. model = capellambse.MelodyModel("tests/data/ContextDiagram.aird") diag = model.by_uuid("b7c7f442-377f-492c-90bf-331e66988bda").tree_view - diag.render("svgdiagram").save_drawing(pretty=True) + diag.render("svgdiagram").save(pretty=True) ```
@@ -68,7 +68,7 @@ before rendering: direction="Right", # partitioning=False, # edgeLabelsSide="ALWAYS_DOWN", - ).save_drawing(pretty=True) + ).save(pretty=True) ```