-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ac8b9c
commit 88acb64
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Python package tests | ||
|
||
on: | ||
push: | ||
schedule: | ||
- cron: "0 12 * * 1" | ||
jobs: | ||
call-run-python-tests: | ||
uses: openclimatefix/.github/.github/workflows/python-test.yml@main | ||
with: | ||
# pytest-cov looks at this folder | ||
pytest_cov_dir: "quartz_solar_forecast" | ||
os_list: '["ubuntu-latest"]' | ||
python-version: "['3.10','3.11']" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pandas | ||
xarray | ||
psp # need to put on pypi | ||
pv-site-prediction | ||
pydantic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from quartz_solar_forecast.forecast import run_forecast | ||
from quartz_solar_forecast.pydantic_models import PVSite | ||
|
||
|
||
def test_run_forecast(): | ||
# make input data | ||
site = PVSite(latitude=51.75, longitude=-1.25, capacity_kwp=1.25) | ||
|
||
# run model | ||
predications_df = run_forecast(site=site, ts='2023-10-30') | ||
|
||
print(predications_df) | ||
print(f"Max: {predications_df['power_wh'].max()}") | ||
|