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

Update traverse API (#362, #367, #394 and #387) #426

Merged
merged 11 commits into from
May 24, 2022

Conversation

sebalaig
Copy link
Contributor

@sebalaig sebalaig commented Feb 11, 2022

Signed-off-by: Sébastien LAIGRE [email protected]

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • 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 ? If so, link to this issue using '#XXX' and skip the rest
Closes #362
Closes #367
Closes #383 (updated in #387)
Closes #387
Closes #388
Closes #394

Also backport powsybl/powsybl-core#2044

What 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:

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

@sebalaig sebalaig force-pushed the issue362-stop-traversal-from-main branch 2 times, most recently from 0dc053f to 4beebf4 Compare February 28, 2022 09:06
@sebalaig sebalaig force-pushed the issue362-stop-traversal-from-main branch from 71223a1 to c46cddb Compare February 28, 2022 11:49
@sebalaig sebalaig self-assigned this Mar 14, 2022
@sebalaig sebalaig requested a review from mathbagu March 14, 2022 12:51
@sebalaig sebalaig force-pushed the issue362-stop-traversal-from-main branch from eb5d179 to cc96bb2 Compare March 14, 2022 12:52
@sebalaig sebalaig changed the title WIP: Update traverse API (#362, #367, #394 and #387) Update traverse API (#362, #367, #394 and #387) Mar 14, 2022
Copy link

@mathbagu mathbagu left a comment

Choose a reason for hiding this comment

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

I will open a pull request soon in powsybl-core that fixes few inconsistencies you have to backport too. I will put the link in the conversation

include/powsybl/iidm/VoltageLevelViews.hpp Outdated Show resolved Hide resolved
src/iidm/BusBreakerVoltageLevel.cpp Outdated Show resolved Hide resolved
src/iidm/BusBreakerVoltageLevelViews.cpp Outdated Show resolved Hide resolved
src/iidm/BusTerminal.cpp Outdated Show resolved Hide resolved
src/iidm/NodeBreakerVoltageLevelViews.cpp Outdated Show resolved Hide resolved
src/iidm/NodeTerminal.cpp Outdated Show resolved Hide resolved
src/iidm/util/Networks.cpp Outdated Show resolved Hide resolved
for (const Switch& sw : topo.getSwitches() | boost::adaptors::filtered(filterNotEncounteredSwitches)) {
topo.removeSwitch(sw.getId());
}
}

Choose a reason for hiding this comment

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

It's not totally equivalent to Java implementation, is it not simpler if the encounteredSwitches is converted to a Set of ID. Then, the filter could be simplified and the whole method would be more maintainable.

test/iidm/util/NodeBreakerTopologyTest.cpp Outdated Show resolved Hide resolved
Copy link

@mathbagu mathbagu left a comment

Choose a reason for hiding this comment

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

Could you please backport this PR (powsybl/powsybl-core#2044)? Don't forget to update the content of the issue related to this PR to mention the PR.

src/iidm/BusBreakerVoltageLevel.hpp Outdated Show resolved Hide resolved
src/iidm/NodeTerminal.cpp Outdated Show resolved Hide resolved
@sebalaig sebalaig requested a review from mathbagu May 24, 2022 08:44
@sebalaig
Copy link
Contributor Author

Could you please backport this PR (powsybl/powsybl-core#2044)? Don't forget to update the content of the issue related to this PR to mention the PR.

There is no such issue in C++, but I mentionned PR#2044 in this PR's description.

@sebalaig sebalaig force-pushed the issue362-stop-traversal-from-main branch from 624c288 to 5ba4804 Compare May 24, 2022 16:10
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

69.1% 69.1% Coverage
0.3% 0.3% Duplication

@mathbagu mathbagu merged commit 1b7aad8 into integration/v1.6.0 May 24, 2022
@mathbagu mathbagu deleted the issue362-stop-traversal-from-main branch May 24, 2022 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants