bandsaunter/pyproject.toml
The Dust Council c3b382a5f6 Ask for what is needed, and nothing that is not
An audit of the dependencies rather than a feature, prompted by being asked to
make sure they were all listed.  Four things were wrong, and one of them was
wrong in the direction nobody checks.

A dependency that was not one.  The packaging asked for matplotlib, in a
"plots" extra, and nothing in the program has ever imported it: the graphs a
weather log turns into are drawn by this package's own PNG writer, the same one
the waterfalls and the maps use.  Anybody installing with that extra got a
large package to no effect.  Declarations are checked against imports in one
direction as a matter of course -- an undeclared import fails on the first
machine that is not the one it was written on -- and never in the other, where
the failure is silent and costs somebody else's disk.

Two speech engines that could not be installed.  The transcriber takes five
engines and the metadata offered extras for two of them, so openai-whisper and
pocketsphinx were supported and unobtainable.  They are alternatives rather
than a set -- one is tiny and poor, one is the reference and slow -- so each has
an extra of its own now.

Nothing that can play a recording.  The package suggested no audio player at
all, so on a fresh install saunterbrowse's Enter key did nothing and there was
no way to find out why.  Recommended now, as any one of the three things that
provide pw-play, paplay or aplay.

Nothing that can open a map.  The register's g key hands a coordinate to a
browser, which needs something to start one; xdg-utils is suggested and the
absence documented, since printing the coordinates instead is the useful answer
on a headless receiver anyway.

And the readme's list of audio players was simply wrong -- it named sox, left
out mpv, and had the order it does not try them in.  It is generated from the
table the code actually uses now.

Checked complete rather than assumed: the manual covers all seventeen
subcommands, and the package ships every module, both manuals, the copyright,
the readme and the install instructions.

Nine tests so none of it drifts again, each confirmed by putting the defect
back.  The pair that matters checks the dependencies both ways: everything
imported has to be asked for, and everything asked for has to be imported.  The
second of those is the one that had never existed, and is the one that would
have caught matplotlib years ago.

Full suite 2901 passed.  Built as 2026-09-25_01.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
2026-09-25 08:29:20 -07:00

74 lines
2.9 KiB
TOML

[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"
[project]
name = "bandsaunter"
dynamic = ["version"]
description = "Signal scanner, recorder and identifier for RTL-SDR receivers"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "GPL-3.0-or-later"}
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Topic :: Communications :: Ham Radio",
"Environment :: Console",
]
dependencies = [
"numpy>=1.22",
"scipy>=1.8",
"rich>=12.0",
"PyYAML>=5.4",
]
[project.urls]
Homepage = "https://frostwarning.com/git/dustcouncil/bandsaunter"
Source = "https://frostwarning.com/git/dustcouncil/bandsaunter"
[project.optional-dependencies]
# The realtime windows -- the aircraft map, the APRS map. Optional on
# purpose: without them the passive capture, the terminal boards and the
# drawn maps all work unchanged. PyQt6 is what this asks for, but the code
# takes PyQt5, PySide6 or PySide2 as well, because distributions disagree
# about which they ship.
window = ["PyQt6>=6.4"]
# pyte is a terminal emulator, used by the resize tests to read back what
# a real terminal would show. Those tests skip without it.
dev = ["pytest>=7.0", "pyte>=0.8"]
# Speech recognition for --transcribe. Optional: transcription is off by
# default, and the scan says so plainly when no recogniser is installed.
# One extra per engine, because they are alternatives rather than a set --
# `bandsaunter transcribe --engines` says what each is good and bad at.
transcribe = ["faster-whisper>=1.0"]
transcribe-whisper = ["openai-whisper>=20230314"]
transcribe-small = ["vosk>=0.3"]
transcribe-tiny = ["pocketsphinx>=5.0"]
# There was a "plots" extra here asking for matplotlib. Nothing in the
# program has ever imported it -- the graphs a weather log turns into are
# drawn by this package's own PNG writer, the same one the waterfalls and
# the maps use -- so it installed a large dependency to no effect. A test
# now checks every extra against what is actually imported.
# System packages, which pip cannot install. Recorded here so packaging does
# not have to rediscover them:
# Depends: librtlsdr0 -- the dongle is unreachable without it
# Recommends: espeak-ng -- clearer spoken timestamps; a built-in
# synthesiser is used when absent
[project.scripts]
bandsaunter = "bandsaunter.cli:main"
saunterbrowse = "bandsaunter.browse:main"
[tool.setuptools.dynamic]
# The displayed version (2026-08-21_01) is not valid PEP 440, so packaging
# tools are given the converted form. One source of truth, converted at the
# edge, rather than two version strings that can drift apart.
version = {attr = "bandsaunter.pep440_version"}
[tool.setuptools.packages.find]
include = ["bandsaunter*"]
[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = ["ignore::DeprecationWarning"]