github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

mattharrison / pycoverage.el

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 19
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

emacs support for highighting python coverage results — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

some ideas in README 
matt (author)
Wed Feb 03 21:02:26 -0800 2010
commit  3c5c1da05e7fce56851f9e61edc7b727b01ef0ee
tree    fe56b23ecd03455379d606ad47c1201646eb6eb4
parent  7b6a66f520c83455b8791840269b67a489a0af59
pycoverage.el /
name age
history
message
file README Wed Feb 03 21:02:26 -0800 2010 some ideas in README [matt]
directory cov2emacs/ Tue Feb 02 15:33:04 -0800 2010 make data buffer local (so more than one buffer... [matt]
file pycov2.el Wed Feb 03 14:56:28 -0800 2010 add default face (helps with linum indentation ... [matt]
file pycoverage.el Tue Sep 01 13:29:01 -0700 2009 recursive lookup for .coverage files. Start in... [matt]
README
pycoverage.el
=============

An emacs mode for reporting on coverage stats for python

Dependencies
============

Coverage reporter for Python:

  * coverage.py (currently we only support this)
  * figleaf (support pending)

Installation
============

Put something like this in your .emacs

(load-file "/home/matt/work/emacs/pycoverage/pycov2.el")
(require 'linum)
(require 'pycov2)
(add-hook 'python-mode-hook
(function (lambda ()
(pycov2-mode)
(linum-mode))))


Install cov2emacs using setuptools or virtualenv or distutils

Update pycov2-run-script with proper location of cov2emacs

Load pycov2.el

There should be ``.coverage`` file in the directory of the module you
want coverage reporting on (or the parents of that directory).  How
you get it there is currently not solved by this tool, which only
provides a way to view the coverage data in your editor.


Running
=======

M-x pycov2-mode


Ideal Usage
===========

One runs their tests using coverage.  Then they enter
``pycoverage-mode``.  That should look for a ``.coverage`` file (or
the figleaf equivalent) and load the overview/results page in another
buffer.  It will also highlight the current file (iff it's timestamp
is <= ``.coverage`` timestamp.  Newer timestamp means no guarantees on
output.) with coverage information.

Todo
====

  * Make it work!
  * Use flymake mode instead of/in combination with compile mode? - Initial Flymake DONE
  * Use missing line numbers instead of covered lines - DONE for coverage.py
  * Make pycoverage-load-report look for a ``.coverage`` file
    recursively up the parents of the file - DONE
  * Make ``cov2emacs`` accept location of ``.coverage`` file - DONE
  * Make report use normal coverage.py text output, since it's a
    little friendlier on the eyes (instead of reporting for every 
    group of lines in a file)
  * Put status in modeline
    * Nothing - current data
    * D - dirty
    * N - no .coverage file available
    * E - Error (see *messages*)
  * Figleaf support
  * Nose integration?

Thanks
======

  * rcov - for code to start from
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server