From 070c56c9dcc0a18ad370cc5de8fdd524b2d89d72 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Thu, 18 Jun 2026 10:28:43 -0400 Subject: [PATCH] docs: document --iio-coverage and ignore feature in README Add a Usage blurb covering --iio-coverage and the per-hardware `ignore:` hardware-map section (with an example), and point the Coveralls badge at `main` (coverage is tracked there now, not the stale `master`). Claude-Session: https://claude.ai/code/session_01XmLzEBjfG32VnfgUswwxSP --- README.rst | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index feaac0e..3e17b25 100644 --- a/README.rst +++ b/README.rst @@ -14,8 +14,8 @@ pytest-libiio :target: https://github.com/tfcollins/pytest-libiio/actions/workflows/test.yml :alt: See Build Status on GitHub Actions -.. image:: https://coveralls.io/repos/github/tfcollins/pytest-libiio/badge.svg?branch=master - :target: https://coveralls.io/github/tfcollins/pytest-libiio?branch=master +.. image:: https://coveralls.io/repos/github/tfcollins/pytest-libiio/badge.svg?branch=main + :target: https://coveralls.io/github/tfcollins/pytest-libiio?branch=main :alt: See Coverage Status on Coveralls .. image:: https://github.com/tfcollins/pytest-libiio/actions/workflows/doc.yml/badge.svg @@ -102,6 +102,34 @@ Run against the bundled ADI hardware map so the marker names resolve: pytest --adi-hw-map +Track how much of each context's IIO attributes your tests exercise with +``--iio-coverage``: + +.. code-block:: bash + + pytest --adi-hw-map --iio-coverage + +This records every device- and channel-level attribute read or written, then +writes a per-context JSON file plus an aggregate Markdown report. To keep noise +(diagnostic devices, unsupported attributes, etc.) out of the tally, add a +per-hardware ``ignore:`` section to the hardware map listing devices, channels, +or attributes to exclude (glob patterns supported): + +.. code-block:: yaml + + pluto: + - ad9361-phy + - cf-ad9361-lpc,2 + - ignore: + devices: [xadc] + attributes: + - {device: ad9361-phy, name: calib_mode_available} + +Ignored items are dropped from both the access counts and the coverage +denominator. See the `coverage tracking docs +`_ for the +full schema. + Contributing ------------