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

Fix two-winding transformers static definition in style provider #418

Merged
merged 3 commits into from
Oct 5, 2022

Conversation

flo-dup
Copy link
Contributor

@flo-dup flo-dup commented Oct 5, 2022

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 ?
No

What kind of change does this PR introduce?
Bug fix

What is the current behavior?
In the default StyleProvider implementation, the 2-winding transformers are detected to put the appropriate voltage level style:

  • no voltage level style on the component itself
  • voltage level style for each winding subcomponent

This detection is based on 2-winding transformers component name with the use of a static method, which leaves no space for the custom 2-winding transformers.

What is the new behavior (if this is a feature change)?
In the default StyleProvider implementation, the detection of 2-winding transformers and more generally the nodes connecting two voltage levels is now based on the FeederNode::getFeeder instance. Besides, this detection can be overridden as the corresponding AbstractBaseVoltageDiagramStyleProvider::isNodeConnectingVoltageLevels visibility is protected.

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

flo-dup and others added 3 commits October 5, 2022 12:12
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 5, 2022

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 0 Code Smells

96.8% 96.8% Coverage
0.0% 0.0% Duplication

@flo-dup flo-dup merged commit 2c3c02c into main Oct 5, 2022
@flo-dup flo-dup deleted the fix_2wt_style branch October 5, 2022 13:12
flo-dup added a commit that referenced this pull request Oct 5, 2022
* StyleProvider default implementation more overridable
* Update test references as line feeder nodes have no vl style anymore

Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant