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: workaround for coverage bug #234

Merged
merged 2 commits into from
Jun 29, 2021
Merged

Conversation

alexander-held
Copy link
Member

The fit function in the CLI has the structure

https://github.com/alexander-held/cabinetry/blob/d888ec054e080f474a12de6de375857631c55987/src/cabinetry/cli/__init__.py#L134-L137

and both branches are tested:

https://github.com/alexander-held/cabinetry/blob/d888ec054e080f474a12de6de375857631c55987/tests/cli/test_cli.py#L172-L182

In CI, where the coverage is calculated with Python 3.7, everything shows up as covered. When using Python 3.8 it does not. This is presumably due to a CPython optimization, and can seemingly be fixed by the addition of a pass:

https://github.com/alexander-held/cabinetry/blob/1a11641e214072c3922d7a1269304c97754496b8/src/cabinetry/cli/__init__.py#L138

This PR adds this pass and a link to a coverage issue which discusses what I believe is the same underlying issue.

@codecov
Copy link

codecov bot commented Jun 23, 2021

Codecov Report

Merging #234 (dd3a270) into master (612b3cf) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #234   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines         1727      1728    +1     
  Branches       268       268           
=========================================
+ Hits          1727      1728    +1     
Impacted Files Coverage Δ
src/cabinetry/cli/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 612b3cf...dd3a270. Read the comment docs.

@alexander-held
Copy link
Member Author

alexander-held commented Jun 23, 2021

The CI seems unstable, it sometimes passes and sometimes fails. This was also observed in https://github.com/alexander-held/cabinetry/actions/runs/962573993. Possibly related to the release of numpy 1.21. #235 seems to fix this.

@alexander-held alexander-held merged commit 1971746 into master Jun 29, 2021
@alexander-held alexander-held deleted the fix/coverage-workaround branch June 29, 2021 16:57
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.

None yet

1 participant