comicbox.doctor ¶
comicbox doctor: report on everything outside comicbox that it depends on.
Each check reports rows: OK, WARN, OFF (optional, not set up), MISSING, WRONG VERSION, MISCONFIGURED or ERROR, with a one-line fix for anything that isn’t OK. Any failure makes the exit code 1, so comicbox doctor -q doubles as a Docker or CI health check.
run_checks is the library API: it returns the rows as data and prints nothing. main is comicbox doctor.
Offline and read-only by default, apart from confuse creating the config directory, which every run does too. --online all (or a list of sources) adds exactly one request per configured source named, which counts against that source’s rate limit, and Comic Vine’s creates the online cache directory for its rate-limit bucket.
CheckResult dataclass ¶
One row of the report.
found is what was found: a version, a tool, or a path. A Path renders as a path. fix is a one-line hint for anything not OK. None of these ever carry a secret value.
Source code in comicbox/doctor/result.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
DoctorReport dataclass ¶
Every row the checks produced, plus the host they ran on.
Source code in comicbox/doctor/result.py
53 54 55 56 57 58 59 60 61 62 63 64 | |
exit_code property ¶
1 if anything comicbox needs is broken, else 0.
Status ¶
Bases: StrEnum
How one dependency or setting checked out.
Source code in comicbox/doctor/result.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
is_failure property ¶
Whether this status means something comicbox needs is broken.
main(params) ¶
Run comicbox doctor on the args after doctor; return the exit code.
Source code in comicbox/doctor/__init__.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
run_checks(args=None, *, online_sources=()) ¶
Check comicbox’s external dependencies and config.
args is what a run would get, Namespace(comicbox=...), so the report describes the config that run would see. None checks the environment and config files alone. online_sources names the sources to verify with one live request each, "all" for every configured one.
Source code in comicbox/doctor/__init__.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |