gedih3.doctor.report#
Report and DoctorContext dataclasses shared by all diagnoses.
Classes#
str(object='') -> str |
|
Uniform output from a diagnosis check or fix. |
|
Pre-loaded state passed to every diagnosis. |
Module Contents#
- class gedih3.doctor.report.Severity[source]#
-
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 acheck().- summarystr
One-line human-readable summary.
- recommendationslist of str
Suggested next-step CLI commands (printed verbatim, never executed).
- 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_diris set.- partition_dirslist of str
Discovered
h3_*/directories underh3_dir.- argsobject
Parsed argparse namespace (CLI args). Diagnoses read flags such as
--orphan-age-hours,--s3,--onlinefrom here.- upstreamdict or None
Populated by
gedih3.doctor.upstreamwhen--onlineis set; keyed by product code.