Skip to content

Upgrade to powsybl-dependencies v2025.0.1 #46

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

Merged
merged 36 commits into from
May 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a154c35
Upgrade to powsybl-dependencies v2025.0.0
Apr 8, 2025
71d7b61
Fix type
Apr 11, 2025
12bca5b
internationalization update
Apr 15, 2025
51d0e97
WIP internationalization update
Apr 16, 2025
2ca6889
internationalization update
Apr 25, 2025
30faad7
internationalization update
Apr 28, 2025
db82fd8
internationalization update
Apr 28, 2025
a4a3b30
internationalization update
Apr 28, 2025
e093c1f
internationalization update
Apr 29, 2025
bdcacdc
internationalization update
Apr 30, 2025
c2c3f02
internationalization update
Apr 30, 2025
b20977c
Merge branch 'main' into upgrade_to_powsybl_dependencies_2025.0.0
EtienneLt May 2, 2025
e811b3c
fi
EtienneLt May 2, 2025
961badb
internationalization update
May 6, 2025
d17cac9
internationalization update
May 6, 2025
783b399
internationalization update
May 6, 2025
45b3b8a
internationalization update
May 6, 2025
7b6de25
internationalization update
May 6, 2025
1268e0b
internationalization update
May 6, 2025
2dee5a2
internationalization update
May 7, 2025
4b59c17
internationalization update
May 7, 2025
df2e25e
internationalization update
May 7, 2025
1aedbb0
internationalization update : GenerationDispatch part1
May 9, 2025
5beff4a
internationalization update : GenerationDispatch part2
May 9, 2025
bf0bc9b
internationalization update : GenerationDispatch part3
May 9, 2025
c2d3867
internationalization update
May 10, 2025
faa3e43
internationalization update
May 10, 2025
07e26fe
internationalization update
May 10, 2025
396bbd6
PR Review
May 13, 2025
5c6f9fb
PR Review
May 14, 2025
fe639d0
PR Review
May 14, 2025
93fd685
PR Review
May 14, 2025
377f96a
fix pom imports
EtienneLt May 15, 2025
9765066
fix
EtienneLt May 15, 2025
bcd977a
Code coverage
May 15, 2025
f42018d
Code cleaning
May 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
</developers>

<properties>
<gridsuite-dependencies.version>37.0.0</gridsuite-dependencies.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to remove the gridsuite-dependencies dependency as network modification is part of gridsuite-dependencies

<powsybl-ws-dependencies.version>2.21.0</powsybl-ws-dependencies.version>
<gridsuite-filter.version>1.4.0</gridsuite-filter.version>
<sonar.organization>gridsuite</sonar.organization>
<sonar.projectKey>org.gridsuite:network-modification</sonar.projectKey>
</properties>
Expand All @@ -66,11 +67,10 @@

