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

Fix code coverage for LQ/LK CPU Python #1053

Merged
merged 43 commits into from
Feb 5, 2025
Merged

Fix code coverage for LQ/LK CPU Python #1053

merged 43 commits into from
Feb 5, 2025

Conversation

josephleekl
Copy link
Contributor

@josephleekl josephleekl commented Jan 27, 2025

Before submitting

Please complete the following checklist when submitting a PR:

  • All new features must include a unit test.
    If you've fixed a bug or added code that should be tested, add a test to the
    tests directory!

  • All new functions and code must be clearly commented and documented.
    If you do make documentation changes, make sure that the docs build and
    render correctly by running make docs.

  • Ensure that the test suite passes, by running make test.

  • Add a new entry to the .github/CHANGELOG.md file, summarizing the
    change, and including a link back to the PR.

  • Ensure that code is properly formatted by running make format.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Context:
Currently Lightning Qubit and Lightning Kokkos (CPU) Python coverage is not collected, leading to low coverage in LQ and LK as seen here (Previously LK contains coverage from GPU tests, but not CPU tests).

Description of the Change:
In the lkcpu and lqcpu python CI:

  • Delete the source files from repo, so that the source files from wheel can be tracked by coverage
  • During the step to combine the coverage files, we add the equivalent source files to .coveragerc so they can be combined properly

Benefits:
We will have coverage for LQ/LK python again, as seen here.

Possible Drawbacks:

Related GitHub Issues:

[sc-83296]

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.60%. Comparing base (e727c46) to head (1ec9e85).
Report is 1 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (e727c46) and HEAD (1ec9e85). Click for more details.

HEAD has 29 uploads less than BASE
Flag BASE (e727c46) HEAD (1ec9e85)
35 6
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1053       +/-   ##
===========================================
- Coverage   97.86%   62.60%   -35.26%     
===========================================
  Files         233       29      -204     
  Lines       39537     2607    -36930     
===========================================
- Hits        38691     1632    -37059     
- Misses        846      975      +129     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@josephleekl josephleekl changed the title Fix codecov issue Fix code coverage for LQ CPU Python Jan 28, 2025
@josephleekl josephleekl marked this pull request as ready for review January 28, 2025 19:28
@LuisAlfredoNu LuisAlfredoNu added the ci:build_wheels Activate wheel building. label Jan 28, 2025
@AmintorDusko
Copy link
Contributor

@josephleekl, many CIs are failing at the moment. Let me know when fixed. 🙂

@josephleekl
Copy link
Contributor Author

josephleekl commented Jan 28, 2025

@josephleekl, many CIs are failing at the moment. Let me know when fixed. 🙂

Thanks @AmintorDusko , the failed CIs are all related to ARM Wheel builds, which is a separate unrelated issue. We're seeing those on master branch too (e.g.); @maliasadi mentioned he'll investigate that issue later on.

update: the issue is fixed with this PR

.github/workflows/tests_lqcpu_python.yml Outdated Show resolved Hide resolved
.github/workflows/tests_lqcpu_python.yml Outdated Show resolved Hide resolved
@josephleekl
Copy link
Contributor Author

josephleekl commented Jan 30, 2025

@josephleekl, many CIs are failing at the moment. Let me know when fixed. 🙂

Thanks @AmintorDusko , the failed CIs are all related to ARM Wheel builds, which is a separate unrelated issue. We're seeing those on master branch too (e.g.); @maliasadi mentioned he'll investigate that issue later on.
update: the issue is fixed with this PR

Makes sense. Let me know when CIs are green here (after the other PR etc.).

CIs are green again @AmintorDusko :)

@josephleekl josephleekl requested a review from maliasadi January 30, 2025 15:33
Copy link
Contributor

@AmintorDusko AmintorDusko left a comment

Choose a reason for hiding this comment

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

Thank you, @josephleekl! Nice increase in Coverage! Cheers!

@josephleekl josephleekl changed the title Fix code coverage for LQ CPU Python Fix code coverage for LQ/LK CPU Python Jan 31, 2025
@josephleekl josephleekl removed the ci:build_wheels Activate wheel building. label Jan 31, 2025
Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

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

Thanks @josephleekl! Nice work 🥳

.github/CHANGELOG.md Outdated Show resolved Hide resolved
.github/workflows/tests_lkcpu_python.yml Outdated Show resolved Hide resolved
.github/workflows/tests_lkcpu_python.yml Show resolved Hide resolved
@josephleekl josephleekl merged commit b553e49 into master Feb 5, 2025
65 of 66 checks passed
@josephleekl josephleekl deleted the fix-codecov-path branch February 5, 2025 18:19
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.

5 participants