Skip to content
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

3204 fix the handle of not applicable networkmodification when throwexception boolean is present #3304

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

cphili
Copy link

@cphili cphili commented Feb 3, 2025

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?

Fixes #3204

What kind of change does this PR introduce?

Call logOrThrow method in NetworkModification::apply implementations

Some NetworkModifications threw an Exception in all cases, now they only throw when throwException is true :

AbstractTripping
CloseSwitch
ConnectGenerator
OpenSwitch
PhaseShifterOptimizeTap
PhaseShifterSetAsFixedTap
PhaseShifterShiftTap
ShuntCompensatorModification

Does this PR introduce a new Powsybl Action implying to be implemented in simulators or pypowsybl?

  • Yes
  • No

What is the current behavior?

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Not really a breaking change, but the behavior of some NetworkModifications was changed by this PR. They threw an Exception when a problem was encountered, even when throwException was set to false when calling the apply(...) method. They are:

  • <to be completed>

Other information:

Copy link
Member

@olperr1 olperr1 left a comment

Choose a reason for hiding this comment

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

@cphili Some units tests are failing and should be fixed.
We will fix the DCO check later. Please just don't merge main in this branch for now.

@cphili cphili changed the title 3204 fix the handle of not applicable networkmodification when throwexception boolean is present [WIP] 3204 fix the handle of not applicable networkmodification when throwexception boolean is present Feb 5, 2025
@cphili cphili marked this pull request as draft February 5, 2025 16:45
@cphili cphili force-pushed the 3204-fix-the-handle-of-not-applicable-networkmodification-when-throwexception-boolean-is-present branch from 1e0f8f5 to c5f6b5b Compare February 5, 2025 17:13
@cphili cphili changed the title [WIP] 3204 fix the handle of not applicable networkmodification when throwexception boolean is present 3204 fix the handle of not applicable networkmodification when throwexception boolean is present Feb 6, 2025
@cphili cphili force-pushed the 3204-fix-the-handle-of-not-applicable-networkmodification-when-throwexception-boolean-is-present branch from 8526da0 to 942758c Compare February 6, 2025 14:49
@cphili cphili force-pushed the 3204-fix-the-handle-of-not-applicable-networkmodification-when-throwexception-boolean-is-present branch 2 times, most recently from 6296a23 to 8195040 Compare February 7, 2025 10:41
@cphili cphili marked this pull request as ready for review February 7, 2025 12:42
@cphili cphili requested a review from olperr1 February 10, 2025 08:49
@cphili cphili force-pushed the 3204-fix-the-handle-of-not-applicable-networkmodification-when-throwexception-boolean-is-present branch from dcb25ea to 2508851 Compare February 14, 2025 17:28
Signed-off-by: Clement Philipot <[email protected]>
Signed-off-by: Clement Philipot <[email protected]>
Signed-off-by: Clement Philipot <[email protected]>
Signed-off-by: Clement Philipot <[email protected]>
Signed-off-by: Clement Philipot <[email protected]>
Signed-off-by: Clement Philipot <[email protected]>
@cphili cphili force-pushed the 3204-fix-the-handle-of-not-applicable-networkmodification-when-throwexception-boolean-is-present branch from 2508851 to e4e90df Compare February 17, 2025 08:06
@olperr1
Copy link
Member

olperr1 commented Feb 17, 2025

Can you also take a look at the sonar issues? Some can be easily fixed.

Signed-off-by: Clement Philipot <[email protected]>
Signed-off-by: Clement Philipot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for review
Development

Successfully merging this pull request may close these issues.

Fix the handle of not applicable NetworkModification when throwException boolean is present
3 participants