Cover every option in the help, the manual and the readme, and say what to install
An audit rather than a feature, prompted by wanting this fit to hand to somebody else. Five options had no command-line flag written down in the table the manual is generated from -- location, hold, schedules, tile_url and speed_unit -- so five flags that exist were missing from the manual. Four of them did exist under other names and are now recorded; hold had no flag at all and has one. Four switches could be turned off from the command line and not back on: --no-lookup, --no-basemap, --no-airports and --no-labels had no positive halves, so an option turned off in the saved settings could not be turned on again for one run. All four now have both. And adsb, which opens the window and draws a map when it stops, could not be given any of the settings that decide what those look like: no --at, no --radius, no --tiles, no --map-brightness, no --width, --fps, --trail, --fade, --stale, --airports or --labels. It takes all of them now. The manual had no list of the aircraft options at all -- the ADS-B sections were hand-written prose -- so five of them appeared nowhere in it. It now generates an AIRCRAFT OPTIONS section from the same table the menu and the flags come from, and the readme carries a table of all thirty-four with their flags and defaults. Three tests hold the three of them together: one that every option records its flag, one that every flag the table claims actually exists on a command, and one that the readme names them all. The installing instructions now list every dependency rather than only the optional ones: the four Python packages with their names in Debian, Fedora and Arch, and librtlsdr, which is a C library and therefore the one thing pip cannot bring and a virtual environment cannot supply. What reaches a network is written down too -- which host, when, and which file it is cached in -- since somebody installing this on a metered or air-gapped machine has to be able to see that nothing is fetched behind their back. build-repo.sh needs dpkg-dev and apt-utils, which a minimal system does not have, and now says so. Verified rather than asserted: a clean virtual environment, pip install from this tree, and a real log read back through the installed command. It pulls seven wheels rather than the four the page claimed, the other three being what Rich brings with it. Also: matplotlib is gone from the readme's dependency table, nothing having imported it; ffmpeg and Qt are in it, both having been missing; ffmpeg is a Suggests on the package; and resume.sh is ignored. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
This commit is contained in:
parent
6d2436cde1
commit
8ed01f991f
16 changed files with 1012 additions and 46 deletions
|
|
@ -128,9 +128,43 @@ def test_it_warns_about_the_thing_every_debian_user_hits_first():
|
|||
def test_it_lists_the_optional_dependencies_and_what_each_one_buys():
|
||||
body = INSTALL.read_text()
|
||||
for optional in ("espeak-ng", "ffmpeg", "faster-whisper", "vosk",
|
||||
"rtl-sdr", "pyqt6"):
|
||||
"rtl-sdr", "pyqt6", "openai-whisper", "pocketsphinx"):
|
||||
assert optional in body, optional
|
||||
assert "Optional dependencies" in body
|
||||
# What each one buys, and what is lost without it: the two columns are
|
||||
# the point of the table, not the list of names.
|
||||
assert "Gives you" in body and "Without it" in body
|
||||
assert "Optional." in body
|
||||
|
||||
|
||||
def test_it_lists_the_required_dependencies_and_who_needs_them():
|
||||
"""Somebody installing from scratch has to be told the whole of it,
|
||||
including the one piece pip cannot bring."""
|
||||
body = INSTALL.read_text()
|
||||
for required in ("python3-numpy", "python3-scipy", "python3-rich",
|
||||
"python3-yaml", "librtlsdr0"):
|
||||
assert required in body, required
|
||||
assert "Fedora" in body and "Arch" in body
|
||||
|
||||
|
||||
def test_it_says_which_dependency_pip_cannot_install():
|
||||
"""librtlsdr is a C library, so no virtual environment brings it and it
|
||||
is the one thing that has to come from the distribution by hand."""
|
||||
body = INSTALL.read_text()
|
||||
assert "librtlsdr" in body
|
||||
assert "pip` cannot install it" in body or "cannot come from pip" in body
|
||||
assert "dnf install rtl-sdr" in body
|
||||
assert "pacman -S rtl-sdr" in body
|
||||
assert "brew install librtlsdr" in body
|
||||
|
||||
|
||||
def test_it_says_what_reaches_a_network_and_where_it_is_cached():
|
||||
"""Nothing is fetched behind anybody's back, and somebody installing
|
||||
this on a metered or air-gapped machine has to be able to see that."""
|
||||
body = INSTALL.read_text()
|
||||
for source in ("api.adsbdb.com", "hexdb.io", "tile.openstreetmap.org",
|
||||
"overpass-api.de"):
|
||||
assert source in body, source
|
||||
assert "~/.cache/bandsaunter/tiles" in body
|
||||
|
||||
|
||||
def test_it_says_how_to_install_the_recogniser_and_the_model():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue