Skip to main content

Coverage access via IPython

Project description

[![Build Status](https://travis-ci.org/sanbales/ipython-coverage.svg?branch=master)](https://travis-ci.org/sanbales/ipython-coverage)

# IPython Coverage
Introduces `%coverage` and `%%coverage` magics to allow running
of [coverage](https://github.com/nedbat/coveragepy)
from a [Jupyter Notebook](https://github.com/jupyter/notebook).

It currently presents the coverage HTML report as an IFrame.

# Installation
```bash
pip install ipycoverage
```

# Usage

## Load the extension
```ipython
%load_ext ipycov
```

## Use the magic
In a cell, you can run the cell magic like such:
```ipython
%%coverage
from your_module import your_function # or anything else you want to import

your_function()
```

twine register dist/pad-on-left-1.0.0.tar.gz -r testpypi

Or simply run the line magic:
```ipython
%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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipycov-0.0.1.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file ipycov-0.0.1.tar.gz.

File metadata

  • Download URL: ipycov-0.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for ipycov-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fb2ee3c40e69dfcb4a440f7bbb4f529bd3fbdf3e34fdbc5f84d3aa737211856e
MD5 bc40ab1f1e0d6c9da89b8387cb3b8434
BLAKE2b-256 507a2d4358579fd1b4997012f6c742d97cd358c7760b0aa36698a57adc5737df

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page