All notable changes to tinySA_python / tsapython are documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Continuous integration: GitHub Actions workflow running the hardware-free test suite across Windows, Linux, and macOS on Python 3.10–3.13, plus a ruff + mypy lint job and a package build check, on every push and pull request.
- Type annotations across the entire shipped package (all 226 definitions),
and
mypyadded as a blocking CI gate (disallow_untyped_defs). The package has always shipped apy.typedmarker, which tells downstream type-checkers the inline annotations are real; previously 0 of 226 definitions were annotated, so that marker was a false promise. It is now enforced. MixinHostbase class (_host.py) making the contract between thetinySAhost class and the command mixins explicit and type-checkable. At runtime it is an empty class; composition and behavior are unchanged.- Committed
uv.lockand a PEP 735devdependency group, makinguv sync/uv run pytestthe blessed development workflow (the previous README warning againstuv run pytestno longer applies). - Ruff configuration in
pyproject.toml. The blocking ruleset is deliberately small (E9 syntax errors + F pyflakes); style rules are a planned follow-up. - Release workflow now runs the test suite, lint, and type check before building or publishing, so a release cannot ship with a red suite.
- Community health files:
CONTRIBUTING.md,CODE_OF_CONDUCT.md,SECURITY.md,CHANGELOG.md, issue templates, and a pull request template. - Captured-fixture provenance:
tests/collect_samples.pynow records the device model and firmware in the generated fixture header, and the existingcaptured_responses.pyheader was retrofitted (tinySA ULTRA, tinySA4_v1.4-143-g864bb27). zenodo.jsonnow carries aversionfield matchingCITATION.cff.
get_color()crashed with aTypeErrorwhenever a color lookup matched: it applied astrregex pattern to the rawbytearraydevice reply. Found by the new type checking. The reply is now decoded before matching, and aNonereply no longer crashes the length check.color()no longer crashes if called with a valid ID butRGB=None; it returns the error byte instead.- Serial-touching methods now raise a clear
RuntimeError("not connected: call connect() or autoconnect() first") instead of an opaqueAttributeErroronNoneTypewhen used before connecting. - A failed serial read inside
tinySA_serial()now propagatesNoneinstead of crashing inclean_return(). - Out-of-range string inputs to
correction()andset_IF1()now return the error byte instead of raisingTypeErroron comparison. - README no longer references
requirements.txt/test_requirements.txt, which were removed from the repository in the 3.0.0 packaging restructure; install instructions now go through thepyproject.tomlextras. - README repository-structure diagrams updated to match the actual tree
(added
examples/filtering_scan_artifacts.py,examples/find_peaks.py, andtests/diagnose_reset.py; removed the requirements files). - Removed unused imports and dead local variables flagged by lint. No behavior change.
- Removed
examples/__init__.py— the examples directory is a collection of runnable scripts, not a package. - Merged two near-duplicate README sections documenting
tests/collect_samples.py.
- Alias-function signatures aligned with the methods they delegate to
(
set_color,preform_touch,restart_device,get_sample_pts,trigger_level,set_ultra_start/set_ultra_harmonic).
- Published to PyPI as
tsapython. - Automated test suite (pytest): command-construction tests via a recorded
serial seam, parsing tests against captured device responses, and
@pytest.mark.hardwaretests that self-skip without a connected device. tests/collect_samples.pyhelper for freezing real device responses into parsing fixtures.- Runnable examples under
examples/, including scan/scanraw plotting, static and realtime waterfalls, artifact filtering, and peak finding. - Trusted-publishing release workflow (
release.yml) building with uv and publishing to PyPI on GitHub release. - Zenodo archival with DOI (
zenodo.json,CITATION.cff).
- Restructured into an installable package with a
src/layout: thetinySAclass is now composed from per-category mixins undersrc/tsapython/_commands/, with shared state, serial handling, and helpers incore.py. The public API (from tsapython import tinySA) is unchanged. - Packaging moved fully to
pyproject.toml(uv build backend), withplottingandtestextras replacing the loose requirements files.
See the GitHub releases for pre-3.0.0 history, when the library shipped as a single-class module.