climate_ref.doctor.findings
#
What a check reports, and how serious it is.
Finding
#
One problem found by a check.
Source code in packages/climate-ref/src/climate_ref/doctor/findings.py
check = ''
class-attribute
instance-attribute
#
Slug of the check that produced it, e.g. duplicate-coverage.
A check does not set this itself. The runner stamps it from the check's registration, so the slug has one definition.
command = ''
class-attribute
instance-attribute
#
Optional command that carries out the remedy.
Held apart from remedy so it can be printed unwrapped and stay pasteable.
detail = ''
class-attribute
instance-attribute
#
Optional further explanation of this finding alone.
remedy = ''
class-attribute
instance-attribute
#
Optional instruction for fixing it.
Findings that share a remedy are reported under it once rather than repeating it, so keep the wording free of anything specific to one finding.
severity
instance-attribute
#
How much it matters.
summary
instance-attribute
#
One line stating what is wrong.
Severity
#
Bases: StrEnum
How much a finding matters. Declared worst-first for reporting.
Source code in packages/climate-ref/src/climate_ref/doctor/findings.py
ERROR = 'error'
class-attribute
instance-attribute
#
Results computed in this state are wrong.
INFO = 'info'
class-attribute
instance-attribute
#
Worth knowing, no action required.
WARNING = 'warning'
class-attribute
instance-attribute
#
Something the deployment probably did not intend, but results remain valid.
worst_severity(findings)
#
Return the most serious severity present, or None when there are no findings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
findings
|
Sequence[Finding]
|
The findings to inspect. |
required |
Returns:
| Type | Description |
|---|---|
Severity | None
|
The worst severity present, or |