diff --git a/.github/workflows/submit-flu-forecasts.yaml b/.github/workflows/submit-flu-forecasts.yaml index c86b764..a08db95 100644 --- a/.github/workflows/submit-flu-forecasts.yaml +++ b/.github/workflows/submit-flu-forecasts.yaml @@ -27,10 +27,14 @@ jobs: python -m pip install --upgrade pip pip install requests pandas numpy + - name: Create required directories + run: | + mkdir -p flu/submissions + - name: Run flu forecasting script run: python flu/run-flu-forecasts.py env: - PYTHONPATH: ${{ github.workspace }}/2024-25 + PYTHONPATH: ${{ github.workspace }} - name: Fork and clone target repository run: | @@ -49,7 +53,7 @@ jobs: mkdir -p model-output/metac-cp # Copy new forecasts - cp -r ../submissions/* model-output/metac-cp/ + cp -r flu/submissions/* model-output/metac-cp/ - name: Create Pull Request run: | diff --git a/flu/run-flu-forecasts.py b/flu/run-flu-forecasts.py index 5d8dcc8..f70f972 100644 --- a/flu/run-flu-forecasts.py +++ b/flu/run-flu-forecasts.py @@ -8,7 +8,7 @@ import requests from datetime import datetime, timedelta import pandas as pd -from ..utils import internal_to_actual +from utils import internal_to_actual import numpy as np question_id = 30048 @@ -115,5 +115,5 @@ ] forecasts_df_full.to_csv( - f"submissions/{origin_date}-metac-cp.csv", index=False + f"flu/submissions/{origin_date}-metac-cp.csv", index=False )