Add time filtering to SDK + extra model fields#278
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds end-to-end temporal filtering for DigitalRF (rf@*.h5) file listings/downloads, and expands dataset/capture models and APIs to expose richer relationship/ownership metadata (including a new dataset detail endpoint).
Changes:
- SDK: Add
start_time/end_timesupport tolist_filesanddownload, plus pagination propagation and warning forwarding. - Gateway: Add temporal query params to file listing with a
warningsarray included in paginated responses; add dataset detailretrievereturning captures + artifact files. - Models/serializers/tests: Introduce shared capture enums, expand dataset/capture fields, and add unit/integration coverage for temporal filtering and composite capture serialization.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/tests/ops/test_paginator.py | Adds unit tests for preserving temporal kwargs across pages and logging API warnings. |
| sdk/tests/ops/test_files.py | Adds unit tests for temporal param validation and datetime-to-ISO query formatting. |
| sdk/tests/integration/test_file_ops.py | Adds integration tests for temporal listing/download behavior and warning logging. |
| sdk/src/spectrumx/ops/pagination.py | Forwards first-page warnings from API via log_user_warning. |
| sdk/src/spectrumx/models/datasets.py | Adds captures/files to Dataset and introduces nested dataset-side models. |
| sdk/src/spectrumx/models/captures.py | Moves enums to shared module; adds additional indexed time display fields and sharing flags. |
| sdk/src/spectrumx/models/capture_enums.py | New shared CaptureType / CaptureOrigin enums module. |
| sdk/src/spectrumx/gateway.py | Adds start_time/end_time query params to list_files; adds get_dataset. |
| sdk/src/spectrumx/client.py | Adds temporal params to download/list_files; adds dataset convenience methods. |
| sdk/src/spectrumx/api/sds_files.py | Validates paired temporal params and formats datetimes as UTC ISO for gateway. |
| sdk/src/spectrumx/api/datasets.py | Adds dataset detail fetch + helpers to list captures/artifact files from that payload. |
| sdk/pyproject.toml | Updates Ruff per-file ignores for monorepo path layouts. |
| sdk/docs/mkdocs/changelog.md | Documents new temporal filtering and model expansions. |
| gateway/sds_gateway/api_methods/views/file_endpoints.py | Adds temporal query params, RF filtering, and always returns warnings in paginated responses. |
| gateway/sds_gateway/api_methods/views/dataset_endpoints.py | Adds dataset retrieve endpoint returning dataset metadata with captures + artifact files. |
| gateway/sds_gateway/api_methods/utils/swagger_example_schema.py | Adds warnings key to example paginated file list response. |
| gateway/sds_gateway/api_methods/tests/test_file_endpoints.py | Adds tests for warnings key presence and temporal filtering behavior. |
| gateway/sds_gateway/api_methods/tests/test_dataset_endpoints.py | Adds test for dataset detail retrieval containing captures/files. |
| gateway/sds_gateway/api_methods/tests/test_composite_capture_serialization.py | Adds serializer-level tests for multi-channel composite capture output. |
| gateway/sds_gateway/api_methods/tests/test_celery_tasks.py | Updates temporal filtering task docstring references. |
| gateway/sds_gateway/api_methods/serializers/file_serializers.py | Adds a nested artifact file summary serializer for dataset payloads. |
| gateway/sds_gateway/api_methods/serializers/dataset_serializers.py | Extends dataset serializer to embed captures/artifact files and break serializer cycles. |
| gateway/sds_gateway/api_methods/serializers/capture_serializers.py | Adds new derived time fields and enriches composite channel rows with OpenSearch bounds. |
| gateway/sds_gateway/api_methods/helpers/temporal_filtering.py | Refactors temporal filtering to share filter_files_by_temporal_bounds. |
| gateway/pyproject.toml | Adds Ruff ignore for composite serialization test magic numbers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
let me know if you need help with the conflicts after #279 |
|
See changelog for full list of changes, but basically added some methods to make dataset captures and artifact files more easily visible (list those directly) and then added some new parameters for getting/downloading dataset files:
lmk if this makes sense or if you have any logic suggestions/modifications here. |
30347ed to
bbd4ee1
Compare
No description provided.