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

Migrate to new report API #139

Closed
wants to merge 11 commits into from
Closed

Migrate to new report API #139

wants to merge 11 commits into from

Conversation

zamarrenolm
Copy link
Member

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?

What kind of change does this PR introduce?

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)

Other information:

Signed-off-by: Luma <zamarrenolm@aia.es>
@zamarrenolm zamarrenolm requested a review from flo-dup March 11, 2024 17:01
Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Luma <zamarrenolm@aia.es>

BalanceComputationRunningContext context = new BalanceComputationRunningContext(areas, network, parameters, reporter);
BalanceComputationRunningContext context = new BalanceComputationRunningContext(areas, network, parameters, reportNode);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering why we give two reportNodes to the context even though it's useless 🤨 Not the purpose of this PR anyway!

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree, it is not clear that the two report nodes are needed. I just kept the same behaviours, just upgrading to the new report API.

Copy link
Member

@jeandemanged jeandemanged Mar 12, 2024

Choose a reason for hiding this comment

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

@zamarrenolm you may clarify via comments that (please adjust with new reporting api terminology, unsure of correct new terms ...):

  • reportNode is the root reporter / provided when calling run
  • iterationReportNode is subreporter for the current balancing iteration

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated with comments. Also used the method to obtain the root report node from the context, to make explicit that the balance adjustment different steps have it available through the context as eventually the complexity of the current calculation could be split in many lower level methods.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks Luma for clarifying with comments. Nonetheless I think it would be clearer to remove the two ReportNodes from the context, as hiding them in this object does not help understanding the reports split... but again it's not the purpose of current PR!

Copy link
Member

Choose a reason for hiding this comment

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

@flo-dup I don't understand previous comments '... it's useless ...', 'it would be clearer to remove the two ReportNodes', '... hiding ...'

The two report nodes are different, they are both useful, and should not be removed.
They are not hidden in the context, it is the opposite, they are made available via the context, so they can actually be used.

…shot

Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Luma <zamarrenolm@aia.es>
Copy link
Contributor

@flo-dup flo-dup left a comment

Choose a reason for hiding this comment

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

Ok once powsybl-olf is released and the CI is reverted

@annetill
Copy link
Member

annetill commented Apr 4, 2024

Included in #141

@annetill annetill closed this Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants