powsybl-core icon indicating copy to clipboard operation
powsybl-core copied to clipboard

ReportNode delayed creation/deletion

Open flo-dup opened this issue 8 months ago • 0 comments

Describe the current behavior

Currently, if a ReportNode is created, we cannot easily delay its creation (especially if we want to add children to it).

Describe the expected behavior

Enrich the ReportNode API to be able to create or not (/to remove or not?) a reportNode based on some future results

Describe the motivation

Due to previous Reporter API design, the current use of ReportNode is sometimes to group other ReportNode without any functional added value (message "Invalidation warnings:" for instance). Besides, there is still a lot of functional information which is not reported. These two matters lead to "title" reports without children. This kind of node decreases final readability, see issue #2192.

Another use case, introduced in powsybl/powsybl-open-loadflow#919: some users sometimes need to pile up reportNodes (which may have children themselves) and then include them or not. Currently this can be done by creating each time a new root reportNode, and then include it or not depending on some result.

Extra Information

No response

flo-dup avatar Jun 19 '24 14:06 flo-dup