Skip to content

Commit

Permalink
Upgrade to powsybl dependencies 2024.2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
  • Loading branch information
FranckLecuyer committed Jul 22, 2024
1 parent 8da5f06 commit 1c6f2e5
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 61 deletions.
4 changes: 1 addition & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@
</developers>

<properties>
<gridsuite-dependencies.version>30</gridsuite-dependencies.version>
<gridsuite-dependencies.version>31</gridsuite-dependencies.version>
<powsybl-open-reac.version>0.7.0</powsybl-open-reac.version>
<mockito-inline.version>3.11.1</mockito-inline.version>
<liquibase-hibernate-package>org.gridsuite.voltageinit.server</liquibase-hibernate-package>
<powsybl-ws-commons.version>1.11.0</powsybl-ws-commons.version><!-- should be removed once gridsuite-dependencies is upgraded-->
</properties>

<build>
Expand Down Expand Up @@ -122,7 +121,6 @@
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-ws-commons</artifactId>
<version>${powsybl-ws-commons.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected CompletableFuture<OpenReacResult> getCompletableFuture(VoltageInitRunC
}

@Override
protected void handleNonCancellationException(AbstractResultContext<VoltageInitRunContext> resultContext, Exception exception) {
protected void handleNonCancellationException(AbstractResultContext<VoltageInitRunContext> resultContext, Exception exception, AtomicReference<ReportNode> rootReporter) {
Map<String, String> errorIndicators = new HashMap<>();
errorIndicators.put(ERROR, ERROR_DURING_VOLTAGE_PROFILE_INITIALISATION);
resultService.insertErrorResult(resultContext.getResultUuid(), errorIndicators);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ private ListAssert<VoltageLimitOverride> testsBuildSpecificVoltageLimitsCommon(L
context.setReportNode(ReportNode.newRootReportNode().withMessageTemplate(COMPUTATION_TYPE, COMPUTATION_TYPE).build());
final OpenReacParameters openReacParameters = voltageInitParametersService.buildOpenReacParameters(context, network);
log.debug("openReac build parameters report: {}", mapper.writeValueAsString(context.getReportNode()));
System.out.println("*********** report = ");
System.out.println(mapper.writeValueAsString(context.getReportNode()));
//assertEquals(TestUtils.resourceToString(reportFilename), mapper.writerWithDefaultPrettyPrinter().writeValueAsString(context.getReportNode()));
JSONAssert.assertEquals("build parameters logs", TestUtils.resourceToString(reportFilename), mapper.writeValueAsString(context.getReportNode()), REPORTER_COMPARATOR);
return assertThat(openReacParameters.getSpecificVoltageLimits()).as("SpecificVoltageLimits");
}
Expand Down
22 changes: 11 additions & 11 deletions src/test/resources/reporter_buildOpenReacParameters.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"version": "2.0",
"version": "2.1",
"dictionaries": {
"default": {
"VoltageInit": "VoltageInit",
"VoltageInitParameters": "VoltageInit parameters",
"missingVoltageLimits": "Missing voltage limits of ${nbMissingVoltageLimits} voltage levels have been replaced with user-defined default values.",
"voltageLimitModifications": "Voltage limits of ${nbVoltageLimitModifications} voltage levels have been modified according to user input.",
"voltageLimitModified": "Voltage limits of ${voltageLevelId} modified: low voltage limit = ${lowVoltageLimit}, high voltage limit = ${highVoltageLimit}"
}
},
"reportRoot": {
"messageKey": "VoltageInit",
"children": [
Expand Down Expand Up @@ -64,15 +73,6 @@
}
]
}
],
"dictionaries": {
"default": {
"VoltageInit": "VoltageInit",
"VoltageInitParameters": "VoltageInit parameters",
"missingVoltageLimits": "Missing voltage limits of ${nbMissingVoltageLimits} voltage levels have been replaced with user-defined default values.",
"voltageLimitModifications": "Voltage limits of ${nbVoltageLimitModifications} voltage levels have been modified according to user input.",
"voltageLimitModified": "Voltage limits of ${voltageLevelId} modified: low voltage limit = ${lowVoltageLimit}, high voltage limit = ${highVoltageLimit}"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"version": "2.0",
"version": "2.1",
"dictionaries": {
"default": {
"restrictedVoltageLevels": "The modifications to the low limits for certain voltage levels have been restricted to avoid negative voltage limits: ${joinedVoltageLevelsIds}",
"voltageLimitModifications": "Voltage limits of ${nbVoltageLimitModifications} voltage levels have been modified according to user input.",
"VoltageInitParameters": "VoltageInit parameters",
"VoltageInit": "VoltageInit",
"missingVoltageLimits": "Missing voltage limits of ${nbMissingVoltageLimits} voltage levels have been replaced with user-defined default values.",
"voltageLimitModified": "Voltage limits of ${voltageLevelId} modified: low voltage limit = ${lowVoltageLimit}, high voltage limit = ${highVoltageLimit}"
}
},
"reportRoot": {
"messageKey": "VoltageInit",
"children": [
Expand Down Expand Up @@ -134,16 +144,6 @@
}
]
}
],
"dictionaries": {
"default": {
"restrictedVoltageLevels": "The modifications to the low limits for certain voltage levels have been restricted to avoid negative voltage limits: ${joinedVoltageLevelsIds}",
"voltageLimitModifications": "Voltage limits of ${nbVoltageLimitModifications} voltage levels have been modified according to user input.",
"VoltageInitParameters": "VoltageInit parameters",
"VoltageInit": "VoltageInit",
"missingVoltageLimits": "Missing voltage limits of ${nbMissingVoltageLimits} voltage levels have been replaced with user-defined default values.",
"voltageLimitModified": "Voltage limits of ${voltageLevelId} modified: low voltage limit = ${lowVoltageLimit}, high voltage limit = ${highVoltageLimit}"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"version": "2.0",
"version": "2.1",
"dictionaries": {
"default": {
"restrictedVoltageLevels": "The modifications to the low limits for certain voltage levels have been restricted to avoid negative voltage limits: ${joinedVoltageLevelsIds}",
"voltageLimitModifications": "Voltage limits of ${nbVoltageLimitModifications} voltage levels have been modified according to user input.",
"VoltageInitParameters": "VoltageInit parameters",
"VoltageInit": "VoltageInit",
"missingVoltageLimits": "Missing voltage limits of ${nbMissingVoltageLimits} voltage levels have been replaced with user-defined default values.",
"voltageLimitModified": "Voltage limits of ${voltageLevelId} modified: low voltage limit = ${lowVoltageLimit}, high voltage limit = ${highVoltageLimit}"
}
},
"reportRoot": {
"messageKey": "VoltageInit",
"children": [
Expand Down Expand Up @@ -113,16 +123,6 @@
}
]
}
],
"dictionaries": {
"default": {
"restrictedVoltageLevels": "The modifications to the low limits for certain voltage levels have been restricted to avoid negative voltage limits: ${joinedVoltageLevelsIds}",
"voltageLimitModifications": "Voltage limits of ${nbVoltageLimitModifications} voltage levels have been modified according to user input.",
"VoltageInitParameters": "VoltageInit parameters",
"VoltageInit": "VoltageInit",
"missingVoltageLimits": "Missing voltage limits of ${nbMissingVoltageLimits} voltage levels have been replaced with user-defined default values.",
"voltageLimitModified": "Voltage limits of ${voltageLevelId} modified: low voltage limit = ${lowVoltageLimit}, high voltage limit = ${highVoltageLimit}"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"version": "2.0",
"version": "2.1",
"dictionaries": {
"default": {
"voltageLimitModifications": "Voltage limits of ${nbVoltageLimitModifications} voltage levels have been modified according to user input.",
"VoltageInitParameters": "VoltageInit parameters",
"VoltageInit": "VoltageInit",
"missingVoltageLimits": "Missing voltage limits of ${nbMissingVoltageLimits} voltage levels have been replaced with user-defined default values.",
"voltageLimitModified": "Voltage limits of ${voltageLevelId} modified: low voltage limit = ${lowVoltageLimit}, high voltage limit = ${highVoltageLimit}"
}
},
"reportRoot": {
"messageKey": "VoltageInit",
"children": [
Expand Down Expand Up @@ -122,15 +131,6 @@
}
]
}
],
"dictionaries": {
"default": {
"voltageLimitModifications": "Voltage limits of ${nbVoltageLimitModifications} voltage levels have been modified according to user input.",
"VoltageInitParameters": "VoltageInit parameters",
"VoltageInit": "VoltageInit",
"missingVoltageLimits": "Missing voltage limits of ${nbMissingVoltageLimits} voltage levels have been replaced with user-defined default values.",
"voltageLimitModified": "Voltage limits of ${voltageLevelId} modified: low voltage limit = ${lowVoltageLimit}, high voltage limit = ${highVoltageLimit}"
}
}
]
}
}
22 changes: 11 additions & 11 deletions src/test/resources/reporter_fourSubstations_noVoltageLimits.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"version": "2.0",
"version": "2.1",
"dictionaries": {
"default": {
"voltageLimitModifications": "Voltage limits of ${nbVoltageLimitModifications} voltage levels have been modified according to user input.",
"VoltageInitParameters": "VoltageInit parameters",
"VoltageInit": "VoltageInit",
"missingVoltageLimits": "Missing voltage limits of ${nbMissingVoltageLimits} voltage levels have been replaced with user-defined default values.",
"voltageLimitModified": "Voltage limits of ${voltageLevelId} modified: low voltage limit = ${lowVoltageLimit}, high voltage limit = ${highVoltageLimit}"
}
},
"reportRoot": {
"messageKey": "VoltageInit",
"children": [
Expand Down Expand Up @@ -101,15 +110,6 @@
}
]
}
],
"dictionaries": {
"default": {
"voltageLimitModifications": "Voltage limits of ${nbVoltageLimitModifications} voltage levels have been modified according to user input.",
"VoltageInitParameters": "VoltageInit parameters",
"VoltageInit": "VoltageInit",
"missingVoltageLimits": "Missing voltage limits of ${nbMissingVoltageLimits} voltage levels have been replaced with user-defined default values.",
"voltageLimitModified": "Voltage limits of ${voltageLevelId} modified: low voltage limit = ${lowVoltageLimit}, high voltage limit = ${highVoltageLimit}"
}
}
]
}
}

0 comments on commit 1c6f2e5

Please sign in to comment.