diff --git a/capellambse_context_diagrams/context.py b/capellambse_context_diagrams/context.py index 940ad1dc..174c6d77 100644 --- a/capellambse_context_diagrams/context.py +++ b/capellambse_context_diagrams/context.py @@ -512,8 +512,8 @@ def _create_diagram(self, params: dict[str, t.Any]) -> cdiagram.Diagram: params.setdefault( "search_direction", params.get("search_direction", "ALL") ) - params.setdefault("show_owners", params.get("show_owners", True)) - params.setdefault("layer_sizing", params.get("layer_sizing", "WIDTH")) + params.setdefault("show_owners", True) + params.setdefault("layer_sizing", "WIDTH") data, edges = realization_view.collector(self, params) layout = try_to_layout(data) adjust_layer_sizing(data, layout, params["layer_sizing"]) diff --git a/docs/gen_images.py b/docs/gen_images.py index 4540540e..18d26931 100644 --- a/docs/gen_images.py +++ b/docs/gen_images.py @@ -132,18 +132,16 @@ def generate_realization_view_images() -> None: diag = obj.realization_view for layer_sizing in ("UNION", "HEIGHT", "WIDTH", "INDIVIDUAL"): with mkdocs_gen_files.open( - f"{str(dest / diag.name)} {layer_sizing}.svg", "w" + str(dest / f"{diag.name} {layer_sizing}.svg"), "wb" ) as fd: - print( - diag.render( - "svg", - depth=3, - search_direction="ALL", - show_owners=True, - transparent_background=False, - layer_sizing=layer_sizing, - ), - file=fd, + diag.save( + fd, + "svg", + depth=3, + search_direction="ALL", + show_owners=True, + transparent_background=False, + layer_sizing=layer_sizing, ) @@ -155,27 +153,27 @@ def generate_data_flow_image() -> None: print(diag.render("svg", transparent_background=False), file=fd) -generate_index_images() -generate_hierarchy_image() -generate_no_symbol_images() - -wizard = general_context_diagram_uuids["educate Wizards"] -generate_no_edgelabel_image(wizard) - -lost = general_context_diagram_uuids["Lost"] -generate_filter_image(lost, filters.EX_ITEMS, "ex") -generate_filter_image(lost, filters.FEX_EX_ITEMS, "fex and ex") -generate_filter_image(lost, filters.FEX_OR_EX_ITEMS, "fex or ex") - -generate_styling_image( - lost, - dict( - styling.BLUE_ACTOR_FNCS, - junction=lambda o, s: {"stroke": diagram.RGB(220, 20, 60)}, - ), - "red junction", -) -generate_styling_image(wizard, {}, "no_styles") -generate_class_tree_images() +# generate_index_images() +# generate_hierarchy_image() +# generate_no_symbol_images() + +# wizard = general_context_diagram_uuids["educate Wizards"] +# generate_no_edgelabel_image(wizard) + +# lost = general_context_diagram_uuids["Lost"] +# generate_filter_image(lost, filters.EX_ITEMS, "ex") +# generate_filter_image(lost, filters.FEX_EX_ITEMS, "fex and ex") +# generate_filter_image(lost, filters.FEX_OR_EX_ITEMS, "fex or ex") + +# generate_styling_image( +# lost, +# dict( +# styling.BLUE_ACTOR_FNCS, +# junction=lambda o, s: {"stroke": diagram.RGB(220, 20, 60)}, +# ), +# "red junction", +# ) +# generate_styling_image(wizard, {}, "no_styles") +# generate_class_tree_images() generate_realization_view_images() generate_data_flow_image()