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

[v4] exclude_lines from pyproject.toml not respected #1326

Open
jakkdl opened this issue Mar 13, 2024 · 4 comments
Open

[v4] exclude_lines from pyproject.toml not respected #1326

jakkdl opened this issue Mar 13, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request Low Low Priority Issues (to be fixed or re-evaluated in 12 months

Comments

@jakkdl
Copy link

jakkdl commented Mar 13, 2024

In python-trio/trio#2951 we're trying to update to codecov-action@v4, and among other things we noticed a drop in coverage that seems to be due to our exclude_lines setting in pyproject.toml not being respected.

https://github.com/CoolCat467/trio/blob/c806b2056d6c39ee3399eadccb757874ca593f9f/pyproject.toml#L261-L282
ignores, among other things, if TYPE_CHECKING.*: and raise NotImplementedError, but looking at a file such as https://app.codecov.io/gh/python-trio/trio/pull/2951/blob/src/trio/_socket.py we can see lines matching those are marked as misses.

@rohan-at-sentry
Copy link
Contributor

@jakkdl thanks for writing in. Was this a problem before updating to v4? IOW, was the exclude_lines in pyproject.toml being honored on v3 (and still being honored)?

@jakkdl
Copy link
Author

jakkdl commented May 9, 2024

Yeah it's working perfectly fine on v3, hence the drop in coverage when upgrading to v4 (because those lines are no longer excluded and are now seen as "missed").

@thomasrockhu-codecov
Copy link
Contributor

hi @jakkdl, just need some more details here to get my head clear. Do you have

  1. a CI link running codecov@v3 where a line is ignored
  2. a CI link running codecov@v4 where the line is NOT ignored
  3. a link to where in pyproject.toml this line is being marked as excluded
  4. the path and line number in question?

That would make tracking this done a bit easier.

@thomasrockhu-codecov thomasrockhu-codecov self-assigned this May 9, 2024
@rohan-at-sentry rohan-at-sentry added bug Something isn't working and removed enhancement New feature or request labels May 9, 2024
@jakkdl
Copy link
Author

jakkdl commented May 10, 2024

  1. https://app.codecov.io/gh/python-trio/trio/blob/master/src%2Ftrio%2F_socket.py#L28
  2. https://app.codecov.io/gh/python-trio/trio/blob/codecov_v4_repro_cov_fail/src%2Ftrio%2F_socket.py#L28
  3. https://github.com/python-trio/trio/blob/c806b2056d6c39ee3399eadccb757874ca593f9f/pyproject.toml#L261
  4. 1 and 2 point directly to the path/lines in question

The original PR I linked in the OP has had changes since, such that it doesn't display the problem (but I think that's because something else broke, rather than us finding a workaround).

@thomasrockhu-codecov thomasrockhu-codecov added enhancement New feature or request Low Low Priority Issues (to be fixed or re-evaluated in 12 months and removed bug Something isn't working labels Oct 10, 2024
@codecov-hooky codecov-hooky bot added the bug Something isn't working label Oct 10, 2024
@thomasrockhu-codecov thomasrockhu-codecov removed the bug Something isn't working label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Low Low Priority Issues (to be fixed or re-evaluated in 12 months
Projects
None yet
Development

No branches or pull requests

3 participants