climate_ref.doctor.report
#
What examining a deployment produced.
Running the checks, ordering what they found, counting them, and describing the deployment they
ran against are one job, so diagnose does all of it and hands back one value. A caller that
wants to display a report does not have to know how any of that is assembled.
DoctorReport
#
What the checks found, and the deployment they ran against.
Source code in packages/climate-ref/src/climate_ref/doctor/report.py
check_count
instance-attribute
#
How many checks ran, including those that found nothing.
environment = None
class-attribute
instance-attribute
#
A description of the deployment as sections of name: value pairs, or None.
This is deliberately an untyped blob of data. It is used as context for a bug report and the shape may change at any time.
Sensitive values have been redacted.
findings
instance-attribute
#
Everything the checks found, worst first, then by the check that produced them.
worst_severity
property
#
The most serious severity found, or None when nothing was found.
diagnose(context, *, environment=False)
#
Examine a REF deployment and generate a report.
Every check runs. One that raises becomes a finding rather than stopping the rest, so a broken check cannot make the deployment look healthy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
DoctorContext
|
The deployment to examine. |
required |
environment
|
bool
|
Whether to describe the deployment as well as check it. |
False
|
Returns:
| Type | Description |
|---|---|
DoctorReport
|
What the checks found, and the deployment they ran against. |