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

Add add method to the adders API #2502

Merged
merged 9 commits into from
Mar 14, 2023
Merged

Add add method to the adders API #2502

merged 9 commits into from
Mar 14, 2023

Conversation

flo-dup
Copy link
Contributor

@flo-dup flo-dup commented Mar 13, 2023

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?
Only partly: fixes #2227

What kind of change does this PR introduce?
Feature

What is the current behavior?
Adder interfaces do not include the add method

What is the new behavior (if this is a feature change)?
Adder interfaces include the add method

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

  • 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?)

Note that it is a breaking change only for users which have added their own equipments based on the existing interfaces.

flo-dup added 3 commits March 13, 2023 22:44
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
And leave raw parameter for parameter class added

Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
@flo-dup flo-dup added the Breaking Change API is broken label Mar 13, 2023
@flo-dup flo-dup requested a review from miovd March 13, 2023 22:22
import com.powsybl.iidm.network.IdentifiableAdder;
import com.powsybl.iidm.network.util.Identifiables;

/**
* @author Thomas Adam <tadam at silicom.fr>
*/
abstract class AbstractIdentifiableAdderAdapter<I extends IdentifiableAdder<I>> extends AbstractAdapter<I> implements IdentifiableAdder<I> {
abstract class AbstractIdentifiableAdderAdapter<T extends Identifiable<? super T>, I extends IdentifiableAdder<T, I>> extends AbstractAdapter<I> implements IdentifiableAdder<T, I> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question as in BranchAdder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's again because of TieLine, which makes BranchAdder have the same kind of parameter, and as BranchAdder extends AbstractIdentifiable we need the same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After the merge I needed the same for AbstractSimpleIdentifiableXml

Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
flo-dup added 4 commits March 14, 2023 12:05
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
@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 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@miovd miovd merged commit cb8f63e into main Mar 14, 2023
@miovd miovd deleted the enrich_adder branch March 14, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change API is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InjectionAdder::add
2 participants