-
Notifications
You must be signed in to change notification settings - Fork 4
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
Improvement of the code coverage #238
Conversation
Signed-off-by: Jean-Baptiste Heyberger <jean-baptiste.heyberger@rte-france.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
…does not have an impact Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
…va class for more genericity in the AdmittanceLinearResolution Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
…ution.java to have a clear separation between Admittance System to be solved and Impedance Resolution which provides the result of the inversion of the admittance system Signed-off-by: Jean-Baptiste Heyberger <jbheyberger@gmail.com> Signed-off-by: JB-H <jbheyberger@gmail.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
*/ | ||
public class CalculationLocation { | ||
|
||
private final String busLocation; |
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.
busId1 ?
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.
agree
|
||
private final String busLocation; | ||
|
||
private final String busLocationBiPhased; |
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.
busId2 to be more generic ?
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.
agree
|
||
private final String busLocationBiPhased; | ||
|
||
private final boolean voltageUpdate; |
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.
Seem not to be used?
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.
it should be used later
@@ -472,7 +472,7 @@ private void defineZones(LfNetwork network) { | |||
} | |||
|
|||
// Example to compute full sytem nodal current injectors I = Y*V | |||
public void computeCurrentInjections(AdmittanceEquationSystem.AdmittanceType admittanceType) { | |||
/*public void computeCurrentInjections(AdmittanceEquationSystem.AdmittanceType admittanceType) { |
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.
To fix before merging this PR?
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.
I commented it because it is not used and decreases the code coverage, I can try to put it in a test in a next commit
if (Math.abs(gSum) > epsilon || Math.abs(bSum) > epsilon) { | ||
double det = 1 / (gSum * gSum + bSum * bSum); | ||
if (Math.abs(gSum) > EPSILON || Math.abs(bSum) > EPSILON) { | ||
double det = 1 / (gSum * gSum + bSum * bSum); |
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.
Probably a Sonar false positive, because of the previous check it cannot be zero.
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.
Agree
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
SonarCloud Quality Gate failed. 2 Bugs |
Signed-off-by: JB-H <jbheyberger@gmail.com> Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: JB-H jbheyberger@gmail.com
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the restWhat kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change or deprecate an API? If yes, check the following:
Other information:
(if any of the questions/checkboxes don't apply, please delete them entirely)