gedih3.doctor.report#

Report and DoctorContext dataclasses shared by all diagnoses.

Classes#

Severity

str(object='') -> str

Report

Uniform output from a diagnosis check or fix.

DoctorContext

Pre-loaded state passed to every diagnosis.

Module Contents#

class gedih3.doctor.report.Severity[source]#

Bases: str, enum.Enum

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

INFO = 'info'#
WARN = 'warn'#
ERROR = 'error'#
class gedih3.doctor.report.Report[source]#

Uniform output from a diagnosis check or fix.

Attributes:
namestr

Diagnosis identifier (e.g. ‘backfill’, ‘orphans’).

severitySeverity

Worst severity across all findings.

findingslist of dict

Each finding describes one issue with enough context to remediate.

appliedbool

True when produced by a fix(); False for a check().

summarystr

One-line human-readable summary.

recommendationslist of str

Suggested next-step CLI commands (printed verbatim, never executed).

name: str#
severity: Severity#
findings: List[Dict[str, Any]] = []#
applied: bool = False#
summary: str = ''#
recommendations: List[str] = []#
property has_findings: bool#
property is_clean: bool#
to_dict() Dict[str, Any][source]#
class gedih3.doctor.report.DoctorContext[source]#

Pre-loaded state passed to every diagnosis.

The runner constructs this once per invocation and shares it across all diagnoses to avoid redundant filesystem walks and log re-reads.

Attributes:
h3_dirstr

Root directory of the gedih3 database.

soc_dirstr or None

Root directory of downloaded SOC HDF5 files. None when running the doctor against a database whose source files are not local.

tmp_dirstr or None

Configured temp directory (for orphan scans and S3 ETL).

h3_loggerH3BuildLogger

Loaded build log (lazy-upgraded on construction).

soc_loggerSOCDownloadLogger or None

Loaded download log when soc_dir is set.

partition_dirslist of str

Discovered h3_*/ directories under h3_dir.

argsobject

Parsed argparse namespace (CLI args). Diagnoses read flags such as --orphan-age-hours, --s3, --online from here.

upstreamdict or None

Populated by gedih3.doctor.upstream when --online is set; keyed by product code.

h3_dir: str#
soc_dir: str | None = None#
tmp_dir: str | None = None#
h3_logger: Any | None = None#
soc_logger: Any | None = None#
partition_dirs: List[str] = []#
args: Any | None = None#
upstream: Dict[str, Any] | None = None#