Skip to content

Commit 51dea2e

Browse files
committed
codecov: show patch
exclude cluster.py script from coverage (as we cannot properly test it inside the pytest environment while recording coverage)
1 parent 79ae192 commit 51dea2e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.codecov.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Codecov configuration to make it a bit less noisy
22
coverage:
33
status:
4-
patch: false
4+
patch:
5+
default:
6+
threshold: 5%
57
project:
68
default:
79
threshold: 50%
@@ -13,4 +15,4 @@ comment:
1315
flags: null
1416
paths: null
1517
ignore:
16-
- "basicrta/_version.py"
18+
- "*/tests/*"

basicrta/cluster.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ def b_color_structure(self, structure):
212212
u.select_atoms('protein').write('tau_bcolored.pdb')
213213

214214

215-
if __name__ == "__main__":
215+
if __name__ == "__main__": #pragma: no cover
216+
# the script is tested in the test_cluster.py but cannot be accounted for
217+
# in the coverage report
216218
import argparse
217219
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
218220
parser.add_argument('--nproc', type=int, default=1)

0 commit comments

Comments
 (0)