Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CD_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
CLOUD_SQL_USER: "${{ secrets.CLOUD_SQL_USER }}"
CLOUD_SQL_PASSWORD: "${{ secrets.CLOUD_SQL_PASSWORD }}"
run: |
uv run python transfers/backfill/staging.py
uv run python -m transfers.backfill.staging

- name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v2'
Expand Down
8 changes: 7 additions & 1 deletion transfers/backfill/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@
"""
Orchestrates all backfills used in the staging CD pipeline.

Run with:
Preferred usage (avoids import path issues):
python -m transfers.backfill.staging --batch-size 1000
"""

import argparse
import sys
from pathlib import Path

# Ensure repository root on sys.path when run as a script (e.g., in CI).
ROOT = Path(__file__).resolve().parents[2]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from transfers.backfill.ngwmn_views import run as run_ngwmn_views
from transfers.backfill.waterlevelscontinuous_pressure_daily import (
run as run_pressure_daily,
Expand Down
Loading