podaac / hydrocron

API for retreiving time series of SWOT data
https://podaac.github.io/hydrocron/
Apache License 2.0
17 stars 4 forks source link

Feature/issue 212 - Update track ingest table with granule status #228

Closed nikki-t closed 1 month ago

nikki-t commented 2 months ago

Github Issue: #212

Description

Update track ingest table with granule status after determining what is in CMR but not in Hydrocron and locating all granules in the track ingest table with a status of "to_ingest".

Overview of work done

Overview of verification done

New and existing unit tests pass.

Overview of integration done

Deployed to SIT environment and executed tests on CMR granules with a revision_date range of : 2024-09-05 23:00:00+00:00 to 2024-09-05 23:59:59+00:00 with 1 granule that has a "to_ingest" status and 2 granules that are not in the Hydrocron table.

[INFO] 2024-09-09T19:27:41.765Z Collection shortname: SWOT_L2_HR_RiverSP_reach_2.0
[INFO] 2024-09-09T19:27:41.765Z Hydrocron table: hydrocron-swot-reach-table
[INFO] 2024-09-09T19:27:41.765Z Hydrocron track ingest table: hydrocron-swot-reach-track-ingest-table
[INFO] 2024-09-09T19:27:41.765Z Temporal indicator for revision dates: True
[INFO] 2024-09-09T19:27:41.765Z Temporal start date: 2024-09-05 23:00:00+00:00
[INFO] 2024-09-09T19:27:41.765Z Temporal end date: 2024-09-05 23:59:59+00:00
[INFO] 2024-09-09T19:27:41.765Z Querying CMR temporal range: 2024-09-05 23:00:00+00:00 to 2024-09-05 23:59:59+00:00.
[INFO] 2024-09-09T19:27:42.302Z Located 2 granules in CMR.
[INFO] 2024-09-09T19:27:42.347Z Located 2 granules NOT in Hydrocron.
[INFO] 2024-09-09T19:27:42.360Z Located 1 granules with 'to_ingest' status.
[INFO] 2024-09-09T19:27:42.406Z Located 2 granules that require ingestion.
[INFO] 2024-09-09T19:27:42.406Z Located 1 granules that are already ingested.
[INFO] 2024-09-09T19:27:42.445Z Set up dynamo table connection
[INFO] 2024-09-09T19:27:42.488Z Adding track ingest reaches items to table individually
[INFO] 2024-09-09T19:27:42.488Z Item granuleUR: SWOT_L2_HR_RiverSP_Reach_010_177_NA_20240131T074748_20240131T074759_PIC0_01.zip
[INFO] 2024-09-09T19:27:42.495Z Item granuleUR: SWOT_L2_HR_RiverSP_Reach_020_457_NA_20240905T233134_20240905T233135_PIC0_01.zip
[INFO] 2024-09-09T19:27:42.506Z Item granuleUR: SWOT_L2_HR_RiverSP_Reach_020_457_AR_20240905T233224_20240905T233235_PIC0_01.zip
[INFO] 2024-09-09T19:27:42.520Z Updated hydrocron-swot-reach-track-ingest-table with 3 items.
[INFO] 2024-09-09T19:27:42.521Z To Ingest: [{'granuleUR': 'SWOT_L2_HR_RiverSP_Reach_020_457_NA_20240905T233134_20240905T233135_PIC0_01.zip', 'revision_date': '2024-09-09T02:57:10.684Z', 'checksum': '6ce27e868bd90055252de186f554759f', 'expected_feature_count': -1, 'actual_feature_count': 0, 'status': 'to_ingest'}, {'granuleUR': 'SWOT_L2_HR_RiverSP_Reach_020_457_AR_20240905T233224_20240905T233235_PIC0_01.zip', 'revision_date': '2024-09-09T02:57:13.806Z', 'checksum': 'd9fdbea55becb22dacea13c4055aa5ad', 'expected_feature_count': -1, 'actual_feature_count': 0, 'status': 'to_ingest'}]
[INFO] 2024-09-09T19:27:42.522Z Ingested: [{'granuleUR': 'SWOT_L2_HR_RiverSP_Reach_010_177_NA_20240131T074748_20240131T074759_PIC0_01.zip', 'revision_date': '2024-07-30T03:13:39.720Z', 'checksum': '936a4fcb3e28eb7e246eba532d36a434', 'expected_feature_count': 438, 'actual_feature_count': 438}]

Screenshot 2024-09-09 at 15 29 49

PR checklist:

See Pull Request Review Checklist for pointers on reviewing this pull request

nikki-t commented 1 month ago

Please see #238 for the latest testing in SIT.