IPython Coverage
Introduces %coverage
and %%coverage
magics to allow running
of coverage
from a Jupyter Notebook.
It currently presents the coverage HTML report as an IFrame.
Installation
pip install ipycoverage
Usage
Load the extension
%load_ext ipycov
Use the magic
In a cell, you can run the cell magic like such:
%%coverage
from your_module import your_function
your_function()
twine register dist/pad-on-left-1.0.0.tar.gz -r testpypi
Or simply run the line magic:
%coverage function_to_call()
Important Note
This is not a fully developed magic, and it is not stable yet.
It has only been tested against:
coverage==4.5.2
IPython==7.0.1
.JupyterLab==0.35.1
Missing Features / Future Work
- Improve naming and instructions
- Add more options; potentially dynamically load them from
coverage
- Add tests
- Add examples
- Add CI/CD
- Submit to PyPI and Conda