Skip to content

Outcome Nodes with Notizen are created although they shouldn't / remove workaround #383

@hf-kklein

Description

@hf-kklein

Wir erzeugen beim malo-ident ebd e_0594 zunächst viele kleine outcomenodes mit notizen, die aber nicht connected sind mit dem rest des graphen. deswegen hängen sie dann alle einzeln im SVG rum

Image

Image

wir entfernen sie mit einem dreckigen Trick nachträglich wieder. Besser wäre es, sie gar nicht erst anzulegen, dann müsste man sie hinterher nicht loswerden und hätte doppelt code gespart.

def _apply_workaround_to_issue_383(graph: DiGraph) -> None:
"""
removes isolated hinweis nodes which are not connected to the graph, e.g. 'Es gibt 1..n Treffer'...
Ideally we'd not create them at all, then we wouldn't have to remove them in a post processing step.
https://github.com/Hochfrequenz/rebdhuhn/issues/383
"""
isolated = list(isolates(graph))
graph.remove_nodes_from(isolated)

varianten: entweder gar nicht erst anlegen ODER mit einer edge irgendwie verbinden.
andererseits ignorieren wir hinweise auch shcon anderswo

# We ignore Hinweise, if they are in during a decision process.

the wrong svg without the hacky workaround:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions