Skip to content

Commit

Permalink
make .env in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Dec 12, 2023
1 parent 3a1d198 commit a4415b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ jobs:
pytest_cov_dir: "quartz_solar_forecast"
os_list: '["ubuntu-latest"]'
python-version: "['3.10','3.11']"
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
extra_commands: echo "HF_TOKEN=${{ secrets.HF_TOKEN }}" > .env
4 changes: 4 additions & 0 deletions quartz_solar_forecast/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
from quartz_solar_forecast.eval.pv import get_pv_metadata, get_pv_truth
from quartz_solar_forecast.eval.utils import combine_forecast_ground_truth

from dotenv import load_dotenv

load_dotenv()

try:

hf_token = os.environ["HF_TOKEN"]
Expand Down

0 comments on commit a4415b2

Please sign in to comment.