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 coverage exclusion syntax #6241

Merged
merged 7 commits into from
Aug 18, 2023

Conversation

pavoljuhas
Copy link
Collaborator

@pavoljuhas pavoljuhas commented Aug 15, 2023

  • switch to standard opt-out comments for code exclusion from coverage
  • fix placement of # pragma: no cover markup comments,
    so they are either on the affected line or at the preceding block
  • remove no-cover comments for code that is covered
  • remove redundant no-cover comments

@CirqBot CirqBot added the size: M 50< lines changed <250 label Aug 15, 2023
@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Patch coverage: 85.71% and project coverage change: +0.22% 🎉

Comparison is base (30fa6f5) 97.38% compared to head (4e708d5) 97.60%.
Report is 2 commits behind head on master.

❗ Current head 4e708d5 differs from pull request most recent head 36b8150. Consider uploading reports for the commit 36b8150 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6241      +/-   ##
==========================================
+ Coverage   97.38%   97.60%   +0.22%     
==========================================
  Files        1116     1116              
  Lines       96110    95772     -338     
==========================================
- Hits        93594    93480     -114     
+ Misses       2516     2292     -224     
Files Changed Coverage Δ
cirq-core/cirq/_version.py 100.00% <ø> (+20.00%) ⬆️
cirq-core/cirq/circuits/circuit_operation.py 99.69% <ø> (+0.29%) ⬆️
cirq-core/cirq/circuits/qasm_output_test.py 100.00% <ø> (ø)
cirq-core/cirq/conftest.py 100.00% <ø> (+7.14%) ⬆️
cirq-core/cirq/contrib/acquaintance/devices.py 94.59% <ø> (+2.48%) ⬆️
...core/cirq/contrib/hacks/disable_validation_test.py 100.00% <ø> (ø)
...irq-core/cirq/contrib/noise_models/noise_models.py 98.30% <ø> (-0.06%) ⬇️
...core/cirq/contrib/paulistring/clifford_optimize.py 100.00% <ø> (+0.95%) ⬆️
cirq-core/cirq/contrib/quimb/density_matrix.py 100.00% <ø> (+2.70%) ⬆️
cirq-core/cirq/contrib/quimb/grid_circuits.py 100.00% <ø> (+8.10%) ⬆️
... and 101 more

... and 1 file with indirect coverage changes

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

Use `# pragma: no cover` instead of `coverage: ignore`.
The pragma format is understood by coverage and codecov.
Use `# pragma: no cover`.
@pavoljuhas pavoljuhas force-pushed the fix-coverage-exclusion branch from 0a4c5da to 81ecbd5 Compare August 16, 2023 03:45
* must be either on the affected line or at the preceding block
* remove no-cover comments for code that is covered
* remove unnecessary no-cover duplication
@pavoljuhas pavoljuhas marked this pull request as ready for review August 16, 2023 21:33
@pavoljuhas pavoljuhas enabled auto-merge (squash) August 18, 2023 18:36
@pavoljuhas pavoljuhas merged commit 6e38a27 into quantumlib:master Aug 18, 2023
@pavoljuhas pavoljuhas deleted the fix-coverage-exclusion branch August 18, 2023 22:16
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
* switch to standard opt-out comments for code exclusion from coverage
* fix placement of `# pragma: no cover` markup comments,
  so they are either on the affected line or at the preceding block
 * remove no-cover comments for code that is covered
 * remove redundant no-cover comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants