Skip to content

[FEATURE] Visualizer related tasks to be covered in multiple PRs #194

Description

@nitbharambe
  • app.py -> This would be removed for adding support to callback functionalities of search and selection
    for element in initial_elements:
        element["data"].pop("associated_ids", None)
  • parsers.py -> Make appliances selectable when possible
  • typing.py -> Use stricter typehints via a TypedDict
    """Sub dictionary for data within VizToComponentElementsValue"""

    id: Required[str]
    source: NotRequired[str]
    target: NotRequired[str]
    group: Required[str]
    associated_ids: Required[dict[str, list[int]]]  # e.g. {"sym_load": [1, 2], "sym_gen": [3]}


class VizToComponentElementsValue(TypedDict):
    """Element data for mapping visualization elements to component types and IDs
    This is what is needed for cytoscape elements."""

    data: _VizToComponentElementsValueData
    classes: str
    position: NotRequired[dict[Literal["x", "y"], float]]
    selectable: NotRequired[bool]


VizToComponentElements = dict[str, VizToComponentElementsValue]

Metadata

Metadata

Assignees

No one assigned

    Labels

    visualizerIssues related to the visualizer

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions