Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2f1ee5b
log sample data
LC-Linkous Sep 17, 2026
4bc943e
adding sample data updates to debug not-DC spike
LC-Linkous Sep 17, 2026
3e321d0
uv and toml updates
LC-Linkous Sep 17, 2026
dbcb64c
remove old data backup
LC-Linkous Sep 17, 2026
afbf09c
splitting data capture examples, sample data better
LC-Linkous Sep 17, 2026
a5a03e7
channel monitor test out example
LC-Linkous Sep 17, 2026
279f952
checkpoint. feeling out issue with DC spike and sampling
LC-Linkous Sep 17, 2026
02f36ab
sample data added
LC-Linkous Sep 18, 2026
4865714
FM ref data added
LC-Linkous Sep 18, 2026
b7f6085
wav demod samples
LC-Linkous Sep 18, 2026
dad3237
sample data rerun
LC-Linkous Sep 18, 2026
eb03759
examples updated. sample and demod
LC-Linkous Sep 18, 2026
2e87c75
readme
LC-Linkous Sep 18, 2026
fe28540
gitignore and changelog
LC-Linkous Sep 18, 2026
fdfca3e
bin issue corrected, truncation fix
LC-Linkous Sep 18, 2026
8f58dc8
updated tests
LC-Linkous Sep 18, 2026
35614b0
interrupt fix
LC-Linkous Sep 18, 2026
cf26935
updated the date for header
LC-Linkous Sep 18, 2026
f15c019
replaced old images, pt 1
LC-Linkous Sep 18, 2026
29cf38e
ported over interrupt fix from related library
LC-Linkous Sep 18, 2026
c0626c9
test parent kill interupt issue
LC-Linkous Sep 18, 2026
499beec
clean interrupt test
LC-Linkous Sep 18, 2026
8534b25
changelog partial update
LC-Linkous Sep 18, 2026
6aa5318
docstrings addition, prep for dev manual
LC-Linkous Sep 18, 2026
67f482e
cli and docstrings, prep for dev manual
LC-Linkous Sep 18, 2026
20b43bc
test updates, prepping for library update
LC-Linkous Sep 18, 2026
91a7e61
sigmf addition
LC-Linkous Sep 18, 2026
8b2ce0f
uv
LC-Linkous Sep 18, 2026
ef94f03
checkpt. first note dump on thread
LC-Linkous Sep 18, 2026
9ad3601
cli changelog dump. checkpt
LC-Linkous Sep 18, 2026
b5b4926
tests, strings, documentation. check pt before linux test
LC-Linkous Sep 19, 2026
dfbb374
add gitattributes
LC-Linkous Sep 19, 2026
975cad1
fix race condition hardware bug
LC-Linkous Sep 19, 2026
86e5484
race condition testing
LC-Linkous Sep 19, 2026
3990822
update gitignore to exclude test data (not sample data)
LC-Linkous Sep 19, 2026
8a821df
remove old test data
LC-Linkous Sep 19, 2026
0289fe1
text dump checkpt in changelog
LC-Linkous Sep 19, 2026
de1ef9b
changelog updated
LC-Linkous Sep 19, 2026
03d7f9f
repo README has CLI and debian update
LC-Linkous Sep 19, 2026
58b93a8
contributions
LC-Linkous Sep 19, 2026
acbc30d
platform update
LC-Linkous Sep 19, 2026
90a4560
test notes linux
LC-Linkous Sep 19, 2026
e0c0471
sweep data return, cosmetic and partial update squash
LC-Linkous Sep 19, 2026
28a97ac
deleting sample data
LC-Linkous Sep 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Line-ending policy: LF everywhere, on every platform.
# Identical working trees on Windows and Linux mean one patch/diff flavor
# and byte-identical checkouts; modern Windows tooling is LF-clean.
* text=auto eol=lf

# Binary payloads: never normalize.
*.iq binary
*.wav binary
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.bin binary

# Frozen verbatim fixtures are byte-exact by definition: real tool output
# captured for parser tests. Normalizing their line endings would silently
# alter the very bytes they exist to preserve.
hackrfpy/tests/fixtures/** -text
11 changes: 9 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ jobs:
matrix:
# windows-latest is first because it is the platform this library
# targets; the cross-platform lifecycle stubs must pass there.
# ubuntu re-entered the matrix 2026-09-19: Linux was verified
# against a real board (Debian 12, full suite incl. hardware tests,
# 227/227) and is held to the same standards as Windows. This also
# puts the Linux pdeathsig dead-man path back under regression
# testing. The verification itself surfaced and fixed two lifecycle
# bugs (frozen-writer USB-claim leak; open-retry race) -- see the
# CHANGELOG.
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13"]

Expand All @@ -42,12 +49,12 @@ jobs:
run: uv sync

- name: Run test suite (hardware tests deselected)
run: uv run pytest -m "not hardware" --cov=hackrfpy --cov-report=xml --cov-report=term-missing
run: uv run pytest -m "not hardware" --cov=hackrfpy --cov-report=xml --cov-report=term-missing --cov-fail-under=85

- name: Upload coverage to Codecov
# Optional: only runs once linked at https://codecov.io. Tokenless for
# public repos. Safe to leave in before linking - it just no-ops/soft-fails.
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
if: matrix.os == 'windows-latest' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v5
with:
files: hackrfpy/coverage.xml
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,4 @@ __marimo__/

# Streamlit
.streamlit/secrets.toml
hackrfpy/tests/fm_testdata/
299 changes: 289 additions & 10 deletions CHANGELOG.md

Large diffs are not rendered by default.

69 changes: 57 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ path.
or code that reproduces it.
- **Request a feature** — open an issue with the feature template. Note that
signal processing (demod, FFT, waterfalls) is intentionally **out of scope**
for this repo; see `project_summary.md`.
for the library API — this project is transport + control. The `examples/`
directory may demonstrate downstream processing (`fm_demod_to_wav.py`) to
show where the boundary sits, but the API stays at `complex64` in, files
out.
- **Improve docs** — README fixes, clearer examples, and beginner notes are all
welcome and don't require hardware.
- **Submit code** — see the workflow below.
Expand All @@ -44,12 +47,25 @@ Run these from the `hackrfpy/` directory:
uv run pytest -m "not hardware" # full hardware-free suite must pass
uv run ruff check . # lint
uv run ruff format . # apply formatting
uv run mypy src/hackrfpy # type check (advisory for now)
uv run mypy src/hackrfpy # type check (BLOCKING in CI)
```

CI runs the same suite across Windows, Linux, and macOS on Python 3.11–3.13.
Windows is the primary target platform, so process-lifecycle changes must pass
there specifically.
Also expected with a code PR:

- **A CHANGELOG entry** under `[Unreleased]` — this project's changelog is
detailed and rationale-bearing; say what changed and why.
- **Docstrings on new public API** — `tests/test_docstrings.py` gates the
whole public surface and will fail your PR without them.
- **Coverage** — CI gates at 85% (see the policy at the bottom of this file);
new code arrives with its tests.
- **Hardware evidence for core changes** — any change under `src/hackrfpy/`
requires a full-suite run on Windows with a real HackRF attached (hardware
tests passing), reported in the PR. See the policy below.

CI runs the suite on Windows and macOS across Python 3.11–3.13. Windows is
the primary — and only hardware-verified — platform, so process-lifecycle
changes must pass there specifically. Linux is not in the CI matrix: see the
platform standard in the coverage policy below.

## Adding a command

Expand All @@ -75,20 +91,49 @@ tests import. Don't hard-code envelope numbers in a method.
## Tests that touch hardware

Tests that need a real board are marked `@pytest.mark.hardware` and self-skip
when no device is detected. Parser fixtures live in `tests/fixtures/` and are
frozen from real hardware output via `tests/collect_real_data.py`. If you add a
parser, add a real-output fixture rather than a hand-written one where possible.
when no device is detected. A second, lighter category is marked with a
`needs_tools` skipif: those need the real `hackrf-tools` binaries on `PATH`
but **no board**, so they run on any machine with the tools installed — which
is why passed/skipped counts differ between machines. Parser fixtures live in
`tests/fixtures/` and are frozen from real hardware output via
`tests/collect_real_data.py`. If you add a parser, add a real-output fixture
rather than a hand-written one where possible.

## Commit and PR conventions

- Keep PRs focused; one logical change per PR is easiest to review.
- Reference the issue the PR closes (`Closes #123`).
- Describe what you tested, and whether it was tested against real hardware or
stubs only.
- New public methods need a README entry in the Method Reference and, ideally, a
runnable example under `examples/`.
- Describe what you tested. For changes under `src/hackrfpy/` (the core
library), a full-suite run on Windows with a real HackRF attached — hardware
tests passing — is **required**, and the PR should say so (paste the pytest
tail). Docs, examples, and test-only changes are exempt. CI cannot attach a
board, so this is the human half of the quality gate; maintainers may
re-verify on their own hardware before merge.
- New public methods need a README entry in the Method Reference in the main repo README
and, ideally, a runnable example under `examples/`.

## License

By contributing, you agree that your contributions are licensed under the
project's **GPL-2.0-or-later** license.

## Test coverage and platform policy

CI gates coverage at **85% minimum** (`--cov-fail-under=85`, applied on every
leg of the CI matrix). Coverage below the gate fails the build; new code
arrives with the tests that keep it above.

**The CI matrix contains hardware-verified platforms** — currently Windows
(primary) and Linux (verified 2026-09-19), plus macOS pending verification.
A platform is included when it is verified against a real HackRF
board, and is then held to the same standards (the 85% gate and the
hardware-evidence requirement below).

**Core library changes require a passing hardware test.** CI has no board
attached, so the stub suite is necessary but not sufficient: any PR that
changes code under `src/hackrfpy/` must include evidence of a full-suite
run — hardware tests included and passing — on Windows with a real HackRF
attached. Paste the pytest tail in the PR description. Changes limited to
docs, examples, or tests are exempt. The gates that CI *can* enforce
(coverage, lint, types, docstrings) stay automated; this one is enforced by
review.
Loading
Loading