Skip to content

SWAPI l1: log message and return if there is no data to process - #3565

Merged
lacoak21 merged 3 commits into
IMAP-Science-Operations-Center:devfrom
lacoak21:swapi_l1a_check_for_no_HVSCI_packets
Oct 19, 2026
Merged

lacoak21 merged 3 commits into
IMAP-Science-Operations-Center:devfrom
lacoak21:swapi_l1a_check_for_no_HVSCI_packets

Conversation

@lacoak21

Copy link
Copy Markdown
Contributor

Change Summary

closes #3564

Overview

There were two dates in october 2025 (6th and 19th) where processing failed. This was due to the fact that there were no packets in HVSCI mode. When this occurs we should exit the job gracefully since there is no relevant data to process.

File changes

  • imap_processing/swapi/l1/swapi_l1.py
    • update return type and return an empty list if there are no relevant science packets.

@lacoak21
lacoak21 requested a balanced review from Copilot October 14, 2026 16:36
@lacoak21 lacoak21 self-assigned this Oct 14, 2026

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.

🟡 Changes recommended

The regression path needs tests, and its log message currently misdiagnoses other empty-data conditions.

1 open finding
What changed in this PR

Gracefully handles SWAPI L1 science inputs without valid HVSCI sweep data.

Changes:

  • Returns None when no processable science sweeps remain.
  • Converts that result to an empty dataset list for the CLI.
File Description
imap_processing/​swapi/​l1/​swapi_l1.py Adds empty-science handling and updates return types.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread imap_processing/swapi/l1/swapi_l1.py Outdated

@leowerneck leowerneck 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.

LGTM

@lacoak21
lacoak21 merged commit 1723662 into IMAP-Science-Operations-Center:dev Oct 19, 2026
22 checks passed
@lacoak21
lacoak21 deleted the swapi_l1a_check_for_no_HVSCI_packets branch October 19, 2026 17:09
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.

BUG - SWAPI l1a sci failures

3 participants