Skip to content

Fix SPICE CLI query date filters - #365

Merged
leowerneck merged 2 commits into
IMAP-Science-Operations-Center:mainfrom
leowerneck:364-bug---spice-cli-queries-don-t-accept-date-filters
Oct 20, 2026
Merged

leowerneck merged 2 commits into
IMAP-Science-Operations-Center:mainfrom
leowerneck:364-bug---spice-cli-queries-don-t-accept-date-filters

Conversation

@leowerneck

@leowerneck leowerneck commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Change Summary

Closes #364.

Overview

This fix extends the current translation between CLI date arguments and the ones expected by /spice-query to also support --start-date and --end-date, translating them to start_time and end_time, respectively.

File changes

  • imap_data_access/io.py: extended existing logic to support multiple parameters in a cleaner way.
  • tests/test_io.py: mimic the logic in imap_data_access/io.py, as before.

Testing

Running

uv run pytest

results in 150 tests passing, no failures.

@leowerneck leowerneck self-assigned this Oct 20, 2026
@leowerneck leowerneck added the bug Something isn't working label Oct 20, 2026
@leowerneck leowerneck added this to IMAP Oct 20, 2026
@leowerneck
leowerneck requested a balanced review from Copilot October 20, 2026 14:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused changes address the reported issue, preserve existing mappings, and have no unresolved findings.

No open issues 🎉

What changed in this PR

Fixes #364 by translating CLI date filters into the parameter names expected by /spice-query.

Changes:

  • Maps start_date and end_date to start_time and end_time.
  • Preserves ingestion-date mappings and updates test expectations.
File Description
tests/​test_io.py Updates expected SPICE query parameter mappings.
imap_data_access/​io.py Extends date-filter translation using a shared mapping loop.

Review effort: Balanced

@tmplummer tmplummer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@leowerneck
leowerneck merged commit 4d85f60 into IMAP-Science-Operations-Center:main Oct 20, 2026
15 of 16 checks passed
@github-project-automation github-project-automation Bot moved this to Done in IMAP Oct 20, 2026
@leowerneck
leowerneck deleted the 364-bug---spice-cli-queries-don-t-accept-date-filters branch October 20, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

BUG - SPICE CLI queries don't accept date filters

3 participants