coverage.tiers¶
Runtime access to declarative [coverage.tiers] config.
Settings are validated at the boundary by
otto.models.settings.CoverageSettingsSpec; at runtime the repo
exposes plain dicts. This module turns those dicts into ordered
TierConfig values for the CLI and reporter.
- class otto.coverage.tiers.TierConfig(name: str, kind: str, precedence: int, color: str, harvest_dirs: list[~pathlib.Path] = <factory>, max_age_days: int | None = None)¶
Bases:
objectOne declared coverage tier, ready for runtime use.
-
otto.coverage.tiers.load_tiers(cov_config: dict[str, Any], sut_dir: Path | None =
None) list[TierConfig]¶ Ordered tier configs (highest precedence first).
An empty/missing
tierstable yields the implicitsystemtier only — identical to pre-tier behavior. When sut_dir is given, each tier’sharvest_dirshas${sut_dir}expanded (mirroring the rest of the repo’s settings expansion).
- otto.coverage.tiers.resolve_get_tier(tiers: list[TierConfig], name: str | None) TierConfig¶
Resolve the target tier for
otto cov get.Noneselects the sole e2e-kind tier; ambiguity or an unknown name raisesValueErrorlisting the candidates.