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
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8a9ab4d
debug codecov path
josephleekl Jan 27, 2025
a300e55
Auto update version from '0.41.0-dev8' to '0.41.0-dev9'
ringo-but-quantum Jan 27, 2025
025079c
Merge branch 'master' into fix-codecov-path
josephleekl Jan 27, 2025
93666a1
use python -m pytest
josephleekl Jan 27, 2025
dd06223
Auto update version from '0.41.0-dev9' to '0.41.0-dev10'
ringo-but-quantum Jan 27, 2025
e03ec1a
remove source
josephleekl Jan 28, 2025
d3f0bad
delete source earlier
josephleekl Jan 28, 2025
3bccc40
install wheel before combine
josephleekl Jan 28, 2025
a9510cc
Auto update version from '0.41.0-dev10' to '0.41.0-dev11'
ringo-but-quantum Jan 28, 2025
5f99770
Merge branch 'master' into fix-codecov-path
josephleekl Jan 28, 2025
1e1dcab
get python
josephleekl Jan 28, 2025
0addba5
remove unnecessary dependencies
josephleekl Jan 28, 2025
4bb0e08
add comment
josephleekl Jan 28, 2025
483b01a
update changelog
josephleekl Jan 28, 2025
077a61c
remove openblas dep
josephleekl Jan 28, 2025
24fea5a
fix oepnblas
josephleekl Jan 28, 2025
585ac72
fix space
josephleekl Jan 28, 2025
e839cae
trigger CI
josephleekl Jan 28, 2025
9a72e9e
remove install requirements-dev.txt
josephleekl Jan 28, 2025
7ff9c47
Merge branch 'master' into fix-codecov-path
josephleekl Jan 29, 2025
6290071
Auto update version from '0.41.0-dev11' to '0.41.0-dev12'
ringo-but-quantum Jan 29, 2025
3be31c3
Merge branch 'master' into fix-codecov-path
josephleekl Jan 29, 2025
e754d90
Auto update version from '0.41.0-dev12' to '0.41.0-dev13'
ringo-but-quantum Jan 29, 2025
53a15f6
Merge branch 'master' into fix-codecov-path
josephleekl Jan 29, 2025
25d41ce
Auto update version from '0.41.0-dev14' to '0.41.0-dev15'
ringo-but-quantum Jan 29, 2025
b074ae7
update lkcpu as well
josephleekl Jan 31, 2025
115ced8
rename, don't remove
josephleekl Jan 31, 2025
c5ae43a
add needs
josephleekl Jan 31, 2025
208b92d
get toml
josephleekl Jan 31, 2025
f1b9b93
update coveragerc
josephleekl Jan 31, 2025
e2f1849
debug pathmap
josephleekl Jan 31, 2025
f07ba46
change paths
josephleekl Jan 31, 2025
a7943fe
change lk
josephleekl Feb 3, 2025
3fbc52d
remove editable coverage
josephleekl Feb 3, 2025
9046142
fix path
josephleekl Feb 3, 2025
1f2b7e4
don't install wheel
josephleekl Feb 4, 2025
f70c6ad
Auto update version from '0.41.0-dev15' to '0.41.0-dev17'
ringo-but-quantum Feb 4, 2025
94dfb65
trigger CI
josephleekl Feb 4, 2025
cf25ffc
Merge branch 'master' into fix-codecov-path
josephleekl Feb 4, 2025
4ee08dc
use ROOT_DIR
josephleekl Feb 4, 2025
5d34107
update lq path
josephleekl Feb 4, 2025
96a39d5
remove lk dependency
josephleekl Feb 4, 2025
1ec9e85
ali comments
josephleekl Feb 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

### Improvements

* Fix CI to collect Python code coverage for Lightning-Qubit.
[(#1053)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1053)

* Replace the type checking using the property `return_type` of `MeasurementProcess` with direct `isinstance` checks.
[(#1044)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1044)

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/tests_lqcpu_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ jobs:
- name: Run PennyLane-Lightning integration tests
run: |
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"`
# Remove source files here to ensure pytest collect source coverage from wheel package
rm -r pennylane_lightning
pl-device-test --device ${DEVICENAME} --skip-ops --shots=10000 $COVERAGE_FLAGS --cov-append
pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append

Expand Down Expand Up @@ -247,14 +249,41 @@ jobs:
upload-to-codecov-linux-python:
if: github.event_name == 'pull_request'
needs: [test_lightning_qubit_wheels]
strategy:
matrix:
josephleekl marked this conversation as resolved.
Show resolved Hide resolved
pl_backend: ["lightning_qubit"]
blas: ["OFF"]
josephleekl marked this conversation as resolved.
Show resolved Hide resolved
name: Upload python coverage data to codecov
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.10'

- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true

- uses: actions/download-artifact@v4
with:
name: ${{ matrix.pl_backend }}-${{ matrix.blas }}_name.txt
path: ${{ github.workspace }}

- uses: actions/download-artifact@v4
with:
name: wheel_${{ matrix.pl_backend }}-${{ matrix.blas }}.whl
path: ${{ github.workspace }}

- name: Get required Python packages
run: |
# Install wheel to get source files for combining coverage files
WHEEL_NAME=$(cat ${{ github.workspace }}/${{ matrix.pl_backend }}-${{ matrix.blas }}_name.txt)
mv ${{ github.workspace }}/wheel_${{ matrix.pl_backend }}-${{ matrix.blas }}.whl ${{ github.workspace }}/$WHEEL_NAME
python -m pip install -r requirements-dev.txt
josephleekl marked this conversation as resolved.
Show resolved Hide resolved
python -m pip install ${{ github.workspace }}/$WHEEL_NAME --no-deps --force-reinstall

- name: Download coverage reports
uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.41.0-dev10"
__version__ = "0.41.0-dev11"
Loading