Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wbolster/emacs-python-coverage
show python coverage information directly in emacs
https://github.com/wbolster/emacs-python-coverage
Last synced: about 2 months ago
JSON representation
show python coverage information directly in emacs
- Host: GitHub
- URL: https://github.com/wbolster/emacs-python-coverage
- Owner: wbolster
- License: bsd-3-clause
- Created: 2019-11-01T22:29:46.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-09T08:56:34.000Z (8 months ago)
- Last Synced: 2024-05-09T09:55:41.867Z (8 months ago)
- Language: Emacs Lisp
- Size: 186 KB
- Stars: 32
- Watchers: 4
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.rst
Awesome Lists containing this project
README
==================
python-coverage.el
==================This is an experimental Emacs package to report code coverage output
produced by Python's ``coverage`` package directly inside Emacs
buffers.``coverage``'s xml output follows the cobertura format, it should work with
similar reports from other tools, like C/C++ with ``gcovr``.Best used together with `python-pytest.el`__.
__ https://github.com/wbolster/emacs-python-pytest
Screenshot
==========.. image:: screenshot.png
:alt: mandatory screenshotOverlays
========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`:
.. code-block:: shell
$ coverage xml
With ``pytest-cov``, pass ``--cov-report=xml``, e.g. via ``pyproject.toml``:
.. code-block:: 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)`__.
__ https://github.com/wbolster
License
=======BSD; see ``LICENSE.rst``.