GithubHelp home page GithubHelp logo

spookylukey / emacs-python-coverage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wbolster/emacs-python-coverage

0.0 2.0 0.0 166 KB

show python coverage information directly in emacs

License: BSD 3-Clause "New" or "Revised" License

Emacs Lisp 100.00%

emacs-python-coverage's Introduction

python-coverage.el

This is an experimental Emacs package to report code coverage output produced by Python's coverage package directly inside Emacs buffers.

Best used together with python-pytest.el.

Screenshot

mandatory screenshot

Overlays

Minor mode for automagically updated overlays:

  • python-coverage-overlay-mode

Alternatively, commands for manually updated overlays:

  • python-coverage-overlay-refresh
  • python-coverage-overlay-remove-all

Navigation commands:

  • python-coverage-overlay-jump-next
  • python-coverage-overlay-jump-previous
  • python-coverage-overlay-jump-first

Flycheck checker

Run flycheck-select-checker, pick python-coverage.

Coverage data

This package reads the XML output produced by Python's coverage package. Usually this file is named coverage.xml.

With plain coverage:

$ coverage xml

With pytest-cov, pass --cov-report=xml, e.g. via pyproject.toml:

[tool.pytest.ini_options]
addopts = [
  "--cov=your-package",
  "--cov=test",
  "--cov-report=xml",
]

Customization

Command for manual coverage file selection:

  • python-coverage-select-coverage-file

Customizable settings (see their description for details) in the python-coverage group, e.g. via M-x customize-group:

  • python-coverage-default-file-name
  • python-coverage-overlay-width

Styling via custom faces, e.g. via M-x customize-face:

  • python-coverage-overlay-missing
  • python-coverage-overlay-partial
  • python-coverage-overlay-missing-outdated
  • python-coverage-overlay-partial-outdated

Note: by default this package inherits from magit-diff-* faces, which should work in most themes. This requires magit to be installed, but it's not otherwise used.

Credits

This package was created by wouter bolsterlee (@wbolster).

License

BSD; see LICENSE.rst.

emacs-python-coverage's People

Contributors

wbolster avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.