Duvet

Duvet is a GUI tool for visualizing code coverage results produced by coverage.py.

Why the name Duvet? Because a duvet doesn’t just provide coverage - it keeps you warm and cozy.

Quickstart

In your virtualenv, install Duvet, generate some coverage data, and then run duvet:

$ pip install duvet
$ coverage run myscript.py arg1 arg2
$ duvet

This will pop up a GUI window, displaying all source code in your current working directory. Any source file mentioned in the coverage data will be highlighted in the source file tree, with a color indicating how good the coverage is (red for bad coverage, green for perfect coverage). If you select a filename in the tree, the contents of that file will be displayed, with the missed lines highlighted. GUI tool for visualizing code coverage results.

Problems under Ubuntu

Ubuntu’s packaging of Python omits the idlelib library from it’s base packge. If you’re using Python 2.7 on Ubuntu 13.04, you can install idlelib by running:

$ sudo apt-get install idle-python2.7

For other versions of Python and Ubuntu, you’ll need to adjust this as appropriate.

Problems under Windows

If you’re running Duvet in a virtualenv, you’ll need to set an environment variable so that Duvet can find the TCL graphics library:

$ set TCL_LIBRARY=c:\Python27\tcl\tcl8.5

You’ll need to adjust the exact path to reflect your local Python install. You may find it helpful to put this line in the activate.bat script for your virtual environment so that it is automatically set whenever the virtualenv is activated.

Documentation

Documentation for Duvet can be found on Read The Docs.

Community

Duvet is part of the BeeWare suite. You can talk to the community through:

Contents:

Contributing to Duvet

If you experience problems with Duvet, log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.

Setting up your development environment

The recommended way of setting up your development envrionment for Duvet is to install a virtual environment, install the required dependencies and start coding. Assuming that you are using virtualenvwrapper, you only have to run:

$ git clone git@github.com:pybee/duvet.git
$ cd duvet
$ mkvirtualenv duvet

Duvet uses unittest (or unittest2 for Python < 2.7) for its own test suite as well as additional helper modules for testing. To install all the requirements for Duvet, you have to run the following commands within your virutal envrionment:

$ pip install -e .
$ pip install -r requirements_dev.txt

In case you are running a python version < 2.7 please use the requirements_dev.py26.txt instead because unittest2 is not part of the standard library for these version.

Now you are ready to start hacking! Have fun!

Duvet Roadmap

Duvet is a new project - we have lots of things that we’d like to do. If you’d like to contribute, providing a patch for one of these features:

  • Port to Python 3

Release History

0.1.3 - In development

0.1.2 - 27 September 2013

  • Corrected various problems under Windows
  • Added a Global file tree, to show files not in the current project directory

0.1.1 - 26 September 2013

  • Added overall coverage display and tracking.

0.1.0 - 24 September 2013

Initial public release.

Indices and tables