Skip to content

Add optional trajectory_ids filtering to TrajectoryStore.get_trajectories_metadata across store implementations: - #2056

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_974081436
Open

Add optional trajectory_ids filtering to TrajectoryStore.get_trajectories_metadata across store implementations:#2056
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_974081436

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Aug 31, 2026

Copy link
Copy Markdown

Add optional trajectory_ids filtering to TrajectoryStore.get_trajectories_metadata across store implementations:

  • TrajectoryReader Protocol: Update protocol signature in store.py to accept trajectory_ids: list[str] | None = None and document TrajectoryMetadataNotFoundError when requested IDs are missing.
  • FileTrajectoryStore: Support filtering metadata by explicit trajectory IDs, preserving request order and raising TrajectoryMetadataNotFoundError if any requested ID does not exist or has missing metadata on disk.
  • InMemoryTrajectoryStore: Support filtering metadata by trajectory_ids, returning deep copies of matched metadata or raising TrajectoryMetadataNotFoundError for missing IDs.

Tests Added:

  • store_testing: Add reusable contract tests to TrajectoryReaderTestCase covering ID filtering, missing ID error handling, and empty list retrieval.

@google-cla

google-cla Bot commented Aug 31, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service
copybara-service Bot force-pushed the test_974081436 branch 5 times, most recently from b927b45 to 228b97a Compare September 2, 2026 20:09
…ries_metadata across store implementations:

- TrajectoryReader Protocol: Update protocol signature in `store.py` to accept `trajectory_ids: list[str] | None = None` and document `TrajectoryMetadataNotFoundError` when requested IDs are missing.
- FileTrajectoryStore: Support filtering metadata by explicit trajectory IDs, preserving request order and raising `TrajectoryMetadataNotFoundError` if any requested ID does not exist or has missing metadata on disk.
- InMemoryTrajectoryStore: Support filtering metadata by trajectory_ids, returning deep copies of matched metadata or raising `TrajectoryMetadataNotFoundError` for missing IDs.

Tests Added:
- store_testing: Add reusable contract tests to `TrajectoryReaderTestCase` covering ID filtering, missing ID error handling, and empty list retrieval.

PiperOrigin-RevId: 974081436
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.

2 participants