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
[DM-34420] Turn on coverage option #220
Conversation
Codecov ReportBase: 83.14% // Head: 82.40% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #220 +/- ##
==========================================
- Coverage 83.14% 82.40% -0.75%
==========================================
Files 46 46
Lines 3982 4030 +48
Branches 757 769 +12
==========================================
+ Hits 3311 3321 +10
- Misses 485 523 +38
Partials 186 186
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
187c022
to
2ec0e78
Compare
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.
Looks great. There are some changes that need to be made to clean things up a little but I will mark it approved.
|
||
coveragerc = os.path.join(pathlib.Path(__file__).parent.resolve(), "coveragerc") | ||
cov = coverage.Coverage( | ||
branch=True, concurrency="multiprocessing", config_file=coveragerc, source_pkgs=coverage_packages |
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.
can't we say config_file=False
here and then not need the coveragerc file at all? It looks like we are overriding the content anyhow.
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.
We need the coveragerc file because of the multiprocessing concurrency, otherwise it gives this error:
coverage.exceptions.ConfigError: multiprocessing requires a configuration file
cov = coverage.Coverage( | ||
branch=True, concurrency="multiprocessing", config_file=coveragerc, source_pkgs=coverage_packages | ||
) | ||
cov.load() |
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.
It's this line that is loading previous coverage data. You need to think about what that means. It might be a useful feature if we understood how it worked.
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 for catching that, that's from the coverage docs that has that in there I think. I'd rather just not have it load previous results as that is super confusing, at least it was for me.
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.
Okay. You might have to add it to the extra files included when the PyPI package is built since it's not a .py file so won't be found by default (like the py.typed file isn't). See the pyproject.toml file.
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 deleted the file and just am programmatically generating it from the code now since you said we may be overriding it, so I shouldn't need to add it anywhere else, it's just a string in there
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.
Lines 130-137
679733f
to
4539dc3
Compare
I've rebased and am ready to commit this, please shout if you don't want me to. |
Checklist
doc/changes