floodlight-sports / floodlight

Python package for streamlined analysis of sports data.
https://floodlight.readthedocs.io/en/latest/index.html
MIT License
66 stars 14 forks source link

JOSS review: Recommend adding coverage to toml file #89

Closed kanishkan91 closed 2 years ago

kanishkan91 commented 2 years ago

I added this to check test coverage. I would recommend adding this since it will be useful as package gets more users, contributors.

https://github.com/openjournals/joss-reviews/issues/4588

draabe commented 2 years ago

Do you mean to add this package as a dependency?

kanishkan91 commented 2 years ago

That is correct. Given that pytest is one of the dependencies in the toml file. It would make sense to add this as well as a means to check coverage of tests.

draabe commented 2 years ago

@kanishkan91 thanks a lot for this suggestion! coverage works great and I agree that it can be very helpful (and good to know for potential users/contributors).

I've added the package as a development dependency (changes are on the develop branch) and compiled the following report:


Name                                   Stmts   Miss  Cover
----------------------------------------------------------
floodlight\__init__.py                     8      0   100%
floodlight\core\__init__.py                0      0   100%
floodlight\core\code.py                   55      2    96%
floodlight\core\definitions.py             4      0   100%
floodlight\core\events.py                156     14    91%
floodlight\core\pitch.py                  95      6    94%
floodlight\core\property.py               33     10    70%
floodlight\core\xy.py                     91      2    98%
floodlight\io\__init__.py                  0      0   100%
floodlight\io\datasets.py                186    148    20%
floodlight\io\statsbomb.py                94     86     9%
floodlight\io\utils.py                    17      3    82%
floodlight\metrics\__init__.py             0      0   100%
floodlight\metrics\entropy.py             24      3    88%
floodlight\models\__init__.py              0      0   100%
floodlight\models\base.py                 26      0   100%
floodlight\models\geometry.py             53      3    94%
floodlight\models\kinematics.py           65     12    82%
floodlight\models\kinetics.py            103      0   100%
floodlight\settings.py                     4      0   100%
floodlight\transforms\__init__.py          0      0   100%
floodlight\transforms\filter.py           49      0   100%
floodlight\utils\__init__.py               0      0   100%
floodlight\utils\types.py                  4      0   100%
floodlight\vis\__init__.py                 0      0   100%
floodlight\vis\pitches.py                170      6    96%
floodlight\vis\positions.py               22      2    91%
floodlight\vis\utils.py                   11      0   100%
tests\__init__.py                          0      0   100%
tests\test_core\__init__.py                0      0   100%
tests\test_core\conftest.py              108      0   100%
tests\test_core\test_code.py              44      0   100%
tests\test_core\test_definitions.py       24      0   100%
tests\test_core\test_events.py           234      1    99%
tests\test_core\test_pitch.py            166      0   100%
tests\test_core\test_xy.py               157      0   100%
tests\test_io\__init__.py                  0      0   100%
tests\test_io\conftest.py                 10      0   100%
tests\test_io\test_datasets.py             7      0   100%
tests\test_io\test_utils.py               10      0   100%
tests\test_metrics\__init__.py             0      0   100%
tests\test_metrics\test_apen.py           31      0   100%
tests\test_models\__init__.py              0      0   100%
tests\test_models\conftest.py             35      0   100%
tests\test_models\test_base.py            58      0   100%
tests\test_models\test_geometry.py        43      0   100%
tests\test_models\test_kinematics.py      73      0   100%
tests\test_models\test_kinetics.py        86      0   100%
tests\test_transforms\__init__.py          0      0   100%
tests\test_transforms\conftest.py         39      0   100%
tests\test_transforms\test_filter.py      89      0   100%
tests\test_vis\__init__.py                 0      0   100%
tests\test_vis\conftest.py                28      0   100%
tests\test_vis\test_pitches.py            39      0   100%
tests\test_vis\test_positions.py          38      0   100%
tests\test_vis\test_utils.py              16      1    94%
----------------------------------------------------------
TOTAL                                   2605    299    89%
draabe commented 2 years ago

@kanishkan91 I think it's quite useful to also publicly show these coverage reports, so I've also included the pytest-cov plug-in and integrated codecov. At last, I added a codecov badge displaying the current coverage of the package in the package README:

https://github.com/floodlight-sports/floodlight/tree/develop#readme

kanishkan91 commented 2 years ago

Thanks! Also thanks for adding the badge.