engineerjoe440 / ElectricPy

Electrical Engineering Formulas in Python
https://electricpy.readthedocs.io/en/latest/
MIT License
86 stars 16 forks source link

Improving Code Coverage and Adding Coverage Badge in `README.MD` #38

Closed Lakshmikanth2001 closed 2 years ago

Lakshmikanth2001 commented 2 years ago
Name                              Stmts   Miss  Cover
-----------------------------------------------------
electricpy\__init__.py             1734   1430    18%
electricpy\bode.py                  169    156     8%
electricpy\constants.py              41      0   100%
electricpy\fault.py                 404    358    11%
electricpy\geometry\__init__.py     162     52    68%
electricpy\geometry\circle.py        89     52    42%
electricpy\geometry\triangle.py      47      6    87%
electricpy\sim.py                   520    504     3%
electricpy\visu.py                  265    107    60%
-----------------------------------------------------
TOTAL                              3431   2665    22%

We need to improve our tests so that we can cover more amount of code

engineerjoe440 commented 2 years ago

Yes, this is a valid point. I think it will be best if I start by adding the badge, and we can work up from there (which will be awesome!).

Looking around a bit, there's a few options, but the one that stands out the most is coverage-badge which will auto-generate the *.svg file necessary. I think that I can script this into the documentation generation as part of the Sphinx build process. Since that pushes content to the gh-pages branch, anyway, it would make sense for that workflow to generate the badge, store it in the documentation files, and then we can simply reference it in the appropriate README files.