reports.UnitStatus(name, pace, risk, intent, evaluated, decisions, consumers)
One row of the status table: a unit with its coverage figures.
Attributes
| name |
str |
Dotted module name of the unit. |
| pace |
str |
fast, medium or slow. |
| risk |
str |
low, medium or high. |
| intent |
int |
Number of intent items. |
| evaluated |
int |
Number of intent items that name at least one evaluation. |
| decisions |
int |
Number of distinct decision records the intent items cite. |
| consumers |
int |
Number of declared consumers. |
| covered |
bool |
True if the unit has intent and every intent item names an evaluation (a property, not a field). |
Examples
from pathlib import Path
from tempfile import TemporaryDirectory
from spotregen import load_spec, make_sample_repo, status_rows
with TemporaryDirectory() as tmp:
row = status_rows(load_spec(make_sample_repo(Path(tmp) / "demo")))[0]
print(row.name, f"{row.evaluated}/{row.intent}")