Skip to content

[WIP] Round power values for SA power distribution reports#1194

Closed
vmouradian wants to merge 1 commit intomainfrom
sa-distribution-round-reports
Closed

[WIP] Round power values for SA power distribution reports#1194
vmouradian wants to merge 1 commit intomainfrom
sa-distribution-round-reports

Conversation

@vmouradian
Copy link
Copy Markdown
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)

Reports for active power distribution in SA can have a 0.0 value or a very small one (like 1.654765476E-15) depending on the runs which cause uncertainty for unit tests results.
In this PR, suggestion is to format them to "%.2f"

Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
@vmouradian vmouradian self-assigned this Feb 24, 2025
@vmouradian vmouradian changed the title Round poxer values for SA power distribution reports Round power values for SA power distribution reports Feb 24, 2025
@sonarqubecloud
Copy link
Copy Markdown

@vmouradian vmouradian marked this pull request as draft February 24, 2025 13:42
.withUntypedValue(MISMATCH, mismatch)
.withUntypedValue("distributed", mismatch - remaining)
.withUntypedValue("remaining", remaining)
.withUntypedValue(MISMATCH, String.format(Locale.UK, "%.2f", mismatch))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not the right way to solve this issue because you lost the value type (double -> String) in the report model just for testing purpose.
This PR will provide a better way to handle this.

@geofjamg
Copy link
Copy Markdown
Member

May will close it ?

@geofjamg geofjamg changed the title Round power values for SA power distribution reports [WIP] Round power values for SA power distribution reports Feb 24, 2025
@jeandemanged
Copy link
Copy Markdown
Member

closing, will be fixed by #1187 instead

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.

3 participants