Skip to content

Commit 7df8609

Browse files
committed
docs: updates for implicit relative path mapping
1 parent cb67b1f commit 7df8609

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

CHANGES.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ development at the same time, such as 4.5.x and 5.0.
2020
Unreleased
2121
----------
2222

23-
Nothing yet.
23+
- Improvements to combining data files when using the
24+
:ref:`config_run_relative_files` setting:
25+
26+
- During ``coverage combine``, relative file paths are implicitly combined
27+
without needing a ``[paths]`` configuration setting.
28+
29+
- A ``[paths]`` setting like ``*/foo`` will now match ``foo/bar.py`` so that
30+
relative file paths can be combined more easily.
2431

2532

2633
.. _changes_6-5-0:

coverage/cmdline.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@ def get_prog_name(self):
379379
] + GLOBAL_ARGS,
380380
usage="[options] <path1> <path2> ... <pathN>",
381381
description=(
382-
"Combine data from multiple coverage files collected " +
383-
"with 'run -p'. The combined results are written to a single " +
382+
"Combine data from multiple coverage files. " +
383+
"The combined results are written to a single " +
384384
"file representing the union of the data. The positional " +
385385
"arguments are data files or directories containing data files. " +
386386
"If no paths are provided, data files in the default data file's " +

doc/cmd.rst

+9-7
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ It might be more convenient to use the ``[run] relative_files``
377377
setting to store relative file paths (see :ref:`relative_files
378378
<config_run_relative_files>`).
379379

380+
If data isn't combining properly, you can see details about the inner workings
381+
with ``--debug=pathmap``.
382+
380383
If any of the data files can't be read, coverage.py will print a warning
381384
indicating the file and the problem.
382385

@@ -389,11 +392,10 @@ want to keep those files, use the ``--keep`` command-line option.
389392
$ coverage combine --help
390393
Usage: coverage combine [options] <path1> <path2> ... <pathN>
391394
392-
Combine data from multiple coverage files collected with 'run -p'. The
393-
combined results are written to a single file representing the union of the
394-
data. The positional arguments are data files or directories containing data
395-
files. If no paths are provided, data files in the default data file's
396-
directory are combined.
395+
Combine data from multiple coverage files. The combined results are written to
396+
a single file representing the union of the data. The positional arguments are
397+
data files or directories containing data files. If no paths are provided,
398+
data files in the default data file's directory are combined.
397399
398400
Options:
399401
-a, --append Append coverage data to .coverage, otherwise it starts
@@ -409,7 +411,7 @@ want to keep those files, use the ``--keep`` command-line option.
409411
--rcfile=RCFILE Specify configuration file. By default '.coveragerc',
410412
'setup.cfg', 'tox.ini', and 'pyproject.toml' are
411413
tried. [env: COVERAGE_RCFILE]
412-
.. [[[end]]] (checksum: 0ac91b0781d7146b87953f09090dab92)
414+
.. [[[end]]] (checksum: 0bdd83f647ee76363c955bedd9ddf749)
413415
414416
415417
.. _cmd_erase:
@@ -1001,7 +1003,7 @@ of operation to log:
10011003
* ``multiproc``: log the start and stop of multiprocessing processes.
10021004

10031005
* ``pathmap``: log the remapping of paths that happens during ``coverage
1004-
combine`` due to the ``[paths]`` setting. See :ref:`config_paths`.
1006+
combine``. See :ref:`config_paths`.
10051007

10061008
* ``pid``: annotate all warnings and debug output with the process and thread
10071009
ids.

doc/config.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ information.
259259
[run] relative_files
260260
....................
261261

262-
(*experimental*, boolean, default False) store relative file paths in the data
263-
file. This makes it easier to measure code in one (or multiple) environments,
264-
and then report in another. See :ref:`cmd_combine` for details.
262+
(boolean, default False) store relative file paths in the data file. This
263+
makes it easier to measure code in one (or multiple) environments, and then
264+
report in another. See :ref:`cmd_combine` for details.
265265

266266
Note that setting ``source`` has to be done in the configuration file rather
267267
than the command line for this option to work, since the reporting commands

0 commit comments

Comments
 (0)