andim / pyrepseq

Python library for immune repertoire analysis
MIT License
15 stars 3 forks source link

Improve test coverage #26

Open yutanagano opened 4 months ago

yutanagano commented 4 months ago

While we shouldn't overtest, there are a few bits of code that might need more testing. To help decide if and where we want more testing, here are some suggestions:

Target test coverage

80% (current coverage 60%, see below for report)

Code to test more

Very important code to test better

Current test coverage

The "Missing" column tells us which lines are not yet touched at all by tests.

Name                                                                 Stmts   Miss  Cover   Missing
--------------------------------------------------------------------------------------------------
pyrepseq/__init__.py                                                     9      0   100%
pyrepseq/clustering.py                                                  28     22    21%   21-49
pyrepseq/distance.py                                                   223     98    56%   48-60, 93-106, 128-137, 182-207, 211-218, 241-246, 271-288, 309, 421-427, 445-447, 479, 492, 512, 521, 550-558
pyrepseq/io.py                                                          57     25    56%   182-185, 188, 252-255, 270-276, 296-317
pyrepseq/metric/__init__.py                                              3      0   100%
pyrepseq/metric/levenshtein.py                                          28      0   100%
pyrepseq/metric/metric.py                                               14      3    79%   19, 43, 62
pyrepseq/metric/tcr_metric/__init__.py                                   3      0   100%
pyrepseq/metric/tcr_metric/tcr_levenshtein.py                          149      8    95%   67, 72, 121, 126, 171-174
pyrepseq/metric/tcr_metric/tcr_metric.py                                25      6    76%   42, 44, 63-64, 69, 76
pyrepseq/metric/tcr_metric/tcrdist/__init__.py                           0      0   100%
pyrepseq/metric/tcr_metric/tcrdist/simplified_tcrdist_interface.py      64     11    83%   71-77, 105, 111, 126-136
pyrepseq/metric/tcr_metric/tcrdist/tcrdist_metric.py                    78      5    94%   38, 43, 82-84
pyrepseq/nn.py                                                         243     29    88%   80-81, 254-256, 490, 495-499, 518-537, 561-562, 575-578
pyrepseq/plotting.py                                                   227    199    12%   46-73, 88-93, 107-116, 125-127, 130-195, 225-240, 286-380, 407-412, 434-448, 468-490, 502-503, 508-527, 550-580
pyrepseq/stats.py                                                      171    124    27%   27-28, 43-47, 51-53, 77-92, 110-112, 164-167, 172-175, 180-187, 192-201, 221, 244-268, 273-275, 280-289, 294, 307-313, 325-333, 345-353, 370-396, 413-427
pyrepseq/util.py                                                        44     22    50%   21-32, 40-52
pyrepseq/version.py                                                     10      1    90%   13
--------------------------------------------------------------------------------------------------
TOTAL                                                                 1376    553    60%
kachida commented 4 months ago

Hi @yutanagano , I'm interested in looking on to this issue, can you please assign me this task.

yutanagano commented 4 months ago

Thanks @kachida for showing interest in helping development! If you would like to implement some working tests then feel free to submit a pull request and one of us can review the code.