animikhroy / rk_toolkit_pipeline_diagrams

Master-repository for all code related to "A Novel Approach to Topological Graph Theory with R-K Diagrams and Gravitational Wave Analysis"
https://arxiv.org/abs/2201.06923
2 stars 0 forks source link

Improve Test Coverage #36

Open andorsk opened 2 years ago

andorsk commented 2 years ago

We are at 38% right now. Normally 80% is decent.

---------- coverage: platform darwin, python 3.9.2-final-0 -----------
Name                                          Stmts   Miss  Cover
-----------------------------------------------------------------
setup.py                                          5      5     0%
src/rktoolkit/__init__.py                         2      0   100%
src/rktoolkit/functions/__init__.py               0      0   100%
src/rktoolkit/functions/distance.py              14     10    29%
src/rktoolkit/functions/filters.py               31     18    42%
src/rktoolkit/functions/functions_test.py        16      0   100%
src/rktoolkit/functions/htg_transformers.py      56     44    21%
src/rktoolkit/functions/linkers.py               64     46    28%
src/rktoolkit/functions/localizers.py            35     14    60%
src/rktoolkit/models/__init__.py                  0      0   100%
src/rktoolkit/models/functions.py                24      8    67%
src/rktoolkit/models/graph.py                   275    181    34%
src/rktoolkit/models/pipeline.py                 60     43    28%
src/rktoolkit/models/pipeline_test.py             9      0   100%
src/rktoolkit/models/rkmodel.py                  13      7    46%
tests/visualizer_test.py                          0      0   100%
-----------------------------------------------------------------
TOTAL                                           604    376    38%
andorsk commented 2 years ago
(base) ➜  rk_toolkit git:(tests) ✗ pytest --cov=. .
======================================== test session starts ========================================
platform darwin -- Python 3.9.2, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/akmb2/workspace/github.com/andorsk/rk_toolkit
plugins: Faker-13.11.1, pylama-8.3.8, cov-3.0.0
collected 13 items

src/rktoolkit/functions/distance_test.py ..                                                   [ 15%]
src/rktoolkit/functions/filters_test.py ..                                                    [ 30%]
src/rktoolkit/functions/functions_test.py ..                                                  [ 46%]
src/rktoolkit/functions/htg_transformers_test.py ..                                           [ 61%]
src/rktoolkit/models/graph_test.py ....                                                       [ 92%]
src/rktoolkit/models/pipeline_test.py .                                                       [100%]

---------- coverage: platform darwin, python 3.9.2-final-0 -----------
Name                                               Stmts   Miss  Cover
----------------------------------------------------------------------
setup.py                                               5      5     0%
src/rktoolkit/__init__.py                              2      0   100%
src/rktoolkit/functions/__init__.py                    0      0   100%
src/rktoolkit/functions/distance.py                   18      7    61%
src/rktoolkit/functions/distance_test.py              15      0   100%
src/rktoolkit/functions/filters.py                    33     11    67%
src/rktoolkit/functions/filters_test.py               25      3    88%
src/rktoolkit/functions/functions_test.py             22      2    91%
src/rktoolkit/functions/htg_transformers.py           57     23    60%
src/rktoolkit/functions/htg_transformers_test.py      15      0   100%
src/rktoolkit/functions/linkers.py                    64     40    38%
src/rktoolkit/functions/localizers.py                 35     14    60%
src/rktoolkit/models/__init__.py                       0      0   100%
src/rktoolkit/models/functions.py                     24      8    67%
src/rktoolkit/models/graph.py                        282    142    50%
src/rktoolkit/models/graph_test.py                    44      0   100%
src/rktoolkit/models/pipeline.py                      63     20    68%
src/rktoolkit/models/pipeline_test.py                 44      5    89%
src/rktoolkit/models/rkmodel.py                       13      4    69%
tests/visualizer_test.py                               0      0   100%
----------------------------------------------------------------------
TOTAL                                                761    284    63%

Currently at 63% from previous 38%.

A few bugs were fixed. Not sure if they have any impact on things downstream.