Library for shipping HamSCI sigmond observations to HF reporting destinations.
hs-uploader is the read-side counterpart to sigmond.hamsci_sink's
Writer: clients import it to forward records they have staged in
sigmond's local SQLite sink (preferred) or in spool files (fallback) up to a
HamSCI / community ingest destination — wsprdaemon.org, wsprnet.org,
PSKReporter, PSWS, etc.
Active. Sources, transports, and watermark store are all working:
- Sources:
SqliteSource(preferred — readssigmond.hamsci_sink.Writer'spending_uploadsqueue, withextra_whereandstart_atknobs and a strictschema_versioncheck),WsprCycleSource(cycle-aligned variant over the same queue — yields oneRecordBatchper 2-minute WSPR cycle, bundlingwspr.spotsandwspr.noisefor a single per-cycle tar),FileTreeSource(delete-on-ack or keep retention; per-file parsers may return one or many records per file). - Transports:
PskReporterTcp(owns the socket; no externalpskreporterdependency),WsprdaemonTarSftp/WsprdaemonTarFtp,WsprNet(HTTP multipart POST towsprnet.org/meptspots.php),PswsMagnetometerSftp. - Watermark store:
SqliteWatermarkStorewith deliverable retry + per-attempt audit table. - Schema safety: every queue row carries the producer's
schema_version; rows outside the pipeline's accepted set are filtered out and flip source health tostale-schema— a clean halt rather than shipping records a transport may misread.
Current consumer: psk-recorder ships psk.spots rows via
PskReporterTcp, behind the PSK_USE_HS_UPLOADER=1 feature flag.
┌───────────────┐ Record ┌──────────────────┐ Outcome
│ Source │ ─────────► │ Transport │ ─────────────► destination
│(SQLite|Files) │ │ (per-protocol) │ (network)
└───────────────┘ └──────────────────┘
▲ │
│ advance/retry ▼
└───────── Watermark ◄─── Pipeline (orchestrator)
(SQLite)
Three orthogonal abstractions:
- Source — yields
Records starting from an opaque cursor.SqliteSourceis preferred (WsprCycleSourceis its cycle-aligned variant for wsprdaemon.org tars);FileTreeSourceis the fallback. - Transport — accepts a batch and reports an
Outcome(acked, partial-ack, retry-later, dead). One per upstream destination. - WatermarkStore — owns per-
(source, destination, table)cursor and retry-deliverable state. SQLite-backed.
A Pipeline binds one source + one transport + one watermark slot. An Uploader orchestrates N pipelines.
The library is synchronous and idempotent. No threads of its own beyond a per-pipeline pump worker; restarts re-derive the batch from the cursor, so there is no in-flight state to lose.
pip install -e ".[dev,wsprdaemon,wsprnet,pskreporter,psws]"Optional extras let consuming clients pull only the transports they use.
MIT — see LICENSE.