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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ dependencies = [
"uvicorn",
"pydantic_settings",
"httpx",
"sentry_sdk",
"huggingface_hub==0.17.3",
"apitally[fastapi]>=0.22.3"
]
Expand Down
5 changes: 0 additions & 5 deletions quartz_solar_forecast/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
forecast_v1_tilt_orientation,
)
from quartz_solar_forecast.pydantic_models import PVSite
from quartz_solar_forecast.utils.sentry_logging import write_sentry

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -146,10 +145,6 @@ def run_forecast(
log.info(f"Running forecast for site at lat {site.latitude}, lon {site.longitude} "
f"at time {ts} with model {model} and nwp source {nwp_source}")

# log usage to sentry, if you dont want to log usage to sentry, you can
# 1. set environmental variable QUARTZ_SOLAR_FORECAST_LOGGING='false', or
# 2. comment out this line
write_sentry({"site": site.copy(), "model": model, "ts": ts, "nwp_source": nwp_source})

if model == "gb":
return predict_ocf(site, None, ts, nwp_source, live_generation)
Expand Down
50 changes: 0 additions & 50 deletions quartz_solar_forecast/utils/sentry_logging.py

This file was deleted.

8 changes: 5 additions & 3 deletions tests/unit/test_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@ def test_run_forecast_historical():

# model input data creation
site = PVSite(latitude=51.75, longitude=-1.25, capacity_kwp=1.25)
ts = datetime.today() - timedelta(days=200)

# Use 60 days to stay within the 3-month (90-day) limit allowed by the XGB model
ts = datetime.today() - timedelta(days=60)

# run model with icon, gfs and ukmo nwp
predications_df_gfs = run_forecast(site=site, ts=ts, model="gb", nwp_source="gfs")
predications_df_icon = run_forecast(site=site, ts=ts, model="gb", nwp_source="icon")
predications_df_ukmo = run_forecast(site=site, ts=ts, model="gb", nwp_source="ukmo")
predications_df_xgb = run_forecast(site=site, ts=ts, model="xgb")
predications_df_xgb = run_forecast(site=site, model="xgb")

print("\nPrediction for a date more than 180 days in the past")
print("\nPrediction for a historical date \n")

print("\n Prediction based on GFS NWP\n")
print(predications_df_gfs)
Expand Down
Loading