Skip to content

episode: expose ChannelData.publish_times - #53

Closed
chintondutta wants to merge 1 commit into
Hebbian-Robotics:mainfrom
chintondutta:feat/4-expose-channeldata-publish-times
Closed

episode: expose ChannelData.publish_times#53
chintondutta wants to merge 1 commit into
Hebbian-Robotics:mainfrom
chintondutta:feat/4-expose-channeldata-publish-times

Conversation

@chintondutta

Copy link
Copy Markdown
Contributor

Fixes #4.

What was missing

ChannelData stores per-message publish times but never exposed them: the constructor accepts publish_times and assigns self._publish_times (src/hflow/episode.py), and Episode.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_times property directly below timestamps, following the same pattern, returning self._publish_times. The docstring notes these are publish times (not log times) and, unlike timestamps, 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: asserts ep.channel("/joint_states").publish_times is an np.ndarray with 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

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).
@github-actions

Copy link
Copy Markdown

👋 Hi @chintondutta — thanks for the contribution! To keep starter issues available
for other contributors and give every pull request a real review, we accept
1 open pull request per contributor at a time.

You already have #52 open, so this one is being closed automatically.
Once your open pull request is merged or closed, feel free to reopen this one —
no work is lost.

@github-actions github-actions Bot closed this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose ChannelData.publish_times (stored but unreachable)

1 participant