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

Round MSI scores #1190

Merged
merged 16 commits into from Mar 25, 2020
Merged

Round MSI scores #1190

merged 16 commits into from Mar 25, 2020

Conversation

theofidry
Copy link
Member

@theofidry theofidry commented Mar 20, 2020

  • Better min-score and min-covered-score validation
  • Round min-score & min-covered-score values
  • Round calculated MSI & covered code MSI

@theofidry theofidry changed the title Refactor/command 3 Round MSI scores Mar 20, 2020
@theofidry theofidry marked this pull request as ready for review March 23, 2020 23:53
@sanmai
Copy link
Member

sanmai commented Mar 24, 2020

IIRC the original proposal explicitly left the whole precision intact arguing that for sufficiently large project leaving only two digits past the decimal point might not be enough.

@theofidry
Copy link
Member Author

I'm fine with increasing it by one more digit for example, but having 10 of them is ridiculous :)

@sanmai
Copy link
Member

sanmai commented Mar 24, 2020

How do you think if we'd detect the precision as provided by a user, then display them as such?

@maks-rafalko
Copy link
Member

IIRC the original proposal explicitly left the whole precision intact arguing that for sufficiently large project leaving only two digits past the decimal point might not be enough.

exactly. Not sure why we reverting it here. What's the point? You see this only on CI, and only when it fails.

@theofidry
Copy link
Member Author

exactly. Not sure why we reverting it here. What's the point? You see this only on CI, and only when it fails.

3 reasons:

  • it looks absolutely ridiculous:

image

  • you don't want a failure because of a 0.0000001% difference: I'm already getting pissed at Codecov when it gives me a -0.01% code coverage...

How do you think if we'd detect the precision as provided by a user, then display them as such?

I thought about it, but there is the risk that people just use 93 instead of 93.00.

What about having a more sensible rounding, like 3 digits? I doubt it makes sense to have more. If you have such a large codebase, you probably are not running it on the whole codebase anyway

@sanmai
Copy link
Member

sanmai commented Mar 24, 2020

there is the risk that people just use 93 instead of 93.00

Cool. Then we display it with no digits past decimal point, right?

Here's the original issue: #694

@theofidry
Copy link
Member Author

#694 describes a different problem though: rounding without any digit past the decimal point at all whereas this PR is rounding with 2 digits past the decimal point

How about we try to get the precision from the user but default to 2?

@sanmai
Copy link
Member

sanmai commented Mar 24, 2020

How about we try to get the precision from the user but default to 2?

As in max(2, $userPrecision)? That'd be perfect.

@theofidry
Copy link
Member Author

Updated :)

@maks-rafalko maks-rafalko added this to the 0.17.0 milestone Mar 24, 2020
@theofidry theofidry merged commit ff601f6 into infection:master Mar 25, 2020
@theofidry theofidry deleted the refactor/command-3 branch March 25, 2020 11:20
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.

None yet

3 participants