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

Increase Python Coverage #410

Merged
merged 7 commits into from
Jul 24, 2023
Merged

Conversation

apurvakhatri
Copy link
Contributor

*Issue number of the reported bug or feature request: #351 *

Describe your changes
The changes are - Python coverage report is generated & published to Codecov. Further, The report is analyzed & pragma no cover is added to increase test coverage.

Testing performed
I tested on a personal fork of the project using appropriate secrets for personal CodeCov.

Additional context
In order to publish python coverage to codecov build.yml had to be modified. During build the python coverage had to be performed using the development dependencies on ubuntu-latest & alpine linux container (Line 67 & 101 of build.yml respectively). This part of the build was failing as the systems were lacing lcov. Therefore lcov was added using apt-get & apk add for ubuntu & alpine respectively. Further, the publishing of code coverage report was resolved, but still 1 test is failing as the genhtml is unable to ignore the linecov error on alpine linux whereas it ignores it on ubuntu-latest. Any help on how to resolve this 1 check would be greatly appreciated. Thank you!

@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +6.48 🎉

Comparison is base (ae12d50) 85.18% compared to head (42c545c) 91.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #410      +/-   ##
==========================================
+ Coverage   85.18%   91.66%   +6.48%     
==========================================
  Files          29       90      +61     
  Lines        3631    10503    +6872     
  Branches        0     1448    +1448     
==========================================
+ Hits         3093     9628    +6535     
- Misses        538      872     +334     
- Partials        0        3       +3     
Flag Coverage Δ
cpp 85.04% <ø> (-0.14%) ⬇️
python_and_cython 95.16% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tests/unit/test_reader.py 100.00% <ø> (ø)
tests/unit/test_stats_reporter.py 100.00% <ø> (ø)
tests/integration/test_api.py 98.07% <100.00%> (ø)
tests/integration/test_extensions.py 100.00% <100.00%> (ø)
tests/integration/test_processes.py 31.52% <100.00%> (ø)
tests/integration/test_tracing.py 99.81% <100.00%> (ø)
tests/integration/test_tracking.py 97.38% <100.00%> (ø)

... and 56 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pablogsal
Copy link
Member

Hummm, seems that some of the parts that were added are having some problem (for some reason only on Alpine):

/venv/bin/python -m coverage lcov -i -o pycoverage.lcov
Wrote LCOV report to pycoverage.lcov
genhtml *coverage.lcov  --branch-coverage --output-directory memray-coverage
Found 61 entries.
Found common filename prefix "/__w/memray/memray"
Generating output.
Processing file src/memray/reporters/summary.py
  lines=19 hit=19 branches=3 hit=3
Processing file src/memray/commands/summary.py
  lines=35 hit=35 branches=8 hit=8
Processing file tests/integration/test_processes.py
genhtml: ERROR: line 0 of tests/integration/test_processes.py has branchcov but no linecov data
	(use "genhtml --ignore-errors category ..." to bypass this error)
make: *** [Makefile:70: pycoverage] Error 1

@pablogsal pablogsal force-pushed the IncreasePythonCov branch 2 times, most recently from 0574be4 to 6a7736d Compare July 17, 2023 17:59
@pablogsal pablogsal enabled auto-merge (squash) July 24, 2023 12:28
@pablogsal pablogsal disabled auto-merge July 24, 2023 12:28
@pablogsal pablogsal enabled auto-merge (squash) July 24, 2023 12:29
Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for contributing to memray @apurvakhatri !

@pablogsal pablogsal merged commit d04e103 into bloomberg:main Jul 24, 2023
31 of 32 checks passed
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.

3 participants