<dependencyManagement>
<dependencies>
<!-- imports -->
<dependency>
<groupId>org.gridsuite</groupId>
<artifactId>gridsuite-dependencies</artifactId>
<version>${gridsuite-dependencies.version}</version>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-ws-dependencies</artifactId>
<version>${powsybl-ws-dependencies.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -82,6 +82,7 @@
<dependency>
<groupId>org.gridsuite</groupId>
<artifactId>gridsuite-filter</artifactId>
<version>${gridsuite-filter.version}</version>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.gridsuite.modification.ModificationType;
import org.gridsuite.modification.dto.annotation.ModificationErrorTypeName;
import org.gridsuite.modification.modifications.AbstractModification;
import org.gridsuite.modification.modifications.BatteryCreation;
Expand Down Expand Up @@ -72,6 +71,6 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(ModificationType.BATTERY_CREATION.name(), "Battery creation ${batteryId}").withUntypedValue("batteryId", this.getEquipmentId()).add();
return reportNode.newReportNode().withMessageTemplate("network.modification.batteryCreation").withUntypedValue("batteryId", this.getEquipmentId()).add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(getType().name(), "Battery modification ${batteryId}").withUntypedValue("batteryId", this.getEquipmentId()).add();
return reportNode.newReportNode()
.withMessageTemplate("network.modification.battery.modification")
.withUntypedValue("batteryId", this.getEquipmentId())
.add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(getType().name(), "By filter deletion").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.byFilter.deletion").add();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.gridsuite.modification.ModificationType;
import org.gridsuite.modification.dto.annotation.ModificationErrorTypeName;
import org.gridsuite.modification.dto.byfilter.formula.FormulaInfos;
import org.gridsuite.modification.modifications.byfilter.ByFormulaModification;
Expand Down Expand Up @@ -51,6 +50,6 @@ public ByFormulaModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(ModificationType.BY_FORMULA_MODIFICATION.name(), "Modification by formula").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.byFormulaModification").add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(getType().name(), "Delete attaching line").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.deleteAttachingLine").add();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(getType().name(), "Delete voltage level on line").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.deleteVoltageLevelOnLine").add();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import com.fasterxml.jackson.annotation.JsonTypeName;
import com.powsybl.commons.report.ReportNode;
import com.powsybl.commons.report.TypedValue;
import com.powsybl.iidm.network.IdentifiableType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
Expand Down Expand Up @@ -59,9 +58,9 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "${EquipmentType} '${EquipmentId}' change")
.withTypedValue("EquipmentType", equipmentType.name(), TypedValue.UNTYPED)
.withTypedValue("EquipmentId", getEquipmentId(), TypedValue.UNTYPED)
.withMessageTemplate("network.modification.equipmentAttributeModification")
.withUntypedValue("EquipmentType", equipmentType.name())
.withUntypedValue("EquipmentId", getEquipmentId())
.add();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Equipment deletion ${equipmentId}")
.withMessageTemplate("network.modification.equipmentDeletion")
.withUntypedValue("equipmentId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Generation dispatch")
.withMessageTemplate("network.modification.generationDispatch")
.add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Generator creation ${generatorId}")
.withMessageTemplate("network.modification.generator.creation")
.withUntypedValue("generatorId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Generator modification ${generatorId}")
.withMessageTemplate("network.modification.generator.modification")
.withUntypedValue("generatorId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Generator scaling")
.withMessageTemplate("network.modification.generatorScaling")
.add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Apply groovy script")
.withMessageTemplate("network.modification.groovyScript")
.add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Lcc creation ${lccId}")
.withMessageTemplate("network.modification.lcc.creation")
.withUntypedValue("lccId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(getType().name(), "Line attach to voltage level").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.lineAttachToVoltageLevel").add();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Creation of line ${lineId}")
.withMessageTemplate("network.modification.lineCreation")
.withUntypedValue("lineId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Line modification ${lineId}")
.withMessageTemplate("network.modification.line.modification")
.withUntypedValue("lineId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Line split with voltage level")
.withMessageTemplate("network.modification.lineSplitWithVoltageLevel")
.add();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Lines attach to split lines")
.withMessageTemplate("network.modification.linesAttachToSplitLines")
.add();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Load creation ${loadId}")
.withMessageTemplate("network.modification.load.creation")
.withUntypedValue("loadId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Load modification ${loadId}")
.withMessageTemplate("network.modification.load.modification")
.withUntypedValue("loadId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Load Scaling")
.withMessageTemplate("network.modification.loadScaling")
.add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.gridsuite.modification.ModificationType;
import org.gridsuite.modification.dto.annotation.ModificationErrorTypeName;
import org.gridsuite.modification.dto.byfilter.assignment.AssignmentInfos;
import org.gridsuite.modification.modifications.byfilter.ModificationByAssignment;
Expand Down Expand Up @@ -48,6 +47,6 @@ public ModificationByAssignment toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(ModificationType.MODIFICATION_BY_ASSIGNMENT.name(), "Modification by filter").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.modificationByAssignment").add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,17 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
String defaultName = switch (action) {
case LOCKOUT -> "Lockout ${equipmentId}";
case TRIP -> "Trip ${equipmentId}";
case ENERGISE_END_ONE, ENERGISE_END_TWO -> "Energise ${equipmentId}";
case SWITCH_ON -> "Switch on ${equipmentId}";
String messageKey = switch (action) {
case LOCKOUT -> "network.modification.OPERATING_STATUS_MODIFICATION_LOCKOUT";
case TRIP -> "network.modification.OPERATING_STATUS_MODIFICATION_TRIP";
case ENERGISE_END_ONE -> "network.modification.OPERATING_STATUS_MODIFICATION_ENERGISE_END_ONE";
case ENERGISE_END_TWO -> "network.modification.OPERATING_STATUS_MODIFICATION_ENERGISE_END_TWO";
case SWITCH_ON -> "network.modification.OPERATING_STATUS_MODIFICATION_SWITCH_ON";
};
return reportNode.newReportNode().withMessageTemplate(getType().name() + "_" + action, defaultName).withUntypedValue("equipmentId", this.getEquipmentId()).add();
return reportNode.newReportNode()
.withMessageTemplate(messageKey)
.withUntypedValue("equipmentId", this.getEquipmentId())
.add();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Shunt compensator creation ${shuntCompensatorId}")
.withMessageTemplate("network.modification.shuntCompensatorCreation")
.withUntypedValue("shuntCompensatorId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Shunt compensator modification ${shuntCompensatorId}")
.withMessageTemplate("network.modification.shuntCompensatorModification.modification")
.withUntypedValue("shuntCompensatorId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import lombok.ToString;
import lombok.experimental.SuperBuilder;

import org.gridsuite.modification.ModificationType;
import org.gridsuite.modification.dto.annotation.ModificationErrorTypeName;
import org.gridsuite.modification.modifications.AbstractModification;
import org.gridsuite.modification.modifications.StaticVarCompensatorCreation;
Expand Down Expand Up @@ -98,7 +97,6 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(ModificationType.STATIC_VAR_COMPENSATOR_CREATION.name(),
"Static var compensator creation ${id}").withUntypedValue("id", this.getEquipmentId()).add();
return reportNode.newReportNode().withMessageTemplate("network.modification.staticVarCompensatorCreation").withUntypedValue("id", this.getEquipmentId()).add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Substation creation ${substationId}")
.withMessageTemplate("network.modification.substation.creation")
.withUntypedValue("substationId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Substation modification ${substationId}")
.withMessageTemplate("network.modification.substation.modification")
.withUntypedValue("substationId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(ModificationType.TABULAR_CREATION.name(), "Tabular creation")
.withMessageTemplate("network.modification.tabularCreation")
.add();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(ModificationType.TABULAR_CREATION.name(), "Tabular modification")
.withMessageTemplate("network.modification.tabularModification")
.add();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Two windings transformer creation ${twoWindingsTransformerId}")
.withMessageTemplate("network.modification.twoWindingsTransformerCreation")
.withUntypedValue("twoWindingsTransformerId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Two windings transformer modification ${twoWindingsTransformerId}")
.withMessageTemplate("network.modification.twoWindingsTransformerModification.modification")
.withUntypedValue("twoWindingsTransformerId", getEquipmentId())
.add();
}
Expand Down
Loading