Update docs to match exclusive end_time implementation #1286
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.
Changelog
None
Docs
end_time
parameter as an exclusive boundDescription
According to the documentation here, the iterator should exclude messages that were logged before
start_time
or afterend_time
(i.e. both inclusive bounds). However, the implementation also excludes messages published at the same time asend_time
(making it an exclusive bound). The documentation has been updated to match the implementation.This discrepancy in the Python package is only happening in
python/mcap/mcap/reader.py
whereiter_message()
anditer_decoded_message()
are defined. In all of the other files where those functions are called,end_time
is described as an exclusive bound:python/mcap-protobuf-support/mcap_protobuf/reader.py
python/mcap-ros1-support/mcap_ros1/reader.py
python/mcap-ros2-support/mcap_ros2/reader.py
This motivated updating the documentation rather than modifying the implementation (which would also have been a breaking change). In addition, this follows the typical Python convention of using inclusive-start and exclusive-end bounds (
list[start:end]
,array[start:end]
,range(start, end)
,numpy.arange(start, end)
, etc...).end_time
is inclusiveend_time
is exclusiveend_time
is exclusiveend_time
is exclusiveFixes: FG-9583