Repository navigation
translate doctor --require-state checks an edition's state files for a required CI check (#370). It fails on a lecture without a state file that isn't a declared exception, and on the other gaps that would put the wrong lectures in sync's scope. CLI only: no sync run changes.
Added
translate doctor --require-statefails on any gap in an edition's state files, for a required CI check (#370). Undersync-scope: existinga lecture's state file decides whether it syncs, butdoctoronly warned about a lecture without one, so a CI step running it passed. With the flag, the.translate/state/check fails on (a) a lecture in the edition's lecture set with no state file that is not a declared exception, (b) a declared exception that has a state file, (c) a file under.translate/state/with no lecture, including one that is not a<path>.md.ymlat all, such as a.DS_Store, and (d) a state file that cannot be read, and reports every one in a single run. It warns, without failing, on a lecture taken out of the ToC and kept with its state file (status'sUNLISTED) and on a stale exception. The state folder is compared with the lecture set by exact name, so a state file whose name differs in case from its lecture's fails on a macOS clone as it does on a Linux runner. Without a_toc.ymlthe check fails with theLecture setcheck.--jsonadds"requireState": trueand lists every file of each kind under the check'sdata. Without the flag nothing changes.- Exceptions are declared in
.translate/config.yml, understate-exceptions, a mapping from a docs-relative path to the reason, such asintro.md: English copy until its review round. It is a mapping so that the reasons survivestatus --write-state, which rewrites the config and keeps the key. A reason must be non-empty text; a bare date is read as text. A key that is not usable fails the check by name: astate-exceptionsthat is not a mapping, an empty reason, an absolute path or one that leaves the docs folder, a path that is not a.md, a repeated key, or two keys naming one file. A key written relative to the repository (lectures/intro.md) is named as such. This takes the place of the--excludethat #370 proposed. doctornames a config it cannot read, a repeated key among them, where it reported "missing required fields".- The CLI reference has a CI job that builds the CLI from a pinned release and runs the check.
- Exceptions are declared in