Skip to content

v0.3.14

Choose a tag to compare

@styu12 styu12 released this 17 Apr 03:05
· 109 commits to main since this release

Highlights

  • pip install syncfield is now enough for Recipe 1. The base install ships UVCWebcamStream and the browser viewer, covering the canonical iPhone + Mac webcam quickstart end-to-end with zero extras.
  • Clean install hints. Importing an adapter whose extra is missing now raises ImportError with the exact pip install 'syncfield[<extra>]' line, instead of the silent name-vanishes behaviour the old try/except ImportError: pass pattern produced.
  • SessionOrchestrator.last_episode_dir. After stop(), the orchestrator rotates output_dir to a fresh path for the next recording. The new last_episode_dir property points at the directory the just-finished episode wrote into, so callers can locate their files without racing the rotation.

Changes

Packaging (pyproject.toml)

  • [project.dependencies] now includes av, numpy, fastapi, uvicorn[standard], Pillow. These were previously split across the uvc and viewer extras; both extras are removed (legacy syncfield[uvc,viewer] still resolves with a pip warning).
  • The uvc / oak extras gained numpy>=1.21, which was missing and used to break UVCWebcamStream / OakCameraStream on a clean extras-only install.

syncfield.adapters

  • Optional adapters (HostAudioStream, BLEImuGenericStream + profiles, OgloTactileStream, MetaQuestCameraStream, Go3SStream) are eager-imported and registered with the discovery system when their extra is installed. When the extra is missing, referencing the adapter raises ImportError (propagates through from … import …) with an install hint instead of the name silently disappearing.
  • OakCameraStream remains truly lazy even when syncfield[oak] is installed so depthai's process-wide SIGSEGV / SIGABRT handlers are only loaded by sessions that actually use OAK hardware.
  • __dir__() added so missing-extra adapters still surface in dir(syncfield.adapters) and IDE tab completion.

SessionOrchestrator

  • New last_episode_dir: Optional[Path] property — snapshots output_dir before _prepare_next_episode() rotates it.
  • wait_for_leader_stopped() precondition tightened to check _session_clock is None (since mDNS surface moves to __init__ in refactor 64dd0fd, the old _browser is None guard is a no-op).

Docs & Examples

  • Root README.md rewritten from the legacy 0.1 SyncSession.stamp() / record() API to the current SessionOrchestrator / Stream SPI.
  • Quickstart polished: Recipe 1 is now pip install syncfield flat; Recipe 2 requires only [ble,camera].
  • examples/README.md collapsed to the single canonical install line with a per-example extras column.

Tests

25 pre-existing unit-test failures fixed; full tests/unit suite (786 tests) passes.