powsybl-core
powsybl-core copied to clipboard
ReportNode V2.1
Please check if the PR fulfills these requirements
- [x] The commit message follows our guidelines
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
Does this PR already have an issue describing the problem? No
What kind of change does this PR introduce? Feature / bug fix
What is the current behavior?
- ReportNode v2.0
- context of included ReportNode is not replaced by context of new root ReportNode
- included ReportNode is silently replacing messageTemplate if key conflicts occur
- Deserialization loads the whole file before deserializing it
- No timestamps (except if added manually)
- messageTemplate needed to construct ReportNodes
What is the new behavior (if this is a feature change)?
- ReportNode v2.1
- context of included ReportNode is replaced by context of new root ReportNode through
RefChain
- if messageTemplate key conflicts occur when including ReportNode, templates are not overridden, + warn log
- Deserializes the JSON reportNode file while streaming it
- Timestamp value added for each ReportNode with a specific pattern if enabled at root ReportNode creation
- messageTemplate can be missing at ReportNode construction (to anticipate the dictionaries questions which will later arise)
Does this PR introduce a breaking change or deprecate an API?
- [x] Yes
- [ ] No
If yes, please check if the following requirements are fulfilled
- [x] The Breaking Change or Deprecated label has been added
- [x] The migration steps are described in the following section
What changes might users need to make in their application due to this PR? (migration steps)
- Starting from this release, the reportNode JSON files from API v2.0 cannot be read anymore. Please switch to JSON files generated with API V2.1.
-
ReportConstants.REPORT_SEVERITY_KEY
has been renamed intoReportConstants.SEVERITY_KEY