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 new method withNetworkElement for InjectionRangeActionAdder #1087

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

Conversation

wangjer
Copy link
Collaborator

@wangjer wangjer commented Jul 9, 2024

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)

What kind of change does this PR introduce?
Feature

What is the current behavior?
Adding a new network element to an "InjectionRangeAction" requires to use "withNetworkElementAndKey" method.

What is the new behavior (if this is a feature change)?
We can now use withNetworkElement method instead, so that "key" argument is set to 1.0 by default

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)

Other information:

Signed-off-by: wangjer <jeremy.wang@rte-france.com>
@wangjer wangjer self-assigned this Jul 9, 2024
@wangjer wangjer requested a review from pet-mit July 9, 2024 13:28
Comment on lines 134 to 135
.withNetworkElement(injectionId1)
.withNetworkElement(injectionId2, injectionName2)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we want this to add both elements with key = 1, or only the last added element (i.e. injectionId2), with key = 1. what do you think @phiedw ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would say if you call withNetworkElement you should only be able to call it once (calling it more would throw an error telling you to call withNetworkElementAndKey if you want to add multiple injections).

Copy link
Collaborator

Choose a reason for hiding this comment

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

@wangjer can you please update the branch following these comments?

@pet-mit pet-mit added next-release This issue or pull request should be resolved before next release PR: waiting-for-review This PR is waiting to be reviewed PR: waiting-for-info-reviewer This PR is waiting for information from its reviewer labels Jul 12, 2024
@pet-mit pet-mit requested a review from phiedw July 12, 2024 10:48
wangjer and others added 3 commits August 21, 2024 10:32
Signed-off-by: wangjer <jeremy.wang@rte-france.com>
Signed-off-by: wangjer <jeremy.wang@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next-release This issue or pull request should be resolved before next release PR: waiting-for-info-reviewer This PR is waiting for information from its reviewer PR: waiting-for-review This PR is waiting to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants