-
Notifications
You must be signed in to change notification settings - Fork 45
Partly clean ReportNode use in ValidationUtil #3353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
e9ad2e9
to
412f277
Compare
|
70c192d
to
a6957c2
Compare
Signed-off-by: Florian Dupuy <[email protected]> Signed-off-by: CARON Alice <[email protected]> Conflicts: iidm/iidm-api/src/main/java/com/powsybl/iidm/network/util/NetworkReports.java iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/util/ModificationReports.java ucte/ucte-network/src/main/java/com/powsybl/ucte/network/util/UcteReports.java
412f277
to
a9787e0
Compare
core.iidm.network.MoveCommonAlias = Alias ${alias} found in dangling lines ${danglingLineId1} and ${danglingLineId2} is moved to their merged line. | ||
core.iidm.network.PropertyOnlyOnOneSide = Inconsistencies of property ${propertyName} between both sides (${danglingLineId1) on side 1 and ${danglingLineId2} on side2) of merged line. Side ${side} has no value. Value on other side is kept. | ||
core.iidm.network.ptcPhaseRegulationFixedMode = phase regulation cannot be on if mode is FIXED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Start the templates with a first upper case character?
} | ||
|
||
public static void targetDeadbandUndefinedValue(String validableType, ReportNode reportNode) { | ||
String key = switch (validableType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of manipulating a String can we create en enum to handle all the possibilities? For instance:
public enum ValidableType {
SHUNT_COMPENSATOR,
PHASE_TAP_CHANGER,
RATIO_TAP_CHANGER
}
But there are more than 3 ValidableType so maybe we need to list them all
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
The ReportNode is used in ValidationUtil with generated keys (Validable::getMessageHeader) for message template
What is the new behavior (if this is a feature change)?
The ReportNode is used in ValidationUtil with fixed keys for a given template
Does this PR introduce a breaking change or deprecate an API?
Other information:
⚠️ The message lacks the correct information which is expected by the user: getMessageHeader usually gives the equipmentType and the equipment id. But this was already the case before, as this information was used as a template key, hence never displayed to the user. A PR will follow later to fix this, but this requires breaking changes.