feat: unified Recorder API with config overrides and runtime properties#10
Merged
feat: unified Recorder API with config overrides and runtime properties#10
Conversation
Restore the clean Python API from the pre-legacy design on top of the proven legacy multi-process recording internals. Recorder constructor now accepts capture_video, capture_audio, and other recording options as keyword params that override config defaults. Adds event_count, is_recording, stats, wait_for_ready(), and capture properties for runtime introspection. Changes: - config.py: Add RecordingConfig dataclass + config_override() context manager for temporary config patching - recorder.py: Add shared counter params to record(), fix module-level config reads (STOP_SEQUENCES, PLOT_PERFORMANCE), rewrite Recorder class with full API (~120 lines replacing ~36) - cli.py: Forward --video/--audio/--images flags to Recorder - __init__.py: Export RecordingConfig - tests: 11 new tests (Recorder API + config_override) Fixes compatibility with record_waa_demos.py which passes capture_video/capture_audio and reads recorder.event_count. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Recorderconstructor now acceptscapture_video,capture_audio, and other recording options as keyword paramsevent_count,is_recording,stats,wait_for_ready(), andcapturepropertiesrecord_waa_demos.py(openadapt-evals) which was broken by the legacy migrationTest plan
uv run pytest tests/ -v --ignore=tests/test_browser_bridge.py -m "not slow")uv run ruff check openadapt_capture/)Recorder(path, capture_video=True, capture_audio=False)worksrecorder.event_count,recorder.stats,recorder.is_recordingall accessible🤖 Generated with Claude Code