-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add logs on voltage limits #46
Changes from 17 commits
c8c4009
2ddfc46
c6ede79
bc03a8f
70739ca
508c5ac
71180a9
aff60c2
44f827a
bd91ab1
71585a3
5ab800f
8fb02ec
96cc4bd
9b3dbc3
cd42064
fc7e221
d06fe52
438e199
68cf7b5
e0ec908
a319191
81a5645
ef08b99
86fc6fd
cf2c51f
e55c5b2
1bfd3cb
482d1ff
59af616
61944b6
37d7f93
c6803d2
da02c0c
6b0ac31
98f9936
50c62ff
9473f45
4a3d669
22b73d4
5805e75
0a96d37
27f6583
3f94e7c
8301e9d
1a7f24d
dbb6a39
5e6bdda
50266a1
4fe8d79
f61e7a7
7d042e2
b4f051a
01020e9
94000b5
6291593
c21ef21
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the purpose of this file? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use common lombok config as base |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import target/configs/powsybl-build-tools.jar!powsybl-build-tools/lombok.config |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,21 +189,11 @@ | |
<artifactId>powsybl-iidm-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.squareup.okhttp3</groupId> | ||
<artifactId>okhttp</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.squareup.okhttp3</groupId> | ||
<artifactId>mockwebserver</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated change
This comment was marked as outdated.
Sorry, something went wrong. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved to #51 |
||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-guava</artifactId> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,35 +6,32 @@ | |
*/ | ||
package org.gridsuite.voltageinit.server.service; | ||
|
||
import lombok.Getter; | ||
import com.powsybl.commons.reporter.Reporter; | ||
import com.powsybl.commons.reporter.ReporterModel; | ||
import lombok.Data; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.Objects; | ||
import java.util.UUID; | ||
|
||
/** | ||
* @author Etienne Homer <etienne.homer at rte-france.com> | ||
*/ | ||
@Getter | ||
@Data | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but need toString when dumping the object There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And when do you dump it ? |
||
public class VoltageInitRunContext { | ||
private static final String VOLTAGE_INIT_TYPE_REPORT = "VoltageInit"; | ||
|
||
private final UUID networkUuid; | ||
|
||
Tristan-WorkGH marked this conversation as resolved.
Show resolved
Hide resolved
|
||
private final String variantId; | ||
|
||
private final String receiver; | ||
|
||
private final UUID reportUuid; | ||
|
||
private final String reporterId; | ||
|
||
private final String reportType; | ||
|
||
private final String userId; | ||
|
||
private final UUID parametersUuid; | ||
|
||
private final Map<String, Double> voltageLevelsIdsRestricted; | ||
Tristan-WorkGH marked this conversation as resolved.
Show resolved
Hide resolved
|
||
private final Reporter rootReporter; | ||
|
||
public VoltageInitRunContext(UUID networkUuid, String variantId, String receiver, UUID reportUuid, String reporterId, String reportType, String userId, UUID parametersUuid, Map<String, Double> voltageLevelsIdsRestricted) { | ||
this.networkUuid = Objects.requireNonNull(networkUuid); | ||
|
@@ -46,5 +43,15 @@ public VoltageInitRunContext(UUID networkUuid, String variantId, String receiver | |
this.userId = userId; | ||
this.parametersUuid = parametersUuid; | ||
this.voltageLevelsIdsRestricted = voltageLevelsIdsRestricted; | ||
if (this.reportUuid == null) { | ||
Tristan-WorkGH marked this conversation as resolved.
Show resolved
Hide resolved
|
||
this.rootReporter = Reporter.NO_OP; | ||
} else { | ||
final String rootReporterId = reporterId == null ? VOLTAGE_INIT_TYPE_REPORT : reporterId + "@" + reportType; | ||
this.rootReporter = new ReporterModel(rootReporterId, rootReporterId); | ||
} | ||
} | ||
|
||
public VoltageInitRunContext(UUID networkUuid, String variantId, String receiver, UUID reportUuid, String reporterId, String reportType, String userId, UUID parametersUuid) { | ||
this(networkUuid, variantId, receiver, reportUuid, reporterId, reportType, userId, parametersUuid, new HashMap<>()); | ||
} | ||
} | ||
Comment on lines
+50
to
53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We sometimes construct the context without specifying all data. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to remove if you don't use it in the code? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is used in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because you added it in 0a96d37... |
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.
What is the purpose of this file?
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.
The project was missing
.mvn/lombok-config-copy.marker
&lombok.config
, with consequence of very bad coverage with Sonar for example.