livery.extensions.coverage._pages¶
livery.extensions.coverage._pages ¶
Draw the site's coverage pages from the measured data, in the line format.
This extension adds a step to each of the docs extension's two phases
in its [for.docs] table, so the pages are drawn only while docs is
listed, for each package whose [docs] coverage names a report at
TREE. pages_run, the docs phase's step, draws them before the site
builds, from the data the last gate run left on this machine: the
parts a native suite's measurer left in the workspace, and the parts
each listed extension's reduction makes of its measurer's data, the
pytest extension's of coverage.py's (_parts). redraw_run, the
deploy phase's step, draws them again just before the site publishes,
from main's coverage record on every check leg, read from their stored
form with the fixed facts the record holds, as the legs made them.
The pages are drawn from parts in the line format (_format) by
_render. Each package's index states its floor
(_floors.floor_status).
Functions:
| Name | Description |
|---|---|
pages_run |
Draw the coverage pages from this machine's data: the docs phase's step. |
redraw_run |
Draw the coverage pages from main's coverage record: the deploy phase's step. |
draw |
Draw the pages of every package that declares a |
declaring |
The packages whose |
render_coverage_pages |
Draw each of packages' coverage pages from the measured data. |
stored_rows |
Every unit of main's record on each leg in labels, by leg; and the misses. |
Attributes:
| Name | Type | Description |
|---|---|---|
TREE |
|
pages_run ¶
pages_run(ctx: PhaseContext) -> None
Draw the coverage pages from this machine's data: the docs phase's step.
Before the site builds, from the data the last gate run left; where no gate ran first, as in a CI job of its own, nothing is drawn and each page states the absence.
Source code in packages/extensions/coverage/src/livery/extensions/coverage/_pages.py
redraw_run ¶
redraw_run(ctx: PhaseContext) -> None
Draw the coverage pages from main's coverage record: the deploy phase's step.
docs.publish runs it on the built site just before it publishes
the site, in the merge point's gate job after the union wrote the
record, and then puts each declared report's tree into the site. A
failure here fails the publish; the verdict was given before it.
Source code in packages/extensions/coverage/src/livery/extensions/coverage/_pages.py
draw ¶
Draw the pages of every package that declares a TREE report; the members.
From main's coverage record with merged, else from the data the
last gate run left on this machine (render_coverage_pages). A
workspace where no package declares one draws nothing.
Source code in packages/extensions/coverage/src/livery/extensions/coverage/_pages.py
declaring ¶
The packages whose [docs] coverage names a report at TREE, in order.
Read from each package's contract, the table the docs extension owns and frames each declared report from.
Source code in packages/extensions/coverage/src/livery/extensions/coverage/_pages.py
render_coverage_pages ¶
render_coverage_pages(root: Path, packages: tuple[Package, ...], *, merged: bool = False) -> list[str]
Draw each of packages' coverage pages from the measured data.
Each package's tree goes to its htmlcov directory, drawn from
the parts of its files: main's record on every check leg with
merged, and the data the last gate run left on this machine
without it. A package no measurement reaches gets no tree, and its
coverage page states the absence.
A measured file the checkout no longer has is red inside CI, where the measurement is the record of the tree being built; on a machine, whose data outlives a moved file until the next gate run, the package's index names it and the rest is drawn. A file whose content differs from the content measured keeps its numbers, and its page says it was measured at other content; a file measured at the checkout's content with a range outside its text refuses, naming the file and the range. Each package's index states its floor: the floor its contract names, the mark it ratchets to, read beside main's record, or that nothing judges it. Returns the members drawn.
Source code in packages/extensions/coverage/src/livery/extensions/coverage/_pages.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
stored_rows ¶
Every unit of main's record on each leg in labels, by leg; and the misses.
A leg whose record cannot be read, or holds nothing, is a named miss, never a refusal: the pages draw what there is.