episode: expose ChannelData.publish_times - #53
Closed
chintondutta wants to merge 1 commit into
Closed
Conversation
publish_times was plumbed end to end (constructor, Episode.channel(), reader.py) but never exposed on ChannelData, unlike timestamps. Add the matching property, noting publish time is source-set and not guaranteed ascending (unlike log-time timestamps).
|
👋 Hi @chintondutta — thanks for the contribution! To keep starter issues available You already have #52 open, so this one is being closed automatically. |
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.
Fixes #4.
What was missing
ChannelDatastores per-message publish times but never exposed them: the constructor acceptspublish_timesand assignsself._publish_times(src/hflow/episode.py), andEpisode.channel()faithfully concatenates them from the reader -- but there was no property, so the data was plumbed end to end and then unreachable.Change
Added a
publish_timesproperty directly belowtimestamps, following the same pattern, returningself._publish_times. The docstring notes these are publish times (not log times) and, unliketimestamps, are not guaranteed ascending.Testing
New test
test_channel_publish_times_are_reachable(tests/test_end_to_end.py), using the existing synthetic-episode fixture: assertsep.channel("/joint_states").publish_timesis annp.ndarraywith shape(len(channel),).uv run pytest -q # 298 passed, 3 skipped; unrelated: tests/test_ffmpeg.py fails/errors in this sandbox (no ffmpeg/ffprobe on PATH) uv run ruff check --fix uv run ruff format uv run ty check