From 8ce04f1f83a865c00637edfe2033275c6869326e Mon Sep 17 00:00:00 2001 From: ggman12 Date: Sat, 14 Feb 2026 18:44:21 -0500 Subject: [PATCH] Revert "update for historical run" This reverts commit ccf55b2308d1bacf47be3d93923f1749cec10e97. --- .github/workflows/historical-adsb.yaml | 34 +------------------------- src/adsb/download_and_list_icaos.py | 12 ++++----- 2 files changed, 6 insertions(+), 40 deletions(-) diff --git a/.github/workflows/historical-adsb.yaml b/.github/workflows/historical-adsb.yaml index 7346c54..d3ce334 100644 --- a/.github/workflows/historical-adsb.yaml +++ b/.github/workflows/historical-adsb.yaml @@ -71,7 +71,6 @@ jobs: df -h - name: Download and extract ADS-B data - id: download env: START_DATE: ${{ matrix.chunk.start_date }} END_DATE: ${{ matrix.chunk.end_date }} @@ -79,20 +78,8 @@ jobs: run: | python -m src.adsb.download_and_list_icaos --start-date "$START_DATE" --end-date "$END_DATE" ls -lah data/output/ - - # Check if manifest has any ICAOs - MANIFEST=$(ls data/output/icao_manifest_*.txt 2>/dev/null | head -1) - if [ -z "$MANIFEST" ] || [ ! -s "$MANIFEST" ]; then - echo "No data available for this date range" - echo "has_data=false" >> "$GITHUB_OUTPUT" - else - ICAO_COUNT=$(wc -l < "$MANIFEST") - echo "Manifest has $ICAO_COUNT ICAOs" - echo "has_data=true" >> "$GITHUB_OUTPUT" - fi - name: Create tar of extracted data and split into chunks - if: steps.download.outputs.has_data == 'true' run: | cd data/output echo "=== Disk space before tar ===" @@ -128,7 +115,6 @@ jobs: fi - name: Upload extracted data chunks - if: steps.download.outputs.has_data == 'true' uses: actions/upload-artifact@v4 with: name: adsb-extracted-${{ matrix.chunk.start_date }}-${{ matrix.chunk.end_date }} @@ -141,7 +127,7 @@ jobs: needs: [generate-matrix, adsb-extract] runs-on: ubuntu-24.04-arm strategy: - fail-fast: false + fail-fast: true matrix: chunk: ${{ fromJson(needs.generate-matrix.outputs.chunks) }} icao_chunk: [0, 1, 2, 3] @@ -168,7 +154,6 @@ jobs: - name: Download extracted data uses: actions/download-artifact@v4 - continue-on-error: true with: name: adsb-extracted-${{ matrix.chunk.start_date }}-${{ matrix.chunk.end_date }} path: data/output/tar_chunks/ @@ -236,7 +221,6 @@ jobs: adsb-reduce: needs: [generate-matrix, adsb-map] - if: always() && needs.generate-matrix.result == 'success' runs-on: ubuntu-24.04-arm steps: - name: Checkout @@ -254,26 +238,12 @@ jobs: - name: Download all chunk artifacts uses: actions/download-artifact@v4 - continue-on-error: true with: pattern: adsb-map-* path: data/output/adsb_chunks/ merge-multiple: true - - name: Check for data - id: check_data - run: | - PARQUET_COUNT=$(find data/output/adsb_chunks/ -name '*.parquet' -type f 2>/dev/null | wc -l) - echo "Found $PARQUET_COUNT parquet files" - if [ "$PARQUET_COUNT" -eq 0 ]; then - echo "WARNING: No parquet chunks found - all date ranges may have had no releases" - echo "has_data=false" >> "$GITHUB_OUTPUT" - else - echo "has_data=true" >> "$GITHUB_OUTPUT" - fi - - name: Debug downloaded files - if: steps.check_data.outputs.has_data == 'true' run: | echo "=== Disk space before processing ===" df -h @@ -283,7 +253,6 @@ jobs: du -sh data/output/adsb_chunks/ || echo "No chunks dir" - name: Combine chunks to CSV - if: steps.check_data.outputs.has_data == 'true' env: START_DATE: ${{ needs.generate-matrix.outputs.global_start }} END_DATE: ${{ needs.generate-matrix.outputs.global_end }} @@ -292,7 +261,6 @@ jobs: ls -lah data/openairframes/ - name: Upload final artifact - if: steps.check_data.outputs.has_data == 'true' uses: actions/upload-artifact@v4 with: name: openairframes_adsb-${{ needs.generate-matrix.outputs.global_start }}-${{ needs.generate-matrix.outputs.global_end }} diff --git a/src/adsb/download_and_list_icaos.py b/src/adsb/download_and_list_icaos.py index 27624c7..f42aa67 100644 --- a/src/adsb/download_and_list_icaos.py +++ b/src/adsb/download_and_list_icaos.py @@ -182,15 +182,13 @@ def main(): all_icaos = process_date_range(start_date, end_date) + if not all_icaos: + print("No ICAOs found in date range") + sys.exit(1) + # Write combined manifest with range identifier manifest_id = f"{args.start_date}_{args.end_date}" - - if not all_icaos: - print("WARNING: No ICAOs found in date range (no releases available)") - # Write empty manifest so downstream steps can detect and skip - write_manifest([], manifest_id) - else: - write_manifest(list(all_icaos), manifest_id) + write_manifest(list(all_icaos), manifest_id) print(f"\nDone! Total ICAOs: {len(all_icaos)}")