-
Notifications
You must be signed in to change notification settings - Fork 16
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
🐛 Use 100 for the default value of impact #1514
Conversation
It's possible for impact to be be nil, in which case we should use the default value which is 100. Using the score value doesn't make sense. It would mean that the category would change based on if it passed or failed in cases where impact was not defined.
Test Results 1 files 27 suites 1m 3s ⏱️ Results for commit 1990fef. |
{Value: nil}, | ||
// 10 high checks | ||
{Value: &explorer.ImpactValue{Value: 80}}, | ||
}, | ||
out: &Score{Value: 45, ScoreCompletion: 100, DataCompletion: 66, Weight: 20, Type: ScoreType_Result}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this part of the test.
The previous test (L273) uses impact 100. The PR description states that we use 100 for impact, when it is nil.
Shouldn't the scores be the same in the two tests? L277 vs. L294
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i copied the test on 243. This one is slightly different than the one that is directly before. score values 0, 100, 0 vs 0, 100, 100
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jaym
{Value: nil}, | ||
// 10 high checks | ||
{Value: &explorer.ImpactValue{Value: 80}}, | ||
}, | ||
out: &Score{Value: 45, ScoreCompletion: 100, DataCompletion: 66, Weight: 20, Type: ScoreType_Result}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Thanks.
It's possible for impact to be be nil, in which case we should use the default value which is 100. Using the score value doesn't make sense. It would mean that the category would change based on if it passed or failed in cases where impact was not defined.