Skip to content

Conversation

@laspsandoval
Copy link
Contributor

@laspsandoval laspsandoval commented Dec 17, 2025

Change Summary

Overview

Pass in new database, handle pagination, update time to be exactly at midnight

Updated Files

  • stackbuilder.py
    • pass in new database
  • ialirt_archive_construct.py
    • pass in new database
  • ialirt_archive.py
    • pass in new database, handle pagination, update time to be exactly at midnight

Testing

  • test_ialirt_archive.py
  • test_ialirt_archive_construct.py

@laspsandoval laspsandoval marked this pull request as draft December 17, 2025 20:12
@laspsandoval laspsandoval self-assigned this Dec 17, 2025
@laspsandoval laspsandoval added this to the December 2025 milestone Dec 17, 2025
@laspsandoval laspsandoval marked this pull request as ready for review December 17, 2025 20:24
all_items.extend(inst_items)

dataset = create_xarray_from_records(response["Items"])
dataset = create_xarray_from_records(all_items)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this handle an empty dataset? If we don't get any ialirt packets for a day, would this still create all the expected fields with empty fill values, or do we need to exit out earlier above this so we don't write an empty file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Addressed that empty dataset now.

INSTRUMENTS = ["mag", "codice_lo", "codice_hi", "hit", "swe", "swapi", "spacecraft"]


def query_instrument(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't we already have this in the main API-route? I feel like we should be using the same query function in both places so we don't get out of sync.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ialirt_ingest.py queries S3 (packet filenames).

ialirt_data_query_api.py queries DynamoDB, but does not paginate.

This archive lambda needs to pull all items in a time window (1 day), so pagination is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants