-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
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
Omit project_euler/
from coverage reports
#10469
Conversation
pyproject.toml
Outdated
omit = [ | ||
".env/*", | ||
"project_euler/*", | ||
"scripts/*" |
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.
Let's leave scripts in. I dislike not testing things.
"scripts/*" |
I think the coverage report is way too long and users need to scroll across hundreds of lines (that no one reads) to find their failing pytests.
Would it be possible to put coverage in a separate GitHub Actions step so its output is not tagged directly on the end of pytest output?
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 could break up pytest
into two separate workflows, one for tests and one for coverage.
Current:
- name: Run tests
# TODO: #8818 Re-enable quantum tests
run: pytest
--ignore=quantum/q_fourier_transform.py
--ignore=project_euler/
--ignore=scripts/validate_solutions.py
--cov-report=term-missing:skip-covered
--cov=. .
Proposed:
- name: Run tests
# TODO: #8818 Re-enable quantum tests
run: pytest
--ignore=quantum/q_fourier_transform.py
--ignore=project_euler/
--ignore=scripts/validate_solutions.py
- name: Check test coverage
run: pytest
--cov-report=term-missing:skip-covered
--cov=.
If this looks good to you, I can make this change in a separate PR.
project_euler/
and scripts/
from coverage reportsproject_euler/
from coverage reports
* Omit project_euler/ and scripts/ from coverage reports * Add scripts/ back into coverage reports
Describe your change:
Our current
pytest
command for our builds is the following:Since we're not testing files in the
project_euler/
orscripts/
directories, we should exclude them from our builds' coverage reports as well.project_euler/
files in particular significantly clutter the reports.Checklist: