xinyiguan / py2lispIDyOM

A Python package for IDyOM
https://xinyiguan.github.io/py2lispIDyOM/
MIT License
10 stars 3 forks source link

Code coverage estimates: clarify what it should be #10

Closed hayesall closed 2 years ago

hayesall commented 2 years ago

Code coverage appears to be ~59% (including some cases where tests fail on my machine)

Name                                                                       Stmts   Miss  Cover
----------------------------------------------------------------------------------------------
/home/hayesall/Review/py2lispIDyOM/py2lispIDyOM/__init__.py            4      0   100%
/home/hayesall/Review/py2lispIDyOM/py2lispIDyOM/configuration.py     434     71    84%
/home/hayesall/Review/py2lispIDyOM/py2lispIDyOM/export.py             95     32    66%
/home/hayesall/Review/py2lispIDyOM/py2lispIDyOM/extract.py           138     45    67%
/home/hayesall/Review/py2lispIDyOM/py2lispIDyOM/run.py                62     16    74%
/home/hayesall/Review/py2lispIDyOM/py2lispIDyOM/viz.py               321    269    16%
----------------------------------------------------------------------------------------------
TOTAL                                                                       1054    433    59%

Recommendation: I don't have a hard rule for what coverage should be. I'd recommend clarifying what coverage threshold matters to the project in the contributing guidelines. A good portion of the library involves visualization, which tends to be slightly harder to test in my experience.

xinyiguan commented 2 years ago

Thank you for the recommendations! I added some more tests to the package, and also a note on the desired coverage threshold in the contributing guidelines. For the current coverage:

Name                            Stmts   Miss  Cover
---------------------------------------------------
py2lispIDyOM/__init__.py            4      0   100%
py2lispIDyOM/configuration.py     434     30    93%
py2lispIDyOM/export.py             95      6    94%
py2lispIDyOM/extract.py           138      2    99%
py2lispIDyOM/run.py                62      6    90%
py2lispIDyOM/viz.py               321     41    87%
tests/__init__.py                   0      0   100%
tests/test_export.py               75      0   100%
tests/test_extract.py              76      0   100%
tests/test_run.py                 118      0   100%
tests/test_viz.py                  63     12    81%
---------------------------------------------------
TOTAL                            1386     97    93%
hayesall commented 2 years ago

Nice! Looks good on my Ubuntu instance too.