chia-blockchain icon indicating copy to clipboard operation
chia-blockchain copied to clipboard

Fix coverage report

Open almogdepaz opened this issue 2 years ago • 4 comments

almogdepaz avatar Aug 03 '22 11:08 almogdepaz

This pull request introduces 11 alerts and fixes 10 when merging dfd10d3c47dd5a30a9d08afed5220e513e8a39b5 into e259dd8dfda7907e182a7e9fde29cad69e0ca1f5 - view on LGTM.com

new alerts:

  • 8 for Unused variable, import, function or class
  • 1 for Module is imported more than once
  • 1 for Unused local variable
  • 1 for Module-level cyclic import

fixed alerts:

  • 9 for Unused variable, import, function or class
  • 1 for Missing call to `__init__` during object initialization

lgtm-com[bot] avatar Aug 07 '22 12:08 lgtm-com[bot]

This pull request introduces 11 alerts and fixes 10 when merging 75b3bdebc3f1cabd57eea030b84d7251f2ff41e3 into e259dd8dfda7907e182a7e9fde29cad69e0ca1f5 - view on LGTM.com

new alerts:

  • 8 for Unused variable, import, function or class
  • 1 for Module is imported more than once
  • 1 for Unused local variable
  • 1 for Module-level cyclic import

fixed alerts:

  • 9 for Unused variable, import, function or class
  • 1 for Missing call to `__init__` during object initialization

lgtm-com[bot] avatar Aug 07 '22 14:08 lgtm-com[bot]

This pull request introduces 1 alert when merging bcab8e6a5def4ad8c6c1045eaadced5034c6b58f into aa0e996ac5e744f53c36e0bd823d62dad520cf70 - view on LGTM.com

new alerts:

  • 1 for Unused import

lgtm-com[bot] avatar Aug 07 '22 18:08 lgtm-com[bot]

Closing and reopening to trigger a new merge with main in hopes of some NFT test fixes helping this run to completion.

altendky avatar Aug 11 '22 01:08 altendky

I think this is not processing the Windows coverage information. For example, it seems that we are capturing coverage of importing chia/daemon/windows_signal.py but we lack coverage for the portion run only on Windows (lines 19-54).

I found what appears to be an import sequence that would load this file for any test run regardless of platform, but to make this a bit more explicit, it might be worth adding a canary test file for coverage where the sole purpose of the file is simply to have sections that are each only executed on one platform. test_coverage_canary.py or such, perhaps. That would provide an easy reference to remember in any coverage results.

https://github.com/Chia-Network/chia-blockchain/runs/7779353683?check_suite_focus=true#step:7:1308

chia/daemon/windows_signal.py                                    28     20      8      1    25.0%   19-54

https://github.com/Chia-Network/chia-blockchain/blob/0bc69603c073ec2037f4896a23f750bca6c2d29c/chia/daemon/windows_signal.py#L15-L54

i dont follow, your saying the 25% is wrong ?

almogdepaz avatar Aug 11 '22 13:08 almogdepaz

Yes, I would expect the Windows-only portions of the file to be covered when imported for the Windows tests. Though, I did not do a detailed verification that the file is really imported in the Windows tests. Just a cursory check such that I expect the file is imported.

altendky avatar Aug 13 '22 19:08 altendky

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Sep 02 '22 23:09 github-actions[bot]