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

codecov - fix syntax for excluding code lines from coverage #6240

Merged
merged 3 commits into from Aug 15, 2023

Conversation

pavoljuhas
Copy link
Collaborator

@pavoljuhas pavoljuhas commented Aug 14, 2023

The coverage tool understands # pragma: no cover markup comments to exclude
code lines from coverage analysis. The previous syntax # coverage: ignore
had no effect and resulted in spurious coverage changes for a different code
paths taken.

Removing the codecov.yml file, because coverage precision had no effect on
codecov complaints about decreased coverage.

Spurious codecov deltas will hopefully go away this time.
@pavoljuhas pavoljuhas requested review from vtomole, cduck and a team as code owners August 14, 2023 01:38
@CirqBot CirqBot added the Size: XS <10 lines changed label Aug 14, 2023
@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c193c48) 97.3% compared to head (a4af0e6) 97.3%.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #6240   +/-   ##
======================================
  Coverage    97.3%   97.3%           
======================================
  Files        1116    1116           
  Lines       96174   96154   -20     
======================================
- Hits        93651   93641   -10     
+ Misses       2523    2513   -10     
Files Changed Coverage Δ
cirq-core/cirq/circuits/circuit_operation_test.py 100.0% <ø> (+0.1%) ⬆️
...ristic_decompositions/two_qubit_gate_tabulation.py 100.0% <ø> (+0.6%) ⬆️
examples/bernstein_vazirani.py 97.0% <ø> (-0.2%) ⬇️
examples/deutsch.py 96.0% <ø> (+2.8%) ⬆️
examples/shor.py 100.0% <ø> (+5.6%) ⬆️

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

@pavoljuhas pavoljuhas marked this pull request as draft August 14, 2023 18:14
The `coverage` package obeys `# pragma: no cover`.
The previous syntax `# coverage: ignore` has no effect.
The spurious coverage deltas should go away after fixed code exclusion.
@CirqBot CirqBot added the size: S 10< lines changed <50 label Aug 14, 2023
@pavoljuhas pavoljuhas changed the title codecov - round coverage to the nearest value codecov - fix syntax for excluding code lines from coverage Aug 14, 2023
@pavoljuhas pavoljuhas marked this pull request as ready for review August 14, 2023 21:31
@pavoljuhas pavoljuhas enabled auto-merge (squash) August 14, 2023 21:34
pavoljuhas added a commit to pavoljuhas/Cirq that referenced this pull request Aug 15, 2023
@pavoljuhas pavoljuhas merged commit 2fcdeb8 into quantumlib:master Aug 15, 2023
35 checks passed
@pavoljuhas pavoljuhas deleted the codecov-round-coverage branch August 15, 2023 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50 Size: XS <10 lines changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants