pyflightstream.utils.cli (stable)¶
Generated from the docstrings at build time: every one of the 1 names in the __all__ of pyflightstream.utils.cli has an entry below. The names a guide or an example uses come first; the others follow under Advanced.
pyfs-manual: compare a FlightStream manual against the command database.
Pipeline role: maintainer entry point, outside the run pipeline. It reads licensed vendor documentation from a path the caller gives and writes nothing unless told to.
Six subcommands, and the split between them is the point.
sweep answers "what do the registered builds document that we do not
have", reading every edition named in a manifest and reporting the
union. That is the question a coverage push asks, and it is not the same
question as the one below: a command absent from one edition may be
recorded from another.
surface reads the same manifest and asks the other multi-edition
question: what each build documents, and what changed between one build
and the next. sweep measures this package against the manuals;
surface measures the manuals against each other, and answers nothing
about the database at all.
coverage answers the sweep's question of ONE manual, which is what a
single new release raises before it has a manifest row.
citations asks the one question the other four do not: not what the
manual holds, but whether what the database already SAYS about the
manual is still true. It re-reads every version row's page citation
against the edition it names. It is the only one that exits non-zero on
a finding, because a sweep's findings are work remaining while a
citation that does not hold is a shipped statement that is wrong.
register is the one that WRITES INTO THE DATABASE, and it writes one
kind of row only: a documented version row for a command a new
edition describes exactly as its predecessor did. It compares what the
two editions SAY, never which page they say it on, because a local
reflow moves a run of commands by a page without changing a word and a
page rule drops every one of them. A command the new edition describes
differently is reported and never written: that is a reading somebody
owes, and inventing it is the one thing this tool must not do.
draft turns either answer into entries to review, and only writes
when --write is passed with a destination.
The default of draft is a dry run for a measured reason, stated in
:mod:pyflightstream.utils.manual: the drafts reproduce 77 percent of
the argument lists this database already holds by hand. The other
quarter are judgements the manual does not state, so a draft written
unreviewed would put invented grammar in front of the emitter that
validates other people's scripts.
Used in the guides¶
pyflightstream.utils.cli.main
¶
main(argv: Sequence[str] | None = None) -> int
Run the command line and return a process exit code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
argv
|
sequence of str
|
The command-line arguments, |
None
|
Returns:
| Type | Description |
|---|---|
int
|
0 when the requested report or write completes. Citations returns 1
on findings; sweep returns 1 on unreachable commands only with
|